|
@@ -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);
|