package com.zksy.basicData.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.basicData.domain.XcrFoodInspection;
import com.zksy.basicData.mapper.XcrFoodInspectionMapper;
import com.zksy.basicData.service.IXcrFoodInspectionService;
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 XcrFoodInspectionServiceImpl extends ServiceImpl<XcrFoodInspectionMapper, XcrFoodInspection> implements IXcrFoodInspectionService {

    @Resource
    private XcrFoodInspectionMapper mapper;

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