| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.param.request.EventSubRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.DeviceMapper; |
| | | import com.doumee.dao.business.WarningMapper; |
| | |
| | | QueryWrapper<WarningRule> wrapper = new QueryWrapper<>(warningRule); |
| | | return warningRuleMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatus(WarningRule param) { |
| | | WarningRule model = warningRuleMapper.selectById(param.getId()); |
| | | if (model==null || Constants.equalsInteger(model.getIsdeleted(), Constants.ONE)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(model.getStatus(),param.getStatus())){ |
| | | return; |
| | | } |
| | | model.setStatus(param.getStatus()); |
| | | model.setEditDate(new Date()); |
| | | model.setEditor(param.getLoginUserInfo().getId()); |
| | | warningRuleMapper.updateById(model); |
| | | } |
| | | } |