package org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.service.impl; import org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.entity.RmSjcjrwb; import org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.entity.RmCjjl; import org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.mapper.RmCjjlMapper; import org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.mapper.RmSjcjrwbMapper; import org.jeecg.modules.demo.hzz.shjsgc.sjcjrwb.service.IRmSjcjrwbService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.List; import java.util.Collection; /** * @Description: 数据采集任务表 * @Author: jeecg-boot * @Date: 2021-11-29 * @Version: V1.0 */ @Service public class RmSjcjrwbServiceImpl extends ServiceImpl implements IRmSjcjrwbService { @Autowired private RmSjcjrwbMapper rmSjcjrwbMapper; @Autowired private RmCjjlMapper rmCjjlMapper; @Override @Transactional public void delMain(String id) { rmCjjlMapper.deleteByMainId(id); rmSjcjrwbMapper.deleteById(id); } @Override @Transactional public void delBatchMain(Collection idList) { for(Serializable id:idList) { rmCjjlMapper.deleteByMainId(id.toString()); rmSjcjrwbMapper.deleteById(id); } } }