develop

Conflicts:
	src/main/resources/messages/message_en.properties
	src/main/resources/messages/message_ru.properties
	src/main/resources/messages/message_zh_CN.properties
	拦截域名增加拦截强度
This commit is contained in:
duandongmei
2018-10-15 19:22:17 +08:00
25 changed files with 270 additions and 135 deletions

View File

@@ -26,7 +26,7 @@ public class NtcDdosLog extends BaseLogEntity<NtcDdosLog> {
@ApiModelProperty(value = "攻击累积字节数", required = true)
protected String attackTotalByte;
@ApiModelProperty(value = "攻击流量是否被丢弃", required = true)
protected Integer isBlcok;
protected Integer isBlock;
public Integer getAttackType() {
@@ -71,11 +71,11 @@ public class NtcDdosLog extends BaseLogEntity<NtcDdosLog> {
public void setAttackTotalByte(String attackTotalByte) {
this.attackTotalByte = attackTotalByte;
}
public Integer getIsBlcok() {
return isBlcok;
public Integer getIsBlock() {
return isBlock;
}
public void setIsBlcok(Integer isBlcok) {
this.isBlcok = isBlcok;
public void setIsBlock(Integer isBlock) {
this.isBlock = isBlock;
}
}

View File

@@ -24,24 +24,17 @@ import com.nis.domain.FunctionRegionDict;
import com.nis.domain.FunctionServiceDict;
import com.nis.domain.Page;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.basics.PolicyGroupInfo;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.configuration.template.IpAddrTemplate;
import com.nis.domain.configuration.template.IpAllTemplate;
import com.nis.domain.configuration.template.IpsecTemplate;
import com.nis.domain.configuration.template.TunnelIpTemplate;
import com.nis.domain.specific.ConfigGroupInfo;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.Constants;
import com.nis.util.DictUtils;
import com.nis.util.StringUtil;
import com.nis.util.excel.ExcelField;
import com.nis.util.excel.ExportExcel;
import com.nis.web.controller.BaseController;
import com.nis.web.controller.configuration.CommonController;
import com.nis.web.security.UserUtils;
/**

View File

@@ -57,6 +57,9 @@ public class DdosLogController extends BaseController{
Map<String, Object> params=new HashMap<>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
if(entry!=null&&entry.getIsBlock()!=null) {
params.put("searchIsBlock", entry.getIsBlock());
}
//查询值判断
initLogSearchValue(entry,params);

View File

@@ -179,6 +179,9 @@ public class UserController extends BaseController{
@RequiresPermissions("sys:user:view")
@RequestMapping(value = {"list"})
public String list(SysUser user, HttpServletRequest request, HttpServletResponse response, Model model) {
if(UserUtils.getUser().getIdentity().equals(0)){
user.setIdentity(0);
}
Page<SysUser> page = userService.findUser(new Page<SysUser>(request, response), user);
model.addAttribute("page", page);
return "/sys/userList";

View File

@@ -292,7 +292,9 @@
<if test="loginId != null and loginId !=''">
AND u.login_id=#{loginId}
</if>
<if test="identity != null and identity!=1">
AND u.identity=#{identity}
</if>
<if test="name != null and name != ''">
AND u.name like

View File

@@ -205,7 +205,8 @@
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
,a.area_effective_ids,a.function_id,a.cfg_region_code
,a.area_effective_ids,a.function_id,a.cfg_region_code,a.user_region1,a.user_region2,
a.user_region3,a.user_region4,a.user_region5
</sql>
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
SELECT

View File

@@ -136,7 +136,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
ipCfgDao.saveCfgIndex(entity);
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -172,7 +176,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
entity.setCreatorId(entity.getCurrentUser().getId());
if(entity.getIpPortList()!=null){
for(IpPortCfg cfg:entity.getIpPortList()){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
if(Constants.IPSEC_PROTOCOL.intValue()==cfg.getProtocol().intValue()) {
BeanUtils.copyProperties(entity, cfg,new String[]{"userRegion1","cfgRegionCode","cfgType"});
}else {
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
}
ipCfgDao.saveIpPortCfg(cfg);
}
}
@@ -551,24 +559,25 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
}
}
}
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(IpPortCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
for(IpPortCfg cfg:entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","userRegion2","userRegion3","userRegion4","userRegion5","ipType","direction",
"protocol","protocolId","areaEffectiveIds","cfgRegionCode",
"cfgType","ipPattern","srcIpAddress","portPattern","srcPort","destIpAddress","destPort"});
cfg.setTableName(IpPortCfg.getTablename());
ipCfgDao.auditCfg(cfg);
}
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
for(IpPortCfg cfg:entity.getIpPortList()) {
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
cfg.setProtocol(Integer.parseInt(cfg.getUserRegion1()));
}
}
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
groupRelationList=map.get("groupList");
ipRegionList=map.get("dstList");
if(map.get("numRegionList")!=null){
numRegionList.addAll(map.get("numRegionList"));
}
if(Constants.SERVICE_IP_MULITIPLEX==cfg.getServiceId().intValue()){
String region=Constants.USERREGION_IR_STRATEGY+"="+cfg.getDnsStrategyId()+Constants.USER_REGION_SPLIT
+Constants.USERREGION_IR_TYPE+"="+cfg.getIrType();
maatCfg.setUserRegion(region);
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
}
}
}
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
@@ -576,7 +585,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
groupRelationList=map.get("groupList");
strRegionList=map.get("dstList");
@@ -589,7 +598,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
cfg.setTableName(AreaIpCfg.getTablename());
ipCfgDao.auditCfg(cfg);
if(isAudit==1){
if(isAudit==1&&maatType==Constants.MAAT_TYPE){
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
groupRelationList=map.get("groupList");
areaIpRegionList=map.get("dstList");
@@ -600,8 +609,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);
}
ipList.add(ip);
}
//调用服务接口下发配置数据
@@ -660,8 +676,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
if(maatType==Constants.CALLBACK_TYPE){
List<InlineIp> ipList=new ArrayList<>();
for(IpPortCfg cfg :entity.getIpPortList()) {
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
Integer ipsecProtocol=null;
if(Constants.IPSEC_PROTOCOL==cfg.getProtocol().intValue()) {
ipsecProtocol=Integer.parseInt(cfg.getUserRegion1());
}
BeanUtils.copyProperties(entity, cfg, new String[]{"userRegion1","cfgId"});
InlineIp ip=convertCallBackIp(cfg,null);
if(ipsecProtocol!=null) {
ip.setProtocol(ipsecProtocol);
}
ipList.add(ip);
}
//调用服务接口下发配置数据