1.定时去统计界面和服务端的配置量入库,并新增系统管理-管理员用户预警界面列表的功能
2.实时扫描此表中界面和服务端的配置量是否一致,不一致,管理员用户告警提示
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package com.nis.web.controller.sys;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysUserWarn;
|
||||
import com.nis.util.ServiceConfigTemplateUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.service.SysUserWarnService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/sys/warn")
|
||||
public class SysUserWarnController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
protected SysUserWarnService sysUserWarnService;
|
||||
|
||||
|
||||
|
||||
@RequiresPermissions("sys:warnList:view")
|
||||
@RequestMapping(value = {"userWarnList", ""})
|
||||
public String list(@ModelAttribute("warn") SysUserWarn warn, Model model,HttpServletRequest request
|
||||
,HttpServletResponse response) {
|
||||
Page<SysUserWarn> pageCondition = new Page<SysUserWarn>(request, response,"r");
|
||||
Properties msgProp = getMsgProp();
|
||||
Page<SysUserWarn> page = sysUserWarnService.getAllList(pageCondition,warn,msgProp);
|
||||
model.addAttribute("warn", warn);
|
||||
model.addAttribute("page", page);
|
||||
return "/sys/sysUserWarnList";
|
||||
}
|
||||
|
||||
@RequiresPermissions("sys:warnList:view")
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"serviceSum", ""})
|
||||
public SysUserWarn findServiceSum() {
|
||||
SysUserWarn findServiceSum = sysUserWarnService.findServiceSum();
|
||||
return findServiceSum;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
List<Map<String, Object>> serviceList = ServiceConfigTemplateUtil.getServiceList();
|
||||
System.out.println(serviceList);
|
||||
for (Map<String, Object> map : serviceList) {
|
||||
System.out.println(map.get("id"));
|
||||
System.out.println(map.get("tableName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user