package cn.com.goldenwater.dcproj.service.impl; import cn.com.goldenwater.core.service.AbstractCrudService; import cn.com.goldenwater.dcproj.dao.ChkSafeStatListIndustryDao; import cn.com.goldenwater.dcproj.model.ChkSafeStatListIndustry; import cn.com.goldenwater.dcproj.param.ChkSafeStatListIndustryParam; import cn.com.goldenwater.dcproj.service.ChkSafeStatListIndustryService; import cn.com.goldenwater.id.util.UuidUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; /** * 成都市水务行业安全大检查行业(领域)Service业务层处理 * * @author ruoyi * @date 2023-02-22 */ @Service @Transactional public class ChkSafeStatListIndustryServiceImpl extends AbstractCrudService implements ChkSafeStatListIndustryService { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private ChkSafeStatListIndustryDao chkSafeStatListIndustryDao; public ChkSafeStatListIndustryServiceImpl(ChkSafeStatListIndustryDao chkSafeStatListIndustryDao) { super(chkSafeStatListIndustryDao); this.chkSafeStatListIndustryDao = chkSafeStatListIndustryDao; } /** * 增加成都市水务行业安全大检查行业(领域) * * @return 成都市水务行业安全大检查行业(领域) */ @Override public int insert(ChkSafeStatListIndustry chkSafeStatListIndustry) { logger.debug("ChkSafeStatListIndustry 新增"); String uuid = UuidUtil.uuid(); // 生成uuid chkSafeStatListIndustry.setId(uuid); chkSafeStatListIndustry.setIntm(new Date()); chkSafeStatListIndustry.setUptm(new Date()); chkSafeStatListIndustry.setDataStat("0"); return this.chkSafeStatListIndustryDao.insert(chkSafeStatListIndustry); } /** * 更新 成都市水务行业安全大检查行业(领域) * 主键更新 * @param chkSafeStatListIndustry 成都市水务行业安全大检查行业(领域) * @return 成都市水务行业安全大检查行业(领域) */ @Override public int update(ChkSafeStatListIndustry chkSafeStatListIndustry) { logger.debug("ChkSafeStatListIndustry 更新"); chkSafeStatListIndustry.setUptm(new Date()); return this.chkSafeStatListIndustryDao.update(chkSafeStatListIndustry); } /** * 主键删除 成都市水务行业安全大检查行业(领域) * * @param id 成都市水务行业安全大检查行业(领域)主键 * @return 成都市水务行业安全大检查行业(领域) */ @Override public int delete(String id) { logger.debug("ChkSafeStatListIndustry 删除"); return this.chkSafeStatListIndustryDao.delete(id); } /** * 查询行业领域下拉框列表 * @param chkSafeStatListIndustryParam * @return */ @Override public List querySelectOptions(ChkSafeStatListIndustryParam chkSafeStatListIndustryParam){ if(null == chkSafeStatListIndustryParam || null == chkSafeStatListIndustryParam.getPid()){ return this.chkSafeStatListIndustryDao.findRootList(); }else { chkSafeStatListIndustryParam.setDataStat("0"); return this.chkSafeStatListIndustryDao.findList(chkSafeStatListIndustryParam); } } }