diff --git a/src/main/java/com/nis/domain/Page.java b/src/main/java/com/nis/domain/Page.java index a3ad883d3..0586434ac 100644 --- a/src/main/java/com/nis/domain/Page.java +++ b/src/main/java/com/nis/domain/Page.java @@ -4,7 +4,7 @@ package com.nis.domain; import java.util.ArrayList; -import java.util.HashMap; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.regex.Pattern; @@ -13,16 +13,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.mapping.ResultMap; -import org.apache.ibatis.mapping.ResultMapping; -import org.apache.ibatis.session.SqlSessionFactory; import com.fasterxml.jackson.annotation.JsonIgnore; import com.nis.util.Configurations; -import com.nis.util.Constants; import com.nis.util.CookieUtil; import com.nis.util.StringUtil; -import com.nis.web.service.SpringContextHolder; /** * 分页类 @@ -52,7 +47,7 @@ public class Page { private String orderBy = ""; // 标准查询有效, 实例: updatedate desc, name asc - private String fields ="";//制定资源的字段 + private String fields;//制定资源的字段 private String where; @@ -63,10 +58,9 @@ public class Page { private String message = ""; // 设置提示消息,显示在“共n条”之后 public Page() { - this.pageSize = pageSize; + this.pageSize = -1; } - /** * 构造方法 * @param request 传递 repage 参数,来记住页码 @@ -74,27 +68,11 @@ public class Page { */ public Page(HttpServletRequest request, HttpServletResponse response){ - this(request, response,Integer.valueOf(Configurations.getIntProperty("page.pageSize", 30))); - - } - /** - * 构造方法 - * @param request 传递 repage 参数,来记住页码 - * @param response 用于设置 Cookie,记住页码 - * - */ - public Page(HttpServletRequest request, HttpServletResponse response,Class clazz){ - - this(request, response,clazz.getSimpleName(),Integer.valueOf(Configurations.getIntProperty("page.pageSize", 30))); - - } - public Page(HttpServletRequest request, HttpServletResponse response,int defaultPageSize){ - - this(request, response,"",Integer.valueOf(Configurations.getIntProperty("page.pageSize", 30))); + this(request, response, Integer.valueOf(Configurations.getIntProperty("page.pageSize", 30))); } - public Page(HttpServletRequest request, HttpServletResponse response,String className, int defaultPageSize){ + public Page(HttpServletRequest request, HttpServletResponse response, int defaultPageSize){ try { // 设置页码参数(传递repage参数,来记住页码) String no = request.getParameter("pageNo"); @@ -111,7 +89,13 @@ public class Page { } // 设置页面大小参数(传递repage参数,来记住页码大小) - String size = request.getParameter("pageSize"); + String size = ""; + if(defaultPageSize==-1){ + size = "-1"; + }else{ + size = request.getParameter("pageSize"); + + } if (StringUtils.isNotBlank(size)) { if (StringUtils.isNumeric(size) || size.equals("-1")){ @@ -126,24 +110,20 @@ public class Page { } else { this.pageSize = defaultPageSize; } - //超出每页最大显示条数,取限制的最大条数 - if(this.pageSize > Constants.MAX_PAGE_SIZE){ - this.pageSize = Constants.MAX_PAGE_SIZE; - } String fields = request.getParameter("fields"); if (StringUtils.isNotBlank(fields)){ - fields=getFiledsSql(className, fields); this.setFields(fields); } // 设置排序参数 String orderBy = request.getParameter("orderBy"); if (StringUtils.isNotBlank(orderBy)){ - orderBy=getOrderBySql(className, orderBy); this.setOrderBy(orderBy); } - this.count=Integer.valueOf(Configurations.getIntProperty("page.count", -1)); + + this.setWhere(getWhere(request)); + } catch (Exception e) { e.printStackTrace(); @@ -334,8 +314,8 @@ public class Page { sb.append("
  • 当前 "); sb.append(" / "); - sb.append(" 条,"); + sb.append(" 页,"); sb.append("共 " + count + " 条"+(message!=null?message:"")+"
  • \n"); sb.insert(0,"
      \n").append("
    \n"); @@ -643,138 +623,37 @@ public class Page { public int getMaxResults(){ return getPageSize(); } - /** - * @Title: getFiledsSql - * @Description: 将fields的属性名称替换为字段名称 - * @param @param mapName - * @param @param fileds - * @param @return - * @param @throws Exception - * @return Map 返回类型 - * @author (DDM) - * @version V1.0 - */ - @JsonIgnore - public String getFiledsSql(String mapName,String fileds) throws Exception{ - String[] fieldsColoumn=null; - String orderByStr=""; - //所有字段名 - List columnList=new ArrayList(); - //所有属性名 - List propertyList=new ArrayList(); - //属性名称为key,字段名称为value - Map columnMap=new HashMap(); - - if(!StringUtil.isBlank(fileds)){ - //解析Fileds的字段/属性名称 - fieldsColoumn=fileds.split(","); - - //从resultMap中获取字段名称和属性名称 - if(fieldsColoumn != null){ - SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class); - ResultMap map= sqlSessionFactory.getConfiguration().getResultMap(mapName+"Map"); - List mapping= map.getResultMappings(); - for(ResultMapping mapp:mapping){ - columnList.add(mapp.getColumn().toLowerCase()); - propertyList.add(mapp.getProperty()); - columnMap.put(mapp.getProperty(), mapp.getColumn()); - } - } - if(fieldsColoumn != null){ - fileds=""; - for (String column : fieldsColoumn) { - if(!StringUtil.isBlank(column)){ - column=column.trim(); - if(columnList.contains(column.toLowerCase())){ - fileds+=","+column; - }else if(propertyList.contains(column)){ - fileds+=","+columnMap.get(column).toString(); - } - } - } - if(!StringUtil.isBlank(fileds)){ - fileds=fileds.substring(1); - } - - } - - } - return fileds; - } - /** - * @Title: getOrderBySql - * @Description: 将orderBy的属性名称替换为字段名称 - * @param @param mapName - * @param @param orderBy - * @param @return - * @param @throws Exception - * @return Map 返回类型 - * @author (DDM) - * @version V1.0 - */ - @JsonIgnore - public static String getOrderBySql(String mapName,String orderBy) throws Exception{ - String[] orderByColoumn=null; - //所有字段名 - List columnList=new ArrayList(); - //所有属性名 - List propertyList=new ArrayList(); - Map columnMap=new HashMap(); - - if(!StringUtil.isBlank(orderBy)){ - //解析orderBy的字段/属性名称 - orderByColoumn=orderBy.split(","); - //从resultMap中获取字段名称和属性名称 - if(orderByColoumn != null){ - SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class); - ResultMap map= sqlSessionFactory.getConfiguration().getResultMap(mapName+"Map"); - List mapping= map.getResultMappings(); - for(ResultMapping mapp:mapping){ - columnList.add(mapp.getColumn().toLowerCase()); - propertyList.add(mapp.getProperty()); - columnMap.put(mapp.getProperty(), mapp.getColumn()); - } - } - if(orderByColoumn != null){ - orderBy=""; - for (String column : orderByColoumn) { - if(!StringUtil.isBlank(column)){ - if(columnList.contains(replaceOrderBy(column))){ - orderBy+=","+column; - }else if(propertyList.contains(replaceOrderBy(column))){ - //如果是实体类名字则获取对应数据库名字+排序方式 - orderBy+=","+columnMap.get(replaceOrderBy(column)).toString() - +column.replace(replaceOrderBy(column), ""); - } - } - } - if(!StringUtil.isBlank(orderBy)){ - orderBy=orderBy.substring(1); - } - } - - } - return orderBy; - } - /** - * @Title: replaceOrderBy - * @Description: 去掉orderBy中的desc和asc - * @param @param str - * @param @return - * @return Map 返回类型 - * @author (DDM) - * @version V1.0 - */ - public static String replaceOrderBy(String str){ - if(!StringUtil.isBlank(str)){ - str=str.trim(); - str=str.replace(" asc",""); - str=str.replace(" ASC",""); - str=str.replace(" DESC",""); - str=str.replace(" desc",""); - str=str.trim(); - } - return str; - } +// /** +// * 获取 Spring data JPA 分页对象 +// */ +// public Pageable getSpringPage(){ +// List orders = new ArrayList(); +// if (orderBy!=null){ +// for (String order : StringUtils.split(orderBy, ",")){ +// String[] o = StringUtils.split(order, " "); +// if (o.length==1){ +// orders.add(new Order(Direction.ASC, o[0])); +// }else if (o.length==2){ +// if ("DESC".equals(o[1].toUpperCase())){ +// orders.add(new Order(Direction.DESC, o[0])); +// }else{ +// orders.add(new Order(Direction.ASC, o[0])); +// } +// } +// } +// } +// return new PageRequest(this.pageNo - 1, this.pageSize, new Sort(orders)); +// } +// +// /** +// * 设置 Spring data JPA 分页对象,转换为本系统分页对象 +// */ +// public void setSpringPage(org.springframework.data.domain.Page page){ +// this.pageNo = page.getNumber(); +// this.pageSize = page.getSize(); +// this.count = page.getTotalElements(); +// this.list = page.getContent(); +// } + } diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index 1ebdd3b7b..d9e85751c 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -6,6 +6,8 @@ import com.google.gson.GsonBuilder; public final class Constants { + public static final int CFG_PAGE = 0; + public static final int AUDIT_PAGE = 1; public static final String DEFAULT_CAPTCHA_PARAM = "captcha"; public static final String DEFAULT_MOBILE_PARAM = "mobileLogin"; public static final String DEFAULT_MESSAGE_PARAM = "message"; diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index f38414a09..a0266aa58 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -1,5 +1,4 @@ package com.nis.web.controller; - import java.beans.PropertyEditorSupport; import java.io.IOException; import java.util.Date; diff --git a/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java index 3ff4618c0..e45d0055b 100644 --- a/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ComplexStringCfgController.java @@ -1,5 +1,4 @@ package com.nis.web.controller.configuration; - import java.util.Date; import java.util.List; @@ -31,8 +30,9 @@ import com.nis.web.controller.BaseController; public class ComplexStringCfgController extends BaseController{ @RequestMapping(value = {"list"}) - public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) { + public String cfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")ComplexkeywordCfg cfg,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", audit); if(cfg!=null){ Integer serviceId=cfg.getServiceId(); logger.info("servcice id is "+serviceId); @@ -44,14 +44,7 @@ public class ComplexStringCfgController extends BaseController{ if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); cfg.setTableName(tableName); - Page searchPage=new Page(request, response, 1); - if(pageNo!=null) searchPage.setPageNo(pageNo); - if(pageSize!=null) searchPage.setPageSize(pageSize); - if(cfg.getPage()!=null){ - if(!StringUtils.isBlank(cfg.getPage().getOrderBy())); - searchPage.setOrderBy(cfg.getPage().getOrderBy()); - } - Page page = complexStringCfgService.findPage(searchPage, cfg); + Page page = complexStringCfgService.findPage(new Page(request, response), cfg); model.addAttribute("page", page); model.addAttribute("action", cfg.getAction()); model.addAttribute("tableName", tableName); @@ -79,6 +72,7 @@ public class ComplexStringCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("serviceId", serviceId); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("sercice id is "+serviceId); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); @@ -126,6 +120,7 @@ public class ComplexStringCfgController extends BaseController{ model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); model.addAttribute("tableName", tableName); + model.addAttribute("audit", Constants.CFG_PAGE); if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); ComplexkeywordCfg searchBean=new ComplexkeywordCfg(); @@ -183,6 +178,7 @@ public class ComplexStringCfgController extends BaseController{ public String saveOrUpdateStringCfg(String cfgName,Model model, ComplexkeywordCfg cfg) { model.addAttribute("cfgName",cfgName); model.addAttribute("cfgType","complex"); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("saveOrUpdateStringCfg loaded"); if(cfg==null){ logger.error("无法保存空的配置!"); @@ -253,6 +249,7 @@ public class ComplexStringCfgController extends BaseController{ @RequestMapping(value = {"auditCfg"}) public String auditStringCfg(String cfgName,ComplexkeywordCfg cfg,Model model) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", Constants.AUDIT_PAGE); if(cfg==null){ logger.error("无法审核空的配置!"); }else if(!StringUtils.isBlank(cfg.getTableName())){ @@ -269,6 +266,8 @@ public class ComplexStringCfgController extends BaseController{ cfg.setIsValid(Constants.VALID_YES); } int result=complexStringCfgService.auditStringCfg(cfg); + model.addAttribute("serviceId", cfg.getServiceId()); + model.addAttribute("action", cfg.getAction()); } }else if(cfg.getServiceId()!=null){ @@ -291,13 +290,15 @@ public class ComplexStringCfgController extends BaseController{ cfg.setIsValid(Constants.VALID_YES); } int result=complexStringCfgService.auditStringCfg(cfg); + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", cfg.getAction()); } } } }else{ logger.error("无法确定IP配置的表名!"); } - return "redirect:" + adminPath + "/cfg/complex/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName; + return "redirect:" + adminPath + "/cfg/complex/list"; } /** * @@ -314,6 +315,7 @@ public class ComplexStringCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("cfgType","complex"); + model.addAttribute("audit", Constants.CFG_PAGE); if(!StringUtils.isBlank(tableName)){ int audit=complexStringCfgService.getIsAudit(tableName,cfgId); //未审核时可删除 diff --git a/src/main/java/com/nis/web/controller/configuration/IpCfgController.java b/src/main/java/com/nis/web/controller/configuration/IpCfgController.java index 29b3a7003..f27551554 100644 --- a/src/main/java/com/nis/web/controller/configuration/IpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/IpCfgController.java @@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -28,21 +29,27 @@ import com.nis.web.controller.BaseController; @Controller @RequestMapping("${adminPath}/cfg/ip") public class IpCfgController extends BaseController{ - - @RequestMapping(value = {"ipWhiteList"}) - public String ipWhiteList(Model model,BaseIpCfg baseIpCfg,HttpServletRequest request,HttpServletResponse response) { - return "/cfg/ipWhiteList"; - } - - - @RequestMapping(value = {"ipWhiteForm"}) - public String ipWhiteForm() { - return "/cfg/ipWhiteForm"; - } - + /** + * + * ipCfgList(配置列表与审核列表,需要根据参数判断是哪个列表,以便显示隐藏对应的界面菜单,按钮) + * (这里描述这个方法适用条件 – 可选) + * @param model + * @param audit + * @param pageNo + * @param pageSize + * @param cfgName + * @param ipCfg + * @param request + * @param response + * @return + *String + * @exception + * @since 1.0.0 + */ @RequestMapping(value = {"list"}) - public String ipCfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) { + public String ipCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("ipCfg")BaseIpCfg ipCfg,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", audit); if(ipCfg!=null){ Integer serviceId=ipCfg.getServiceId(); logger.info("servcice id is "+serviceId); @@ -54,14 +61,7 @@ public class IpCfgController extends BaseController{ if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); ipCfg.setTableName(tableName); - Page searchPage=new Page(request, response, 1); - if(pageNo!=null) searchPage.setPageNo(pageNo); - if(pageSize!=null) searchPage.setPageSize(pageSize); - if(ipCfg.getPage()!=null){ - if(!StringUtils.isBlank(ipCfg.getPage().getOrderBy())); - searchPage.setOrderBy(ipCfg.getPage().getOrderBy()); - } - Page page = ipCfgService.findPage(searchPage, ipCfg); + Page page = ipCfgService.findPage(new Page(request,response), ipCfg); model.addAttribute("page", page); model.addAttribute("action", ipCfg.getAction()); model.addAttribute("tableName", tableName); @@ -83,12 +83,27 @@ public class IpCfgController extends BaseController{ return "/cfg/ipCfgList"; } - + /** + * + * ipCfgForm(新增页面初始化,只会在配置界面使用) + * (这里描述这个方法适用条件 – 可选) + * @param action + * @param cfgName + * @param serviceId + * @param model + * @param request + * @param response + * @return + *String + * @exception + * @since 1.0.0 + */ @RequestMapping(value = {"form"}) public String ipCfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("sercice id is "+serviceId); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); @@ -131,11 +146,30 @@ public class IpCfgController extends BaseController{ return "/cfg/ipCfgForm"; } + /** + * + * updateIpCfgForm(更新配置页面初始化,只会在配置界面出现) + * (这里描述这个方法适用条件 – 可选) + * @param tableName + * @param action + * @param cfgId + * @param cfgName + * @param serviceId + * @param model + * @param request + * @param response + * @return + *String + * @exception + * @since 1.0.0 + */ + @RequiresPermissions("sys:cfg:edit") @RequestMapping(value = {"updateForm"}) public String updateIpCfgForm(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); + model.addAttribute("audit",Constants.CFG_PAGE); if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); BaseIpCfg searchBean=new BaseIpCfg(); @@ -184,7 +218,7 @@ public class IpCfgController extends BaseController{ /** * - * addIpCfg(新增IP配置) + * addIpCfg(新增IP配置,后台保存方法) * (这里描述这个方法适用条件 – 可选) * @return *String @@ -195,6 +229,7 @@ public class IpCfgController extends BaseController{ public String saveOrUpdateIpCfg(String cfgName,Model model, BaseIpCfg ipCfg) { model.addAttribute("cfgName",cfgName); model.addAttribute("cfgType", "ip"); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("saveOrUpdateIpCfg loaded"); if(ipCfg==null){ logger.error("无法保存空的配置!"); @@ -255,7 +290,7 @@ public class IpCfgController extends BaseController{ /** * * auditIpCfg(审核IP配置) - * (这里描述这个方法适用条件 – 可选) + * (审核流程只在审核页面) * @return *String * @exception @@ -264,6 +299,7 @@ public class IpCfgController extends BaseController{ @RequestMapping(value = {"auditCfg"}) public String auditIpCfg(String cfgName,BaseIpCfg ipCfg,Model model) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", Constants.AUDIT_PAGE); if(ipCfg==null){ logger.error("无法审核空的配置!"); }else if(!StringUtils.isBlank(ipCfg.getTableName())){ @@ -280,6 +316,8 @@ public class IpCfgController extends BaseController{ ipCfg.setIsValid(Constants.VALID_YES); } int result=ipCfgService.auditIpCfg(ipCfg); + model.addAttribute("serviceId", ipCfg.getServiceId()); + model.addAttribute("action", ipCfg.getAction()); } }else if(ipCfg.getServiceId()!=null){ int serviceId=ipCfg.getServiceId(); @@ -301,14 +339,15 @@ public class IpCfgController extends BaseController{ ipCfg.setIsValid(Constants.VALID_YES); } int result=ipCfgService.auditIpCfg(ipCfg); - + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", ipCfg.getAction()); } } } }else{ logger.error("无法确定IP配置的表名!"); } - return "redirect:" + adminPath + "/cfg/ip/list?serviceId="+ipCfg.getServiceId()+"&action="+ipCfg.getAction()+"&cfgName"+cfgName; + return "redirect:" + adminPath + "/cfg/ip/list"; } /** * @@ -319,12 +358,14 @@ public class IpCfgController extends BaseController{ * @exception * @since 1.0.0 */ + @RequiresPermissions("sys:cfg:edit") @RequestMapping(value = {"deleteCfg"}) public String deleteIpCfg(String tableName,int action,long cfgId,String cfgName,Integer serviceId,Model model) { model.addAttribute("cfgName", cfgName); model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); model.addAttribute("cfgType", "ip"); + model.addAttribute("audit", Constants.AUDIT_PAGE); if(!StringUtils.isBlank(tableName)){ int audit=ipCfgService.getIsAudit(tableName,cfgId); //未审核时可删除 diff --git a/src/main/java/com/nis/web/controller/configuration/NumCfgController.java b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java index 32ad4c922..226263b6c 100644 --- a/src/main/java/com/nis/web/controller/configuration/NumCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/NumCfgController.java @@ -1,5 +1,4 @@ package com.nis.web.controller.configuration; - import java.util.Date; import java.util.List; @@ -31,8 +30,9 @@ import com.nis.web.controller.BaseController; public class NumCfgController extends BaseController{ @RequestMapping(value = {"list"}) - public String cfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")NumBoundaryCfg cfg,HttpServletRequest request,HttpServletResponse response) { + public String cfgList(Model model,Integer audit,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")NumBoundaryCfg cfg,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", audit); if(cfg!=null){ Integer serviceId=cfg.getServiceId(); logger.info("servcice id is "+serviceId); @@ -73,6 +73,7 @@ public class NumCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("serviceId", serviceId); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("sercice id is "+serviceId); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); @@ -102,6 +103,7 @@ public class NumCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); + model.addAttribute("audit", Constants.CFG_PAGE); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); if(serviceConfigInfo!=null){ @@ -139,6 +141,7 @@ public class NumCfgController extends BaseController{ public String saveOrUpdateStringCfg(String cfgName,Model model, NumBoundaryCfg cfg) { model.addAttribute("cfgName",cfgName); model.addAttribute("cfgType","num"); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("saveOrUpdateStringCfg loaded"); if(cfg==null){ logger.error("无法保存空的配置!"); @@ -185,6 +188,7 @@ public class NumCfgController extends BaseController{ @RequestMapping(value = {"auditCfg"}) public String auditStringCfg(String cfgName,NumBoundaryCfg cfg,Model model) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", Constants.AUDIT_PAGE); if(cfg==null){ logger.error("无法审核空的配置!"); }else if(cfg.getServiceId()!=null){ @@ -204,12 +208,14 @@ public class NumCfgController extends BaseController{ cfg.setIsValid(Constants.VALID_YES); } int result=numCfgService.auditNumCfg(cfg); + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", cfg.getAction()); } } }else{ logger.error("无法确定IP配置的表名!"); } - return "redirect:" + adminPath + "/cfg/num/list?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName"+cfgName; + return "redirect:" + adminPath + "/cfg/num/list"; } /** * @@ -226,6 +232,7 @@ public class NumCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("cfgType","num"); + model.addAttribute("audit", Constants.CFG_PAGE); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); if(serviceConfigInfo!=null){ diff --git a/src/main/java/com/nis/web/controller/configuration/RequestInfoController.java b/src/main/java/com/nis/web/controller/configuration/RequestInfoController.java index 7a945c4a8..d21b50a03 100644 --- a/src/main/java/com/nis/web/controller/configuration/RequestInfoController.java +++ b/src/main/java/com/nis/web/controller/configuration/RequestInfoController.java @@ -95,7 +95,7 @@ public class RequestInfoController extends BaseController{ } /** - * 审核 + * 审核通过 * @param requestInfo * @param model * @return @@ -107,6 +107,19 @@ public class RequestInfoController extends BaseController{ return "redirect:" + adminPath + "/cfg/request/list?repage"; } + /** + * 审核未通过 + * @param requestInfo + * @param model + * @return + */ + @RequestMapping(value = "requestExamineNo") + public String requestExamineNo(RequestInfo requestInfo, Model model,RedirectAttributes redirectAttributes){ + requestInfoService.requestExamineNo(requestInfo); + addMessage(redirectAttributes, "success"); + return "redirect:" + adminPath + "/cfg/request/list?repage"; + + } /** * 取消审核 * @param requestInfo diff --git a/src/main/java/com/nis/web/controller/configuration/StringCfgController.java b/src/main/java/com/nis/web/controller/configuration/StringCfgController.java index e788bd1ee..fbd83d76c 100644 --- a/src/main/java/com/nis/web/controller/configuration/StringCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/StringCfgController.java @@ -1,5 +1,4 @@ package com.nis.web.controller.configuration; - import java.util.Date; import java.util.List; @@ -31,8 +30,9 @@ import com.nis.web.controller.BaseController; public class StringCfgController extends BaseController{ @RequestMapping(value = {"list"}) - public String stringCfgList(Model model,Integer pageNo,Integer pageSize,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) { + public String stringCfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")BaseStringCfg stringCfg,HttpServletRequest request,HttpServletResponse response) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", audit); if(stringCfg!=null){ Integer serviceId=stringCfg.getServiceId(); logger.info("servcice id is "+serviceId); @@ -44,14 +44,7 @@ public class StringCfgController extends BaseController{ if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); stringCfg.setTableName(tableName); - Page searchPage=new Page(request, response, 1); - if(pageNo!=null) searchPage.setPageNo(pageNo); - if(pageSize!=null) searchPage.setPageSize(pageSize); - if(stringCfg.getPage()!=null){ - if(!StringUtils.isBlank(stringCfg.getPage().getOrderBy())); - searchPage.setOrderBy(stringCfg.getPage().getOrderBy()); - } - Page page = stringCfgService.findPage(searchPage, stringCfg); + Page page = stringCfgService.findPage(new Page(request,response), stringCfg); model.addAttribute("page", page); model.addAttribute("action", stringCfg.getAction()); model.addAttribute("tableName", tableName); @@ -79,6 +72,7 @@ public class StringCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("serviceId", serviceId); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("sercice id is "+serviceId); if(serviceId!=null){ ServiceConfigInfo serviceConfigInfo=serviceConfigInfoService.findSysServiceConfigInfo(serviceId); @@ -126,6 +120,7 @@ public class StringCfgController extends BaseController{ model.addAttribute("serviceId", serviceId); model.addAttribute("action", action); model.addAttribute("tableName", tableName); + model.addAttribute("audit", Constants.CFG_PAGE); if(!StringUtils.isBlank(tableName)){ logger.info("table name is "+tableName); BaseStringCfg searchBean=new BaseStringCfg(); @@ -183,6 +178,7 @@ public class StringCfgController extends BaseController{ public String saveOrUpdateStringCfg(String cfgName,Model model, BaseStringCfg stringCfg) { model.addAttribute("cfgName",cfgName); model.addAttribute("cfgType","string"); + model.addAttribute("audit", Constants.CFG_PAGE); logger.info("saveOrUpdateStringCfg loaded"); if(stringCfg==null){ logger.error("无法保存空的配置!"); @@ -253,6 +249,7 @@ public class StringCfgController extends BaseController{ @RequestMapping(value = {"auditCfg"}) public String auditStringCfg(String cfgName,BaseStringCfg stringCfg,Model model) { model.addAttribute("cfgName", cfgName); + model.addAttribute("audit", Constants.AUDIT_PAGE); if(stringCfg==null){ logger.error("无法审核空的配置!"); }else if(!StringUtils.isBlank(stringCfg.getTableName())){ @@ -269,6 +266,8 @@ public class StringCfgController extends BaseController{ stringCfg.setIsValid(Constants.VALID_YES); } int result=stringCfgService.auditStringCfg(stringCfg); + model.addAttribute("serviceId", stringCfg.getServiceId()); + model.addAttribute("action", stringCfg.getAction()); } }else if(stringCfg.getServiceId()!=null){ @@ -291,13 +290,15 @@ public class StringCfgController extends BaseController{ stringCfg.setIsValid(Constants.VALID_YES); } int result=stringCfgService.auditStringCfg(stringCfg); + model.addAttribute("serviceId", serviceId); + model.addAttribute("action", stringCfg.getAction()); } } } }else{ logger.error("无法确定IP配置的表名!"); } - return "redirect:" + adminPath + "/cfg/string/list?serviceId="+stringCfg.getServiceId()+"&action="+stringCfg.getAction()+"&cfgName"+cfgName; + return "redirect:" + adminPath + "/cfg/string/list"; } /** * @@ -314,6 +315,7 @@ public class StringCfgController extends BaseController{ model.addAttribute("cfgName", cfgName); model.addAttribute("action", action); model.addAttribute("cfgType","string"); + model.addAttribute("audit", Constants.CFG_PAGE); if(!StringUtils.isBlank(tableName)){ int audit=stringCfgService.getIsAudit(tableName,cfgId); //未审核时可删除 diff --git a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml index fa5903350..d783f0415 100644 --- a/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/ServiceDictInfoDao.xml @@ -29,7 +29,15 @@ - + + + + + + + + + s.service_dict_id AS serviceDictId, s.item_type AS itemType, @@ -44,6 +52,16 @@ s.editor_id AS "serviceDictEditor.id", s.edit_time AS editTime + + s.service_dict_id AS serviceDictId, + s.item_type AS itemType, + s.item_code AS itemCode, + s.item_value AS itemValue, + s.item_desc AS itemDesc, + s.parent_id AS "parent.serviceDictId", + s.is_leaf AS isLeaf, + s.is_valid AS isValid + @@ -260,14 +278,14 @@ UPDATE service_dict_info s set s.is_valid = #{isValid} where s.service_dict_id = #{serviceDictId} - select - + from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType} and s.is_valid=#{isValid}; - select - + from service_dict_info s where s.is_leaf = 0 and s.item_type=#{itemType}; diff --git a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml index ebba82df0..f086ae03c 100644 --- a/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/ComplexStringCfgDao.xml @@ -166,9 +166,9 @@ left join sys_user e on r.editor_id=e.id left join sys_user u on r.auditor_id=u.id left join request_info ri on r.request_id=ri.id - left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0 - left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0 - left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0 + left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0 + left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0 + left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0 diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index 9985f2618..378602ec9 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -246,9 +246,9 @@ left join sys_user e on r.editor_id=e.id left join sys_user u on r.auditor_id=u.id left join request_info ri on r.request_id=ri.id - left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0 - left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0 - left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0 + left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0 + left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0 + left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0 diff --git a/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml index 5795c36d3..4a548e9c8 100644 --- a/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/NumCfgDao.xml @@ -169,9 +169,9 @@ left join sys_user e on r.editor_id=e.id left join sys_user u on r.auditor_id=u.id left join request_info ri on r.request_id=ri.id - left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0 - left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0 - left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0 + left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0 + left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0 + left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0 diff --git a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml index f0cb73683..b6e514217 100644 --- a/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/RequestInfoDao.xml @@ -162,5 +162,9 @@ where id = #{id,jdbcType=BIGINT} and is_audit !=1 - + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/ServiceDictInfoDao.xml b/src/main/java/com/nis/web/dao/configuration/ServiceDictInfoDao.xml deleted file mode 100644 index 2e20d46fd..000000000 --- a/src/main/java/com/nis/web/dao/configuration/ServiceDictInfoDao.xml +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - s.service_dict_id AS serviceDictId, - s.item_type AS itemType, - s.item_code AS itemCode, - s.item_value AS itemValue, - s.item_desc AS itemDesc, - s.parent_id AS "parent.serviceDictId", - s.is_leaf AS isLeaf, - s.is_valid AS isValid, - s.creator_id AS "serviceDictCreator.id", - s.create_time AS createTime, - s.editor_id AS "serviceDictEditor.id", - s.edit_time AS editTime - - - s.service_dict_id AS serviceDictId, - s.item_type AS itemType, - s.item_code AS itemCode, - s.item_value AS itemValue, - s.item_desc AS itemDesc, - s.is_leaf AS isLeaf, - s.is_valid AS isValid - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - insert into service_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, is_valid, creator_id, create_time, editor_id, edit_time) - values ( #{itemType,jdbcType=INTEGER}, #{itemCode,jdbcType=INTEGER}, - #{itemValue,jdbcType=VARCHAR}, #{itemDesc,jdbcType=VARCHAR}, - #{parent.serviceDictId,jdbcType=INTEGER}, #{isLeaf,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER}, - #{serviceDictCreator.id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, - #{serviceDictEditor.id,jdbcType=INTEGER}, #{editTime,jdbcType=TIMESTAMP}) - - - - - - - UPDATE service_dict_info s SET - s.service_dict_id = #{serviceDictId}, - s.item_type = #{itemType}, - s.item_code = #{itemCode}, - s.item_value = #{itemValue}, - s.item_desc = #{itemDesc}, - s.parent_id = #{parent.serviceDictId}, - s.is_leaf = #{isLeaf}, - s.creator_id = #{serviceDictCreator.id}, - s.editor_id = #{serviceDictEditor.id}, - s.edit_time = #{editTime} - WHERE s.service_dict_id = #{serviceDictId} - - - - - - UPDATE service_dict_info s set s.is_valid = #{isValid} where s.service_dict_id = #{serviceDictId} - - - - - - - LEFT JOIN service_dict_info p ON p.service_dict_id = s.parent_id - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml index 6f681d522..36afe76a7 100644 --- a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml @@ -185,9 +185,9 @@ left join sys_user e on r.editor_id=e.id left join sys_user u on r.auditor_id=u.id left join request_info ri on r.request_id=ri.id - left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_valid=1 and sdic.is_leaf=0 - left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_valid=1 and sdia.is_leaf=0 - left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_valid=1 and sdil.is_leaf=0 + left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0 + left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=1 and sdia.is_leaf=0 + left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=1 and sdil.is_leaf=0 diff --git a/src/main/java/com/nis/web/security/FormAuthenticationFilter.java b/src/main/java/com/nis/web/security/FormAuthenticationFilter.java index cbe2f0d8d..b6f2c326f 100644 --- a/src/main/java/com/nis/web/security/FormAuthenticationFilter.java +++ b/src/main/java/com/nis/web/security/FormAuthenticationFilter.java @@ -74,14 +74,14 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc. String className = e.getClass().getName(), message = ""; if (IncorrectCredentialsException.class.getName().equals(className) || UnknownAccountException.class.getName().equals(className)){ - message = "用户或密码错误, 请重试."; + message = "loginName_error"; } else if (e.getMessage() != null && StringUtils.startsWith(e.getMessage(), "msg:")){ message = StringUtils.replace(e.getMessage(), "msg:", ""); } else{ - message = "系统出现点问题,请稍后再试!"; + message = "system_error"; e.printStackTrace(); // 输出到控制台 } request.setAttribute(getFailureKeyAttribute(), className); diff --git a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java index 01d98d236..fe2e0f119 100644 --- a/src/main/java/com/nis/web/service/configuration/RequestInfoService.java +++ b/src/main/java/com/nis/web/service/configuration/RequestInfoService.java @@ -67,6 +67,11 @@ public class RequestInfoService extends BaseService{ requestInfoDao.update(requestInfo); } @Transactional(readOnly=false,rollbackFor=DataAccessException.class) + public void requestExamineNo(RequestInfo requestInfo){ + requestInfo.setIsAudit(2);//审核未通过 + requestInfoDao.update(requestInfo); + } + @Transactional(readOnly=false,rollbackFor=DataAccessException.class) public void requestCancelExamine(RequestInfo requestInfo){ requestInfo.setIsAudit(3);//取消审核通过 int update = requestInfoDao.update(requestInfo); diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 15f8935b9..391786e73 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -97,14 +97,14 @@ service_dict_id=servicedictid item_type=itemtype item_code=itemcode item_value=itemvalue -desc=desc +desc=description parent_id=parentid -is_leaf=isleaf -is_valid=isvalid -creator_id=creatorid +is_leaf=whether subnode +is_valid=whether valid create_time=createtime -editor_id=editorid edit_time=edittime +superior_config=superior configuration +config_content=configuration content #============yewu end====================== @@ -142,11 +142,16 @@ date_list=Date List confirm_message=Are you sure? fill_loginName=Please fill in the loginName fill_loginPassWord=Please fill in the passWord +loginName_error=loginName and password error,please try again. +system_error=system error,please try again later! save_success=save success save_failed=save failed delete_success=delete success delete_failed=delete failed turning_page=It is turning to the page +login_timeout=No login or login timeout,please login again,Thank you! +captcha_error=captcha error +enter_captcha=Please enter the captcha #==========message end===================== #==========yewuliexingguanli begin===================== @@ -178,4 +183,71 @@ datebase_table=datebase table fill_all=fill in all describe=describe back=back -#==========yewuliexingguanli end===================== \ No newline at end of file +#==========yewuliexingguanli end===================== + +#==========youjianguankong begin===================== +sort=sort +createTime_asc=order by createTime asc +createTime_desc=order by createTime desc +editTime_asc=order by editTime asc +editTime_desc=order by editTime desc +auditTime_asc=order by auditTime asc +auditTime_desc=order by auditTime desc +config_describe=configuration description +match_area=matching area +key_word=key word +block_type=block type +letter=letter +whether_area_block=whether area block +label=label +attribute=attribute +valid_identifier=valid identifier +is_audit=whether audit +creator=creator +config_time=configuration time +editor=editor +edit_time=edit time +auditor=auditor +audit_time=audit time +yes=yes +no=no +deleted=deleted +cancel_approved=cancel approved + +#==========youjianguankong end===================== + +#==========guankongbaimingdan begin===================== +client_ip=client ip +server_ip=server ip +client_port=client port +client_port_mask=client port mask +client_address_mask=client address mask +server_port=server port +server_port_mask=server port mask +server_address_mask=server address mask +block_addr=block address +block_domain=block domain +block_url=block url +configuration=configuration +direction=direction +protocol=protocol +oneway=oneway +twoway=twoway +arbitrary=arbitrary +basic_config=basic configuration +block_config=block configuration +expression_type=expression type +null=null +and=& +match_method=match method +substring_match=substring match +right_match=right match +left_match=left match +exactly_match=exactly match +whether_hexbinary=whether HEX binary +hex_binary=HEX binary +case_insensitive_nohex=case insensitive and no hex +case_sensitive_nohex=case sensitive and no hex +area_effect_id=area effect id +ip_type=ip type +#==========guankongbaimingdan end===================== \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 27ecad3b5..6ecf429d5 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -95,16 +95,17 @@ system_service_manage=\u7cfb\u7edf\u4e1a\u52a1\u7c7b\u578b\u7ba1\u7406 #==========yewu zidian begin===================== service_dict_id=\u5b57\u5178ID item_type=\u6570\u636e\u7c7b\u578b -item_code=\u7f16\u7801 +item_code=\u914d\u7f6e\u7f16\u7801 item_value=\u7f16\u7801\u5bf9\u5e94\u503c desc=\u63cf\u8ff0\u4fe1\u606f parent_id=\u7236ID is_leaf=\u662f\u5426\u53f6\u5b50\u8282\u70b9 is_valid=\u6709\u6548\u6807\u5fd7 -creator_id=\u521b\u5efa\u4eba\u5458 create_time=\u914d\u7f6e\u65f6\u95f4 -editor_id=\u4fee\u6539\u4eba\u5458 edit_time=\u4fee\u6539\u65f6\u95f4 +superior_config=\u4e0a\u7ea7\u914d\u7f6e +config_content=\u914d\u7f6e\u5185\u5bb9 + #==========yewu zidian end===================== #==========laihan begin===================== @@ -115,7 +116,7 @@ state=\u72b6\u6001 created=\u672a\u5ba1\u6838 examine=\u5ba1\u6838 unapproved=\u672a\u901a\u8fc7 -approved=\u5df2\u901a\u8fc7 +approved=\u901a\u8fc7 title=\u6807\u9898 request_time=\u6765\u51fd\u65f6\u95f4 operate_time=\u64cd\u4f5c\u65f6\u95f4 @@ -131,7 +132,7 @@ begin_date=\u5f00\u59cb\u65f6\u95f4 end_date=\u7ed3\u675f\u65f6\u95f4 delete=\u5220\u9664 special_task=\u4e13\u9879\u4efb\u52a1 -#==========yewu zidian end===================== +#==========laihan end===================== #==========message begin===================== required=\u4e0d\u80fd\u4e3a\u7a7a! @@ -141,11 +142,15 @@ confirm_message=\u786e\u5b9a\u5417\uff1f fill_loginName=\u8bf7\u586b\u5199\u767b\u5f55\u8d26\u53f7 fill_loginPassWord=\u8bf7\u586b\u5199\u767b\u5f55\u5bc6\u7801 loginName_error=\u7528\u6237\u6216\u5bc6\u7801\u9519\u8bef, \u8bf7\u91cd\u8bd5. +system_error=\u7cfb\u7edf\u51fa\u73b0\u70b9\u95ee\u9898\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01 save_success=\u4fdd\u5b58\u6210\u529f save_failed=\u4fdd\u5b58\u5931\u8d25 delete_success=\u5220\u9664\u6210\u529f delete_failed=\u5220\u9664\u5931\u8d25 turning_page=\u6b63\u5728\u4e3a\u60a8\u8df3\u8f6c\u9875\u9762 +login_timeout=\u672a\u767b\u5f55\u6216\u767b\u5f55\u8d85\u65f6,\u8bf7\u91cd\u65b0\u767b\u5f55,\u8c22\u8c22! +captcha_error=\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e +enter_captcha=\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801 #==========message end===================== #==========yewuliexingguanli begin===================== @@ -177,4 +182,71 @@ datebase_table=\u6570\u636e\u5e93\u8868 fill_all=\u8bf7\u586b\u5199\u6240\u6709\u5b57\u6bb5 describe=\u63cf\u8ff0 back=\u8fd4\u56de -#==========yewuliexingguanli end===================== \ No newline at end of file +#==========yewuliexingguanli end===================== + +#==========youjianguankong begin===================== +sort=\u6392\u5e8f +createTime_asc=\u6309\u521b\u5efa\u65f6\u95f4\u987a\u5e8f +createTime_desc=\u6309\u521b\u5efa\u65f6\u95f4\u5012\u5e8f +editTime_asc=\u6309\u4fee\u6539\u65f6\u95f4\u987a\u5e8f +editTime_desc=\u6309\u4fee\u6539\u65f6\u95f4\u5012\u5e8f +auditTime_asc=\u6309\u5ba1\u6838\u65f6\u95f4\u987a\u5e8f +auditTime_desc=\u6309\u5ba1\u6838\u65f6\u95f4\u5012\u5e8f +config_describe=\u914d\u7f6e\u63cf\u8ff0 +match_area=\u5339\u914d\u533a\u57df +key_word=\u5173\u952e\u5b57 +block_type=\u7ba1\u63a7\u7c7b\u578b +letter=\u6765\u51fd +whether_area_block=\u662f\u5426\u533a\u57df\u7ba1\u63a7 +label=\u6807\u7b7e +attribute=\u6027\u8d28 +valid_identifier=\u6709\u6548\u6807\u8bc6 +is_audit=\u662f\u5426\u5ba1\u6838 +creator=\u521b\u5efa\u4eba\u5458 +config_time=\u914d\u7f6e\u65f6\u95f4 +editor=\u4fee\u6539\u4eba\u5458 +edit_time=\u4fee\u6539\u65f6\u95f4 +auditor=\u5ba1\u6838\u4eba\u5458 +audit_time=\u5ba1\u6838\u65f6\u95f4 +yes=\u662f +no=\u5426 +deleted=\u5df2\u5220\u9664 +cancel_approved=\u53d6\u6d88\u5ba1\u6838\u901a\u8fc7 + +#==========youjianguankong end===================== + +#==========guankongbaimingdan begin===================== +client_ip=\u6e90IP +server_ip=\u76ee\u7684IP +client_port=\u6e90\u7aef\u53e3 +client_port_mask=\u6e90\u7aef\u53e3\u63a9\u7801 +client_address_mask=\u6e90\u5730\u5740\u63a9\u7801 +server_port=\u76ee\u7684\u7aef\u53e3 +server_port_mask=\u76ee\u7684\u7aef\u53e3\u63a9\u7801 +server_address_mask=\u76ee\u7684\u5730\u5740\u63a9\u7801 +block_addr=\u7ba1\u63a7\u5730\u5740 +block_domain=\u7ba1\u63a7\u57df\u540d +block_url=\u5c01\u5835\u8def\u5f84 +configuration=\u914d\u7f6e +direction=\u65b9\u5411 +protocol=\u534f\u8bae +oneway=\u5355\u5411 +twoway=\u53cc\u5411 +arbitrary=\u4efb\u610f +basic_config=\u57fa\u672c\u914d\u7f6e +block_config=\u7ba1\u63a7\u914d\u7f6e +expression_type=\u8868\u8fbe\u5f0f\u7c7b\u578b +null=\u65e0\u8868\u8fbe\u5f0f +and=\u4e0e\u8868\u8fbe\u5f0f +match_method=\u5339\u914d\u65b9\u5f0f +substring_match=\u5b50\u4e32\u5339\u914d +right_match=\u53f3\u5339\u914d +left_match=\u5de6\u5339\u914d +exactly_match=\u5b8c\u5168\u5339\u914d +whether_hexbinary=\u662f\u5426hex\u4e8c\u8fdb\u5236 +hex_binary=HEX\u683c\u5f0f\u4e8c\u8fdb\u5236 +case_insensitive_nohex=\u5927\u5c0f\u5199\u4e0d\u654f\u611f\uff0c\u4e14\u975eHEX +case_sensitive_nohex=\u5927\u5c0f\u5199\u654f\u611f\uff0c\u4e14\u975eHEX +area_effect_id=\u533a\u57df\u751f\u6548id +ip_type=ip\u7c7b\u578b +#==========guankongbaimingdan end===================== \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp index 73b15b9dd..c95b9f089 100644 --- a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp @@ -1,13 +1,13 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> -

    基本配置

    +

    - -
    - data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control">
    +
    - -
    - > + @@ -54,9 +56,9 @@
    - -
    - > @@ -78,9 +80,9 @@
    - -
    - > @@ -108,7 +110,7 @@
    -
    +
    +
    - +
    @@ -22,7 +23,7 @@
    - +
    @@ -47,17 +48,17 @@
    --%>
    - +
    <%-- --%>
    @@ -67,30 +68,30 @@
    - +
    - +
    - > + + + +
    @@ -99,19 +100,19 @@
    - +
    - > + + +
    - +
    diff --git a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp index 315838877..56e83b668 100644 --- a/src/main/webapp/WEB-INF/include/form/ipInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/ipInfo.jsp @@ -1,124 +1,136 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> -

    管控配置

    +

    - -
    - + +
    +
    +
    -
    - -
    - >
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    + +
    +
    - -
    - > <%-- --%>
    +
    - -
    - > - + <%-- --%>
    +
    @@ -126,15 +138,15 @@
    -
    +
    - -
    +
    +
    checked - >是 + > <%-- --%>
    +
    - -
    + +
    +
    diff --git a/src/main/webapp/WEB-INF/include/form/stringInfo.jsp b/src/main/webapp/WEB-INF/include/form/stringInfo.jsp index 84ff30ca2..e805126bd 100644 --- a/src/main/webapp/WEB-INF/include/form/stringInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/stringInfo.jsp @@ -1,10 +1,10 @@ <%@ page contentType="text/html;charset=UTF-8"%> <%@ include file="/WEB-INF/include/taglib.jsp"%> -

    管控配置

    +

    - +
    @@ -12,7 +12,7 @@
    - +
    @@ -22,15 +22,15 @@
    - +
    <%-- --%>
    @@ -38,17 +38,17 @@
    - +
    <%-- --%>
    @@ -58,30 +58,30 @@
    - +
    - +
    @@ -90,19 +90,19 @@
    - +
    - > + + +
    - +
    diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index 4fbbb35d4..c9319dd98 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -141,13 +141,13 @@

    - 配置管理 +

    @@ -155,7 +155,7 @@
    - 配置${not empty serviceDictInfo.serviceDictId?'修改':'添加'}查看
    + ${not empty serviceDictInfo.serviceDictId?'修改':'添加'}
    <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> @@ -81,8 +77,8 @@ $(function(){
    - - + +
    diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp index 46fd5ccb1..72030fa79 100644 --- a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp @@ -5,6 +5,20 @@ <spring:message code="${cfgName}"></spring:message> + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -78,7 +192,7 @@ $(function(){
    - +
    - 管控类型 + - 来函 + - 是否区域管控 - 分类 - 性质 - 标签 + + + + - 有效标识 - 是否审核 - 创建人员 - 配置时间 - 修改人员 - 修改时间 - 审核人员 - 审核时间 + + + + + + + + @@ -136,23 +154,30 @@ ${ipCfg.dstIpMask } ${ipCfg.dstPort } ${ipCfg.dstPortMask } - ${ipCfg.direction } - ${ipCfg.protocol } + + + + + + + + + <%-- ${ipCfg.protocolId } --%> - 阻断 - 监测 - 封堵白名单 - 监测白名单 - 封堵监测白名单 - 灰名单 + + + + + + <%-- ${ipCfg.serviceId } --%> ${ipCfg.requestName } <%-- ${ipCfg.compileId } --%> - - + + @@ -180,16 +205,16 @@ <%-- ${ipCfg.areaEffectiveIds } --%> - - - 已删除 + + + - + ${ipCfg.creatorName } @@ -202,26 +227,28 @@
    diff --git a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp index c00dc5467..a0dad7780 100644 --- a/src/main/webapp/WEB-INF/views/cfg/requestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/requestList.jsp @@ -286,4 +286,4 @@ - \ No newline at end of file + diff --git a/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp b/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp index 0c402cf91..e333e7de0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/resultPage.jsp @@ -5,7 +5,7 @@ 结果跳转页 diff --git a/src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp index 563688564..e65234c7d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/stringCfgForm.jsp @@ -5,6 +5,20 @@ <spring:message code="${cfgName}"></spring:message> + + + + + + + + + + + + + + + + + @@ -124,8 +128,8 @@ captcha: {remote: "${pageContext.request.contextPath}/validateCode"} }, messages: { - username: {required: "请填写用户名..."},password: {required: "请填写密码..."}, - captcha: {remote: "验证码不正确...", required: "请填写验证码..."} + username: {required: '...'},password: {required: '...'}, + captcha: {remote: '...', required: '...'} }, errorLabelContainer: "#messageBox", errorPlacement: function(error, element) { @@ -133,12 +137,10 @@ } }); - - // 如果在框架或在对话框中,则弹出提示并跳转到首页 if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){ - alert('未登录或登录超时。请重新登录,谢谢!'); - top.location = "${pageContext.request.contextPath }"; + alertx(""); + window.setTimeout(function () { top.location = "${pageContext.request.contextPath }"; }, 5000); } diff --git a/src/main/webapp/static/global/scripts/jeesite.js b/src/main/webapp/static/global/scripts/jeesite.js index dc7ca3281..ac6fed04b 100644 --- a/src/main/webapp/static/global/scripts/jeesite.js +++ b/src/main/webapp/static/global/scripts/jeesite.js @@ -106,7 +106,7 @@ function showTip(mess, type, timeout, lazytime){ // 显示加载框 function loading(mess){ if (mess == undefined || mess == ""){ - mess = "正在提交,请稍等..."; + mess = "OnLoading..."; } resetTip(); top.$.jBox.tip(mess,'loading',{opacity:0}); @@ -114,7 +114,7 @@ function loading(mess){ // 警告对话框 function alertx(mess, closed){ - top.$.jBox.info(mess, '提示', {closed:function(){ + top.$.jBox.info(mess, 'Waring', {closed:function(){ if (typeof closed == 'function') { closed(); } @@ -124,7 +124,7 @@ function alertx(mess, closed){ // 确认对话框 function confirmx(mess, href, closed){ - top.$.jBox.confirm(mess,'系统提示',function(v,h,f){ + top.$.jBox.confirm(mess,'System Prompt',function(v,h,f){ if(v=='ok'){ if (typeof href == 'function') { href(); @@ -147,7 +147,7 @@ function promptx(title, lable, href, closed){ top.$.jBox("", { title: title, submit: function (v, h, f){ if (f.txt == '') { - top.$.jBox.tip("请输入" + lable + "。", 'error'); + top.$.jBox.tip("Please input" + lable + "。", 'error'); return false; } if (typeof href == 'function') {