diff --git a/src/main/java/com/nis/domain/configuration/DnsIpCfg.java b/src/main/java/com/nis/domain/configuration/DnsIpCfg.java index 3219b0dde..75ebdae13 100644 --- a/src/main/java/com/nis/domain/configuration/DnsIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/DnsIpCfg.java @@ -141,6 +141,7 @@ public class DnsIpCfg extends BaseEntity { private String lable; private String cfgIds; + private String fakeIds; public String getCfgIds() { return cfgIds; @@ -348,5 +349,19 @@ public class DnsIpCfg extends BaseEntity { public void setSearchAuditTimeEnd(Date searchAuditTimeEnd) { this.searchAuditTimeEnd = searchAuditTimeEnd; } + /** + * fakeIds + * @return fakeIds + */ + + public String getFakeIds() { + return fakeIds; + } + /** + * @param fakeIds the fakeIds to set + */ + public void setFakeIds(String fakeIds) { + this.fakeIds = fakeIds; + } } diff --git a/src/main/java/com/nis/web/controller/configuration/DnsIpCfgController.java b/src/main/java/com/nis/web/controller/configuration/DnsIpCfgController.java index 2c25787a5..bc5670b40 100644 --- a/src/main/java/com/nis/web/controller/configuration/DnsIpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/DnsIpCfgController.java @@ -78,10 +78,10 @@ public class DnsIpCfgController extends BaseController { @RequestMapping("delete") public String delete(Model model, HttpServletRequest request, HttpServletResponse response, DnsIpCfg dnsIpCfg) { - String cfgIds = dnsIpCfg.getCfgIds(); - if (!StringUtils.isEmpty(cfgIds)) { + String fakeIds = dnsIpCfg.getFakeIds(); + if (!StringUtils.isEmpty(fakeIds)) { try { - dnsIpCfgService.delete(cfgIds); + dnsIpCfgService.delete(fakeIds); addMessage(model, "delete_success"); } catch (Exception e) { logger.error("删除失败", e); diff --git a/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.java b/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.java index 755228e15..62c9de453 100644 --- a/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.java @@ -1,10 +1,12 @@ package com.nis.web.dao.configuration; +import org.apache.ibatis.annotations.Param; + import com.nis.domain.configuration.DnsIpCfg; import com.nis.web.dao.CrudDao; import com.nis.web.dao.MyBatisDao; @MyBatisDao public interface DnsIpCfgDao extends CrudDao { - + public int deleteByFakeId(@Param("fakeId") String fakeIds); } diff --git a/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.xml index 8c43cc875..a3dfb045d 100644 --- a/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/DnsIpCfgDao.xml @@ -141,5 +141,12 @@ is_valid=0 where cfg_id=#{cfgId} + + update + dns_ip_cfg + set + is_valid=0 + where fake_id =#{fakeId} + \ No newline at end of file diff --git a/src/main/java/com/nis/web/service/configuration/DnsIpCfgService.java b/src/main/java/com/nis/web/service/configuration/DnsIpCfgService.java index 803f95feb..5afe0bcd5 100644 --- a/src/main/java/com/nis/web/service/configuration/DnsIpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/DnsIpCfgService.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -16,13 +17,13 @@ import com.nis.domain.maat.MaatDnsIpCfg; import com.nis.domain.maat.ToMaatDnsIpBean; import com.nis.main.ConvertTool; import com.nis.util.Collections3; -import com.nis.util.StringUtil; import com.nis.web.dao.configuration.DnsIpCfgDao; import com.nis.web.service.CrudService; @Service public class DnsIpCfgService extends CrudService{ - + @Autowired + private DnsIpCfgDao dnsIpCfgDao; @Override @Transactional(readOnly=false,rollbackFor=RuntimeException.class) public void save(DnsIpCfg dnsIpCfg) { @@ -72,27 +73,24 @@ public class DnsIpCfgService extends CrudService{ } } - public void delete(String cfgIds) { - if(cfgIds.endsWith(","))cfgIds=cfgIds.substring(0,cfgIds.lastIndexOf(",")); - String[] cfgIdsArr = cfgIds.split(","); - for (String cfgId : cfgIdsArr) { - DnsIpCfg d = new DnsIpCfg(); - d.setCfgId(Long.valueOf(cfgId)); - dao.delete(d); + public void delete(String fakeIds) { + if(fakeIds.endsWith(","))fakeIds=fakeIds.substring(0,fakeIds.lastIndexOf(",")); + String[] fakeIdsArr = fakeIds.split(","); + for (String fakeId : fakeIdsArr) { + dnsIpCfgDao.deleteByFakeId(fakeId); } - //给配置转换层发送、接收结果 - String sendJson = "{\"fakeId\":[" + cfgIds + "]}"; + String sendJson = "{\"fakeId\":[" + fakeIds + "]}"; logger.info("准备下发配置:" + sendJson); Boolean recv = true; try { recv = new ConvertTool().invalidDNSIPConfig(sendJson); } catch (Throwable e) { - logger.error("欺骗ip配置删除失败:通讯异常,cfgIds:" + cfgIds, e); + logger.error("欺骗ip配置删除失败:通讯异常,fakeIds:" + fakeIds, e); throw new RuntimeException("欺骗ip配置删除失败:通讯失败"); } if (!recv) { - logger.error("欺骗ip配置删除失败,收到结果 " + recv + " ,cfgIds:" + cfgIds); + logger.error("欺骗ip配置删除失败,收到结果 " + recv + " ,fakeIds:" + fakeIds); throw new RuntimeException("欺骗ip配置删除失败"); } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 596f0bc20..4cd4e9d83 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -19,6 +19,7 @@ show=show edit=edit hi=hi exit=exit +choose=choose #============menu begin====================== requestInfo=requestInfo @@ -40,15 +41,12 @@ sip_ip_control=sip ip control domain_control_white=domain control white ip_address_control=ip address control ip_control=ip control -ip_port_control=ip port control domain_control=domain control dns_control=dns control basic_configuration=basic configuration letter_from=letter from classification_manage=classification manage -attribute_manage=attribute manage area_manage=area manage -isp_manage=isp manage feature_scope_manage=feature scope manage special_tasks=special tasks label_manage=label manage @@ -94,12 +92,9 @@ log_search=log search sysService_manage=system service manage service_manage=service type manage system_service_manage=system service type manage -specific_service_cfg=specific service cfg features_area=features area attribute_manage=attribute manage isp_manage=isp manage -feature_scope_manage=feature scope manage -plaintext_manage=plaintext manage ip_multiple_control=ip multiple control ip_port_control=ip port control website_multiple_control=website multiple control diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp index dfc121724..46bf493fb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp @@ -69,8 +69,9 @@ checkboxes.each(function(){ ids = ids + $(this).attr("id") + ","; }); + console.log(ids); if (confirm("")) { - $("#cfgIds").val(ids); + $("#fakeIds").val(ids); $("#searchForm").attr("action","${ctx}/cfg/dnsIp/delete"); $("#searchForm").submit(); } @@ -105,6 +106,7 @@ +
@@ -270,7 +272,7 @@ - + ${dnsIpCfg.cfgDesc } V${dnsIpCfg.ipType } ${dnsIpCfg.srcIp } diff --git a/src/main/webapp/WEB-INF/views/sys/officeForm.jsp b/src/main/webapp/WEB-INF/views/sys/officeForm.jsp index a87448237..e33449f40 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeForm.jsp @@ -29,142 +29,170 @@ -
+
+
+
+
+
+
+
+
+
+ + +<%--
  • 机构列表
  • --%> +<%--
  • 机构${not empty office.id?'修改':'添加'}查看
  • --%> + + + -
    - -
    +
    +
    + +
    + title="机构" url="/sys/office/treeData" extId="${office.id}" cssClass="form-control" allowClear="${office.currentUser.admin}"/>
    -
    - -
    +
    + +
    - * + title="区域" url="/sys/area/treeData" cssClass="required form-control" allowClear="${office.currentUser.admin}"/>
    + *
    -
    - -
    - +
    + +
    + +
    * +
    +
    + +
    +
    -
    - -
    - -
    -
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    + “是”代表此账号允许登陆,“否”则表示此账号不允许登陆
    -
    - -
    +
    + +
    + title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true" cssClass="form-control"/>
    -
    - -
    +
    + +
    + title="用户" url="/sys/office/treeData?type=6" allowClear="true" notAllowSelectParent="true" cssClass="form-control"/>
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    - +
    + +
    +
    -
    - -
    +
    + +
    +
    + +
    +
    -   - +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp b/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp index ecb70e805..d0d798fc0 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeIndex.jsp @@ -7,23 +7,40 @@ - - + + + +
    + + +

    + + +

    + +
    -
    +
     
    - + +
    +
    - + +<%-- --%> diff --git a/src/main/webapp/WEB-INF/views/sys/officeList.jsp b/src/main/webapp/WEB-INF/views/sys/officeList.jsp index a3b12b4d7..371bef470 100644 --- a/src/main/webapp/WEB-INF/views/sys/officeList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/officeList.jsp @@ -5,8 +5,9 @@ 机构管理 - - + + + - +
    + +
    +
    +
    + +
    + +<%--
  • 机构列表
  • --%> +<%--
  • 机构添加
  • --%> + +
    机构名称归属区域机构编码所属级别机构类型机构职责分类备注操作
    +
    +
    +
    +
    +
    +