修改HTTP配置审核逻辑,删除逻辑,dao层处理逻辑
This commit is contained in:
@@ -24,7 +24,7 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2796500715438264119L;
|
||||
|
||||
private static final String tableName="cfg_index_info";
|
||||
private List<AvVoipAccountCfg> voipAccounts;//Add表单使用
|
||||
private List<AvVoipIpCfg> voipIps; //Add表单使用
|
||||
private AvVoipAccountCfg voipAccount;//Search使用
|
||||
@@ -139,5 +139,8 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public void setHttpResBodyList(List<HttpBodyCfg> httpResBodyList) {
|
||||
this.httpResBodyList = httpResBodyList;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class HttpBodyCfg extends BaseStringCfg {
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final String tableName="http_body_cfg";
|
||||
private static final long serialVersionUID = 8231984530204284334L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseStringCfg#initDefaultValue()
|
||||
@@ -32,5 +32,8 @@ public class HttpBodyCfg extends BaseStringCfg {
|
||||
super.initDefaultValue();
|
||||
this.matchMethod=0;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public class HttpReqHeadCfg extends ComplexkeywordCfg {
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 8231984530204284334L;
|
||||
private static final String tableName="http_req_head_cfg";
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@@ -34,5 +35,8 @@ public class HttpReqHeadCfg extends ComplexkeywordCfg {
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public class HttpResHeadCfg extends ComplexkeywordCfg {
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 1306491838846197119L;
|
||||
private static final String tableName="http_res_head_cfg";
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
@@ -35,5 +36,9 @@ public class HttpResHeadCfg extends ComplexkeywordCfg {
|
||||
this.matchMethod=0;
|
||||
this.exprType=0;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer fatherCfgId;
|
||||
@Expose
|
||||
@SerializedName("auditTime")
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
@Expose
|
||||
private List<GroupCfg> groupRelationList;
|
||||
@@ -97,6 +97,7 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
@@ -146,6 +147,7 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
public Integer getRegionId() {
|
||||
return regionId;
|
||||
@@ -247,6 +249,7 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
public Integer getRegionId() {
|
||||
return regionId;
|
||||
@@ -360,6 +363,7 @@ public class MaatCfg implements Serializable {
|
||||
@Expose
|
||||
private Integer isValid;
|
||||
@Expose
|
||||
@SerializedName("opTime")
|
||||
private Date auditTime;
|
||||
public Integer getRegionId() {
|
||||
return regionId;
|
||||
|
||||
@@ -161,8 +161,8 @@ public class WebsiteController extends BaseController{
|
||||
}
|
||||
@RequestMapping(value = {"updateHttpCfgValid"})
|
||||
@RequiresPermissions(value={"website:http:config"})
|
||||
public String updateHttpCfgValid(Integer isAudit,Integer isValid,String ids,Integer functionId) {
|
||||
websiteCfgService.updateHttpCfgValid(isAudit,isValid,ids);
|
||||
public String updateHttpCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
websiteCfgService.updateHttpCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"auditHttpCfg"})
|
||||
@@ -176,6 +176,7 @@ public class WebsiteController extends BaseController{
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
websiteCfgService.auditHttpCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
@@ -42,8 +43,8 @@ public interface WebsiteCfgDao extends CrudDao<CfgIndexInfo>{
|
||||
public void deleteHttpResHdrCfg(CfgIndexInfo entity);
|
||||
public void deleteHttpBodyCfg(CfgIndexInfo entity);
|
||||
public void updateCfgIndex(CfgIndexInfo entity);
|
||||
public void updateHttpCfgValid(CfgIndexInfo entity);
|
||||
public void auditHttpCfg(CfgIndexInfo entity);
|
||||
public void updateCfgValid(BaseCfg entity);
|
||||
public void auditCfg(BaseCfg entity);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -310,32 +310,32 @@
|
||||
<select id="getIpPortList" resultMap="ipPortMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="IpCfg_Column" />
|
||||
FROM ip_port_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM ip_port_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
<select id="getHttpUrlList" resultMap="stringCfgMap">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_url_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM http_url_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
<select id="getHttpReqBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_req_body' and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_res_body' and function_id=#{functionId}
|
||||
</select>
|
||||
<select id="getHttpResBodyList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_res_body' and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM http_body_cfg a where compile_id=#{compileId} and cfg_type='http_res_body' and function_id=#{functionId}
|
||||
</select>
|
||||
<select id="getHttpReqHdrList" resultMap="complexCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="ComplexCfg_Column" />
|
||||
FROM http_req_head_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM http_req_head_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
<select id="getHttpResHdrList" resultMap="complexCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="ComplexCfg_Column" />
|
||||
FROM http_res_head_cfg a where compile_id=#{compileId} and is_valid=#{isValid} and is_audit=#{isAudit} and function_id=#{functionId}
|
||||
FROM http_res_head_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</select>
|
||||
|
||||
<!-- insert cfgIndexInfox -->
|
||||
@@ -768,5 +768,36 @@
|
||||
<delete id="deleteHttpBodyCfg">
|
||||
delete from http_body_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
</update>
|
||||
<update id="auditCfg" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -259,7 +259,8 @@ public abstract class BaseService {
|
||||
* @param dstList
|
||||
* @param srcList
|
||||
* @param cfgType,1为IP类型,2为字符串类型,3为增强字符串,4数值类型,5摘要类,6回调类[但字符串类域配置和增强字符串域配置在接口参数中同属于strRegionList]
|
||||
* @param groupId,组号
|
||||
* @param baseCfg,配置基本信息
|
||||
* @param groupRelationList 配置分组列表
|
||||
* @return
|
||||
*/
|
||||
public static Map<String,List> cfgConvert(List dstList,List srcList,Integer cfgType,BaseCfg baseCfg,List groupRelationList){
|
||||
@@ -279,26 +280,29 @@ public abstract class BaseService {
|
||||
BeanUtils.copyProperties(baseIpCfg, cfg);
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
cfg = ipConvert(cfg,baseIpCfg);
|
||||
dstList.add(cfg);
|
||||
//如果protocolId非空非零,需要构造数值型域配置,并且只构造一条
|
||||
if(baseIpCfg.getProtocolId()!=null && baseIpCfg.getProtocolId()!=0 && groupId!=0){
|
||||
//如果protocolId非空非零,需要构造数值型域配置
|
||||
if(baseIpCfg.getProtocolId()!=null && baseIpCfg.getProtocolId()!=0){
|
||||
if(groupId==0){//只构造一次配置分组
|
||||
GroupCfg group1 = new GroupCfg();
|
||||
groupId = ConfigServiceUtil.getId(2, 1).get(0);
|
||||
group1.setGroupId(groupId);
|
||||
group1.setCompileId(baseIpCfg.getCompileId());
|
||||
group1.setAuditTime(baseIpCfg.getAuditTime());
|
||||
group1.setIsValid(baseIpCfg.getIsValid());
|
||||
group1.setIsValid(baseCfg.getIsValid());
|
||||
groupRelationList.add(group1);
|
||||
}
|
||||
NumBoundaryCfg numCfg = new NumBoundaryCfg();
|
||||
numCfg.setLowBoundary(baseIpCfg.getProtocolId());
|
||||
numCfg.setUpBoundary(baseIpCfg.getProtocolId());
|
||||
numCfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
numCfg.setAuditTime(baseIpCfg.getAuditTime());
|
||||
numCfg.setAuditTime(baseCfg.getAuditTime());
|
||||
numCfg.setGroupId(groupId);
|
||||
numCfg.setCfgType(baseIpCfg.getCfgType());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
numRegionList.add(numCfg);
|
||||
map.put("numRegionList",numRegionList);
|
||||
}
|
||||
@@ -310,6 +314,8 @@ public abstract class BaseService {
|
||||
BeanUtils.copyProperties(srcList.get(i), cfg);
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
dstList.add(cfg);
|
||||
}
|
||||
}else if(cfgType==4){
|
||||
@@ -318,6 +324,8 @@ public abstract class BaseService {
|
||||
BeanUtils.copyProperties(srcList.get(i), cfg);
|
||||
cfg.setGroupId(group.getGroupId());
|
||||
cfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||
cfg.setAuditTime(baseCfg.getAuditTime());
|
||||
cfg.setIsValid(baseCfg.getIsValid());
|
||||
dstList.add(cfg);
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.AvFileSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
@@ -42,6 +43,7 @@ import com.nis.util.Constants;
|
||||
import com.nis.util.IpUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.dao.configuration.WebsiteCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
@@ -226,30 +228,111 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updateHttpCfgValid(Integer isAudit,Integer isValid,String ids){
|
||||
public void updateHttpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
websiteCfgDao.updateHttpCfgValid(entity);
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
websiteCfgDao.updateCfgValid(entity);
|
||||
//查询子配置
|
||||
entity = this.getHttpCfg(Long.parseLong(id));
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||
HttpUrlCfg cfg = new HttpUrlCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpUrlCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getHttpReqHdrList()!=null && entity.getHttpReqHdrList().size()>0){
|
||||
HttpReqHeadCfg cfg = new HttpReqHeadCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpReqHeadCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null && entity.getHttpResHdrList().size()>0){
|
||||
HttpResHeadCfg cfg = new HttpResHeadCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpResHeadCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if((entity.getHttpReqBodyList()!=null && entity.getHttpReqBodyList().size()>0) ||
|
||||
(entity.getHttpResBodyList()!=null && entity.getHttpResBodyList().size()>0)){
|
||||
HttpBodyCfg cfg = new HttpBodyCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpBodyCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
websiteCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void auditHttpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
//修改数据库审核状态信息
|
||||
websiteCfgDao.auditHttpCfg(entity);
|
||||
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
websiteCfgDao.auditCfg(entity);
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getHttpCfg(entity.getCfgId());
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||
HttpUrlCfg cfg = new HttpUrlCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpUrlCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
if(entity.getHttpReqHdrList()!=null && entity.getHttpReqHdrList().size()>0){
|
||||
HttpReqHeadCfg cfg = new HttpReqHeadCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpReqHeadCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
if(entity.getHttpResHdrList()!=null && entity.getHttpResHdrList().size()>0){
|
||||
HttpResHeadCfg cfg = new HttpResHeadCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpResHeadCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
if((entity.getHttpReqBodyList()!=null && entity.getHttpReqBodyList().size()>0) ||
|
||||
(entity.getHttpResBodyList()!=null && entity.getHttpResBodyList().size()>0)){
|
||||
HttpBodyCfg cfg = new HttpBodyCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(HttpBodyCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
websiteCfgDao.auditCfg(cfg);
|
||||
}
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
|
||||
//一条配置提交一次综合服务
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
entity = this.getHttpCfg(entity.getCfgId());
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
@@ -261,7 +344,10 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
ipRegionList=map.get("dstList");
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
if(map.get("numRegionList")!=null){
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
|
||||
}
|
||||
if(entity.getHttpUrlList()!=null && entity.getHttpUrlList().size()>0){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getHttpUrlList(),2,entity,groupRelationList);
|
||||
|
||||
Reference in New Issue
Block a user