ddos下发配置动作参协议默认为空,阈值默认为0,协议不为空则阈值至少一个大于0,用户列表查询注释跟机构关联

This commit is contained in:
zhanghongqing
2018-11-30 14:07:06 +08:00
parent a4cea80688
commit 15ec139701
3 changed files with 51 additions and 27 deletions

View File

@@ -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
<!-- ,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" -->
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
<!-- 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}

View File

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

View File

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