package com.zksy.basicData.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.basicData.domain.XcrCompanyInfo;
import com.zksy.basicData.mapper.XcrCompanyInfoMapper;
import com.zksy.basicData.service.IXcrCompanyInfoService;
import com.zksy.common.core.domain.AjaxResult;
import com.zksy.common.utils.DeleteTableUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 企业基本信息（天眼查）Service业务层处理
 *
 * @author nahida
 * @date 2024-12-12
 */
@Service
public class XcrCompanyInfoServiceImpl extends ServiceImpl<XcrCompanyInfoMapper, XcrCompanyInfo> implements IXcrCompanyInfoService {

    @Resource
    private XcrCompanyInfoMapper mapper;

    @Override
    @Transactional
    public AjaxResult deleteAll() {
        DeleteTableUtils<XcrCompanyInfo> utils = new DeleteTableUtils<>();
        utils.del(XcrCompanyInfo::getXhCodeId,mapper);
        return AjaxResult.success("全部删除成功");
    }
}
