1.修改分组域配置批量删除逻辑
2.修正分组域配置删除提示信息 3.补漏表单GroupName必填
This commit is contained in:
@@ -214,7 +214,7 @@
|
||||
FROM
|
||||
cfg_index_info
|
||||
WHERE
|
||||
common_group_ids LIKE concat(concat('%',#{groupId,jdbcType=VARCHAR}),'%') AND is_valid != -1 AND is_audit = 1
|
||||
common_group_ids = #{groupId,jdbcType=VARCHAR} AND is_valid != -1 AND is_audit = 1
|
||||
</select>
|
||||
|
||||
<select id="ajaxCheckIsLastOneCfg" resultType="java.lang.Integer">
|
||||
|
||||
@@ -239,19 +239,27 @@ public class CommonGroupManageService extends BaseService{
|
||||
for (Integer cfgId : cfgIdList) {
|
||||
cfgIds += "," + cfgId;
|
||||
}
|
||||
String keyString = "";
|
||||
Integer size = 0;
|
||||
if(groupType == Constants.IP_OBJ_GROUP_TYPE) { // IP
|
||||
keyString = "ipGroup";
|
||||
size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds.substring(1), IpCommCfg.getIndexTable());
|
||||
}else if(groupType == Constants.URL_OBJ_GROUP_TYPE) { // URL
|
||||
keyString = "urlGroup";
|
||||
size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds.substring(1), UrlCommCfg.getTablename());
|
||||
}else if(groupType == Constants.DOMAIN_OBJ_GROUP_TYPE) { // Domain
|
||||
keyString = "domainGroup";
|
||||
size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds.substring(1), DomainCommCfg.getTablename());
|
||||
}else if(groupType == Constants.SUBID_OBJ_GROUP_TYPE) { // ScriberId
|
||||
keyString = "subscribeIdGroup";
|
||||
size = commonGroupManageDao.ajaxCheckIsLastOneCfg(groupId, cfgIds.substring(1), ScriberIdCommCfg.getTablename());
|
||||
}
|
||||
|
||||
if(size == 0) { // 0为分组下的最后一条配置,获取配置ID提示
|
||||
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(","+groupId+",");
|
||||
Map<String,String> searchMap = new HashMap<String,String>();
|
||||
searchMap.put(keyString, ","+groupId+",");
|
||||
|
||||
Integer compileId = commonGroupManageDao.getCompileIdByGroupId(gsonToJson(searchMap));
|
||||
if(compileId != null) {
|
||||
resultList.add(compileId);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
||||
Properties props = groupController.getMsgProp();
|
||||
|
||||
// 配置未生效
|
||||
String updateStatusGroupIds = "";
|
||||
/*String updateStatusGroupIds = "";
|
||||
for (String groupId : serviceGroupIds.split(",")) {
|
||||
List<CfgIndexInfo> list = commonPolicyDao.getObjGroupListByGroupIds(groupId, 888, Constants.VALID_NO);
|
||||
if(list.size() > 0) {
|
||||
@@ -209,13 +209,19 @@ public class DomainCommGroupService extends CrudService<CrudDao<DomainCommCfg>,
|
||||
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(updateStatusGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.DOMAIN_OBJ_GROUP_TYPE);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 配置已生效
|
||||
// 组下无域配置common_group_ids -> "",ud_flag -> 0
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setUserRegion5(serviceGroupIds);
|
||||
entity.setServiceId(0);
|
||||
entity.setFunctionId(888);
|
||||
entity.setCommonGroupIds("");
|
||||
commonPolicyDao.updateCfgIndexCommonGroupIdsBatch(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(serviceGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.DOMAIN_OBJ_GROUP_TYPE);
|
||||
|
||||
entity.setServiceId(0);
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
entity.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||
entity.setBatchAuditValue("1");
|
||||
|
||||
@@ -184,7 +184,7 @@ public class IpCommGroupCfgService extends BaseService {
|
||||
Properties props = groupController.getMsgProp();
|
||||
|
||||
// 配置未生效
|
||||
String updateStatusGroupIds = "";
|
||||
/*String updateStatusGroupIds = "";
|
||||
for (String groupId : serviceGroupIds.split(",")) {
|
||||
List<CfgIndexInfo> list = commonPolicyDao.getObjGroupListByGroupIds(groupId, 888, Constants.VALID_NO);
|
||||
if(list.size() > 0) {
|
||||
@@ -202,13 +202,19 @@ public class IpCommGroupCfgService extends BaseService {
|
||||
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(updateStatusGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.IP_OBJ_GROUP_TYPE);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 配置已生效
|
||||
// 配置已生效×
|
||||
// 组下无域配置common_group_ids -> "",ud_flag -> 0
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setUserRegion5(serviceGroupIds);
|
||||
entity.setServiceId(0);
|
||||
entity.setFunctionId(888);
|
||||
entity.setCommonGroupIds("");
|
||||
commonPolicyDao.updateCfgIndexCommonGroupIdsBatch(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(serviceGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.IP_OBJ_GROUP_TYPE);
|
||||
|
||||
entity.setServiceId(0);
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
entity.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||
entity.setBatchAuditValue("1");
|
||||
|
||||
@@ -191,7 +191,7 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
||||
Properties props = groupController.getMsgProp();
|
||||
|
||||
// 配置未生效
|
||||
String updateStatusGroupIds = "";
|
||||
/*String updateStatusGroupIds = "";
|
||||
for (String groupId : serviceGroupIds.split(",")) {
|
||||
List<CfgIndexInfo> list = commonPolicyDao.getObjGroupListByGroupIds(groupId, 888, Constants.VALID_NO);
|
||||
if(list.size() > 0) {
|
||||
@@ -209,13 +209,19 @@ public class ScriberIdCommGroupService extends CrudService<CrudDao<ScriberIdComm
|
||||
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(updateStatusGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.SUBID_OBJ_GROUP_TYPE);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 配置已生效
|
||||
// 配置已生效×
|
||||
// 组下无域配置common_group_ids -> "",ud_flag -> 0
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setUserRegion5(serviceGroupIds);
|
||||
entity.setServiceId(0);
|
||||
entity.setFunctionId(888);
|
||||
entity.setCommonGroupIds("");
|
||||
commonPolicyDao.updateCfgIndexCommonGroupIdsBatch(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(serviceGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.SUBID_OBJ_GROUP_TYPE);
|
||||
|
||||
entity.setServiceId(0);
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
entity.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||
entity.setBatchAuditValue("1");
|
||||
|
||||
@@ -191,7 +191,7 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
||||
Properties props = groupController.getMsgProp();
|
||||
|
||||
// 配置未生效
|
||||
String updateStatusGroupIds = "";
|
||||
/*String updateStatusGroupIds = "";
|
||||
for (String groupId : serviceGroupIds.split(",")) {
|
||||
List<CfgIndexInfo> list = commonPolicyDao.getObjGroupListByGroupIds(groupId, 888, Constants.VALID_NO);
|
||||
if(list.size() > 0) {
|
||||
@@ -209,13 +209,19 @@ public class UrlCommGroupService extends CrudService<CrudDao<UrlCommCfg>, UrlCom
|
||||
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(updateStatusGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.URL_OBJ_GROUP_TYPE);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 配置已生效
|
||||
// 配置已生效×
|
||||
// 组下无域配置common_group_ids -> "",ud_flag -> 0
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setUserRegion5(serviceGroupIds);
|
||||
entity.setServiceId(0);
|
||||
entity.setFunctionId(888);
|
||||
entity.setCommonGroupIds("");
|
||||
commonPolicyDao.updateCfgIndexCommonGroupIdsBatch(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos=policyGroupInfoDao.findPolicyByServiceGroupInfoList(serviceGroupIds);
|
||||
groupManageService.updateGroupStatus(policyGroupInfos, Constants.URL_OBJ_GROUP_TYPE);
|
||||
|
||||
entity.setServiceId(0);
|
||||
entity.setIsValid(Constants.VALID_NO);
|
||||
entity.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||
entity.setBatchAuditValue("1");
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<label for="srearchInput" class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6 has-feedback">
|
||||
<span class="form-control-feedback input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control fc-clear" name="groupName" autocomplete="false">
|
||||
<input id="srearchInput" class="form-control fc-clear required" name="groupName" autocomplete="false">
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<span class="input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
<input id="srearchInput" class="form-control required" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<label for="srearchInput" class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6 has-feedback">
|
||||
<span class="form-control-feedback input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control fc-clear" name="groupName" autocomplete="false">
|
||||
<input id="srearchInput" class="form-control fc-clear required" name="groupName" autocomplete="false">
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<span class="input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
<input id="srearchInput" class="form-control required" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
<label for="srearchInput" class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6 has-feedback">
|
||||
<span class="form-control-feedback input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control fc-clear" name="groupName" autocomplete="false">
|
||||
<input id="srearchInput" class="form-control fc-clear required" name="groupName" autocomplete="false">
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<span class="input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
<input id="srearchInput" class="form-control required" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
<label for="srearchInput" class="control-label col-md-3"><font color="red">*</font><spring:message code="group_name"/></label>
|
||||
<div class="col-md-6 has-feedback">
|
||||
<span class="form-control-feedback input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control fc-clear" name="groupName" autocomplete="false">
|
||||
<input id="srearchInput" class="form-control fc-clear required" name="groupName" autocomplete="false">
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<span class="input-icon input-icon-md" style="display: inline; left: 90%;"><i class="fa fa-search"></i></span>
|
||||
<input id="srearchInput" class="form-control" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
<input id="srearchInput" class="form-control required" name="groupName" value="${cfgGroupName }" autocomplete="false" >
|
||||
</div>
|
||||
<div for="groupName"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user