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

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.CrmAdministrativePenalty;
import com.zksy.system.basicData.mapper.CrmAdministrativePenaltyMapper;
import com.zksy.system.basicData.service.CrmAdministrativePenaltyService;

import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 行政处罚Service业务层处理
 * 
 * @author sy
 * @date 2024-04-08
 */
@Service
public class CrmAdministrativePenaltyServiceImpl extends ServiceImpl<CrmAdministrativePenaltyMapper, CrmAdministrativePenalty> implements CrmAdministrativePenaltyService {

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