package com.ruoyi.project.tr.troubleshootList.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.project.tr.troubleshootList.mapper.TroubleshootListMapper; import com.ruoyi.project.tr.troubleshootList.domain.TroubleshootList; import com.ruoyi.project.tr.troubleshootList.service.ITroubleshootListService; import com.ruoyi.common.utils.text.Convert; /** * 隐患排查Service业务层处理 * * @author wm * @date 2020-05-05 */ @Service public class TroubleshootListServiceImpl implements ITroubleshootListService { @Autowired private TroubleshootListMapper troubleshootListMapper; /** * 查询隐患排查 * * @param troubleshootId 隐患排查ID * @return 隐患排查 */ @Override public TroubleshootList selectTroubleshootListById(Long troubleshootId) { return troubleshootListMapper.selectTroubleshootListById(troubleshootId); } /** * 查询隐患排查列表 * * @param troubleshootList 隐患排查 * @return 隐患排查 */ @Override public List selectTroubleshootListList(TroubleshootList troubleshootList) { return troubleshootListMapper.selectTroubleshootListList(troubleshootList); } /** * 新增隐患排查 * * @param troubleshootList 隐患排查 * @return 结果 */ @Override public int insertTroubleshootList(TroubleshootList troubleshootList) { troubleshootList.setCreateTime(DateUtils.getNowDate()); return troubleshootListMapper.insertTroubleshootList(troubleshootList); } /** * 修改隐患排查 * * @param troubleshootList 隐患排查 * @return 结果 */ @Override public int updateTroubleshootList(TroubleshootList troubleshootList) { troubleshootList.setUpdateTime(DateUtils.getNowDate()); return troubleshootListMapper.updateTroubleshootList(troubleshootList); } /** * 删除隐患排查对象 * * @param ids 需要删除的数据ID * @return 结果 */ @Override public int deleteTroubleshootListByIds(String ids) { return troubleshootListMapper.deleteTroubleshootListByIds(Convert.toStrArray(ids)); } /** * 删除隐患排查信息 * * @param troubleshootId 隐患排查ID * @return 结果 */ @Override public int deleteTroubleshootListById(Long troubleshootId) { return troubleshootListMapper.deleteTroubleshootListById(troubleshootId); } }