diff --git a/src/main/java/com/nis/web/dao/UserDao.xml b/src/main/java/com/nis/web/dao/UserDao.xml index c067e91e0..c33c61d54 100644 --- a/src/main/java/com/nis/web/dao/UserDao.xml +++ b/src/main/java/com/nis/web/dao/UserDao.xml @@ -229,32 +229,32 @@ u.identity, u.email, u.create_time, - u.status, - u.company_id AS "company.id", - c.name AS "company.name", - c.parent_id AS "company.parent.id", - c.parent_ids AS "company.parentIds", - c.type AS "company.type", - c.grade AS "company.grade", - c.job_type AS "company.job_type", - u.entity_id AS "entity.id", - e.name AS "entity.name", - e.parent_id AS "entity.parent.id", - e.parent_ids AS "entity.parentIds", - e.type AS "entity.type", - e.grade AS "entity.grade", - e.job_type AS "entity.job_type", - u.office_id AS "office.id", - o.name AS "office.name", - o.parent_id AS "office.parent.id", - o.parent_ids AS "office.parentIds", - o.type AS "office.type", - o.grade AS "office.grade", - o.job_type AS "office.job_type" + u.status + + + + + + + + + + + + + + + + + + + + + from sys_user u - LEFT JOIN sys_office c ON c.id = u.company_id AND c.useable=1 - LEFT JOIN sys_office e ON e.id=u.entity_id AND e.useable=1 - LEFT JOIN sys_office o ON o.id=u.office_id AND o.useable=1 + + + WHERE u.status=#{DEL_FLAG_NORMAL} diff --git a/src/main/java/com/nis/web/service/configuration/DdosCfgService.java b/src/main/java/com/nis/web/service/configuration/DdosCfgService.java index 79a88acc4..ac538f437 100644 --- a/src/main/java/com/nis/web/service/configuration/DdosCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/DdosCfgService.java @@ -75,12 +75,14 @@ public class DdosCfgService extends BaseService{ Long ppsThreadshold = entity.getPpsThreadshold(); if(StringUtil.isBlank(antiddosProtocol)) { entity.setAntiddosProtocol(""); + entity.setBpsThreadshold(0l); + entity.setBpsThreadshold(0l); } if(bpsThreadshold==null) { entity.setBpsThreadshold(0l); } if(ppsThreadshold==null) { - entity.setPpsThreadshold(0l); + entity.setBpsThreadshold(0l); } //新增 if(entity.getCfgId()==null){ @@ -242,12 +244,14 @@ public class DdosCfgService extends BaseService{ Map umap= new HashMap(); if(StringUtil.isBlank(antiddosProtocol)) { antiddosProtocol=""; + bpsThreadshold=0l; + bpsThreadshold=0l; } if(bpsThreadshold==null) { bpsThreadshold=0l; } if(ppsThreadshold==null) { - ppsThreadshold=0l; + bpsThreadshold=0l; } umap.put("protocol", antiddosProtocol); umap.put("bps_threadshold", bpsThreadshold); diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp index 40bd5fba2..d717125e5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp @@ -9,6 +9,26 @@ $(function(){ /* $("#cancel").on("click",function(){ window.history.back(); });*/ + var ddosProtocol=$("#antiddosProtocol").val(); + if(ddosProtocol==null||ddosProtocol==""){ + $("#bpsThreadshold").attr("disabled","true"); + $("#ppsThreadshold").attr("disabled","true"); + } + $("#antiddosProtocol").on("change",function(){ + var ddosProtocol=$("#antiddosProtocol").val(); + if(ddosProtocol==null||ddosProtocol==""){ + $("#bpsThreadshold").attr("disabled","true"); + $("#ppsThreadshold").attr("disabled","true"); + $("#bpsThreadshold").val(""); + $("#bpsThreadshold").attr("placeholder","Bit Per Second"); + $("#ppsThreadshold").val(""); + $("#ppsThreadshold").attr("placeholder","Packet Per Second"); + }else{ + $("#bpsThreadshold").removeAttr("disabled"); + $("#ppsThreadshold").removeAttr("disabled"); + } + }) + $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId"));