package com.zksy.system.basicData.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.common.core.domain.AjaxResult;
import com.zksy.common.utils.DeleteTableUtils;
import com.zksy.system.basicData.domain.CrmMajorWorkSafetyAccidents;
import com.zksy.system.basicData.mapper.CrmMajorWorkSafetyAccidentsMapper;
import com.zksy.system.basicData.service.CrmMajorWorkSafetyAccidentsService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 重大安全生产事故通报信息Service业务层处理
 *
 * @author sy
 * @date 2024-06-17
 */
@Service
public class CrmMajorWorkSafetyAccidentsServiceImpl extends ServiceImpl<CrmMajorWorkSafetyAccidentsMapper, CrmMajorWorkSafetyAccidents> implements CrmMajorWorkSafetyAccidentsService {
    @Resource
    private CrmMajorWorkSafetyAccidentsMapper mapper;

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