|
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
+import java.sql.Timestamp;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -107,6 +108,7 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
|
|
|
*/
|
|
|
private void setDefaultValue(GroupAlarmRule groupAlarmRule) {
|
|
|
groupAlarmRule.setCreator(PoemsContext.getContext().getUserId());
|
|
|
+ groupAlarmRule.setTs(new Timestamp(System.currentTimeMillis()));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -236,18 +238,18 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
|
|
|
|
|
|
// todo 需判断使用like还是eq
|
|
|
if (StringUtils.isNotEmpty(pageQueryGroupAlarmRuleDTO.getGroupId())) {
|
|
|
- queryWrapper.like(GroupAlarmRule.PROP_GROUP_ID, pageQueryGroupAlarmRuleDTO.getGroupId());
|
|
|
+ queryWrapper.eq(GroupAlarmRule.PROP_GROUP_ID, pageQueryGroupAlarmRuleDTO.getGroupId());
|
|
|
}
|
|
|
|
|
|
// todo 需判断使用like还是eq
|
|
|
- if (StringUtils.isNotEmpty(pageQueryGroupAlarmRuleDTO.getAlarmItemCode())) {
|
|
|
- queryWrapper.like(GroupAlarmRule.PROP_ALARM_ITEM_CODE, pageQueryGroupAlarmRuleDTO.getAlarmItemCode());
|
|
|
+ if (StringUtils.isNotEmpty(pageQueryGroupAlarmRuleDTO.getAlarmItemName())) {
|
|
|
+ queryWrapper.like(GroupAlarmRule.PROP_ALARM_ITEM_NAME, pageQueryGroupAlarmRuleDTO.getAlarmItemName());
|
|
|
}
|
|
|
|
|
|
- // todo 需判断使用like还是eq
|
|
|
- if (StringUtils.isNotEmpty(pageQueryGroupAlarmRuleDTO.getAlarmConditionId())) {
|
|
|
- queryWrapper.like(GroupAlarmRule.PROP_ALARM_CONDITION_ID, pageQueryGroupAlarmRuleDTO.getAlarmConditionId());
|
|
|
- }
|
|
|
+// // todo 需判断使用like还是eq
|
|
|
+// if (StringUtils.isNotEmpty(pageQueryGroupAlarmRuleDTO.getAlarmConditionId())) {
|
|
|
+// queryWrapper.like(GroupAlarmRule.PROP_ALARM_CONDITION_ID, pageQueryGroupAlarmRuleDTO.getAlarmConditionId());
|
|
|
+// }
|
|
|
|
|
|
return getBaseMapper().selectPage(pageParam, queryWrapper);
|
|
|
}
|