Explorar o código

规则引擎,修改bug

zhaoxian %!s(int64=3) %!d(string=hai) anos
pai
achega
7149b82193

+ 15 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleTemplateController.java

@@ -2,7 +2,11 @@ package cn.com.ctop.alarm.modules.controller;
 
 
 import cn.com.ctop.alarm.modules.entity.RuleGroup;
 import cn.com.ctop.alarm.modules.entity.RuleGroup;
 import cn.com.ctop.alarm.modules.entity.RuleTemplate;
 import cn.com.ctop.alarm.modules.entity.RuleTemplate;
-import cn.com.ctop.alarm.modules.service.*;
+import cn.com.ctop.alarm.modules.service.IRuleAccountTemplateService;
+import cn.com.ctop.alarm.modules.service.IRuleAccountThresholdService;
+import cn.com.ctop.alarm.modules.service.IRuleBaseService;
+import cn.com.ctop.alarm.modules.service.IRuleGroupService;
+import cn.com.ctop.alarm.modules.service.IRuleTemplateService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
@@ -22,7 +26,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
@@ -159,6 +171,7 @@ public class RuleTemplateController {
         if (!Check.isNull(templateName)) {
         if (!Check.isNull(templateName)) {
             queryWrapper.like("template_name", templateName);
             queryWrapper.like("template_name", templateName);
         }
         }
+        queryWrapper.orderByDesc("update_time");
         Page<RuleTemplate> page = new Page<RuleTemplate>(pageNo, pageSize);
         Page<RuleTemplate> page = new Page<RuleTemplate>(pageNo, pageSize);
         IPage<RuleTemplate> pageList = ruleTemplateService.page(page, queryWrapper);
         IPage<RuleTemplate> pageList = ruleTemplateService.page(page, queryWrapper);
         result.setSuccess(true);
         result.setSuccess(true);

+ 2 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/enums/ConditEnum.java

@@ -16,7 +16,8 @@ public enum ConditEnum {
     GREATER_EQUAL("greater_equal", "大于等于"),
     GREATER_EQUAL("greater_equal", "大于等于"),
     LESS_EQUAL("less_equal", "小于等于"),
     LESS_EQUAL("less_equal", "小于等于"),
     NO_CONTAIN("no_contain", "不包含"),
     NO_CONTAIN("no_contain", "不包含"),
-    CONTAIN("contain", "包含");
+    CONTAIN("contain", "包含"),
+    BETWEEN("between", "介于");
 
 
     private String name;
     private String name;
     private String code;
     private String code;