| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | @Override |
| | | public DmModuleEntity info(String id) { |
| | | return dmModuleDao.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public DmModuleEntity getModuleByItemId(String itemId) { |
| | | List<DmModuleEntity> list = dmModuleDao.getModuleByItemId(itemId); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return null; |
| | | } |
| | | return list.get(0); |
| | | } |
| | | |
| | | private QueryWrapper<DmModuleEntity> getWrapper(Map<String, Object> params) { |
| | |
| | | params.put("moduletype", moduletype); |
| | | QueryWrapper<DmModuleEntity> wrapper = getWrapper(params); |
| | | return dmModuleDao.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updatePredictTime(String id, Date predictTime) { |
| | | DmModuleEntity entity = dmModuleDao.selectById(id); |
| | | if (entity == null) { |
| | | return; |
| | | } |
| | | entity.setPredicttime(predictTime); |
| | | dmModuleDao.updateById(entity); |
| | | } |
| | | |
| | | @Override |