社交应用配置查询、新增、修改功能

This commit is contained in:
zhangwei
2018-03-29 17:24:21 +08:00
parent e64f7d5b22
commit 99175da3f2
11 changed files with 2287 additions and 15 deletions

View File

@@ -8,6 +8,8 @@
*/
package com.nis.domain.configuration;
import java.util.List;
/**
* @ClassName: AppIdConfig.java
* @Description: TODO
@@ -30,8 +32,64 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
/**
* 应用协议id
*/
private String appId;
private Long appId;
/**
* 编译id
*/
private Integer compileId;
/**
* 协议字符串特征表信息列表
*/
private List<ComplexkeywordCfg> complexFeaturesList;
/**
* 协议增强字符串特征配置信息列表
*/
private List<BaseStringCfg> strFeaturesCfgList;
private List<AppFeaturesIndex> featuresList;
public static class AppFeaturesIndex{
private Long indexId;
private Integer appCompileId;
private String featuresTable;
private Integer featuresCompileId;
private Integer featuresTableType;
public Long getIndexId() {
return indexId;
}
public void setIndexId(Long indexId) {
this.indexId = indexId;
}
public String getFeaturesTable() {
return featuresTable;
}
public void setFeaturesTable(String featuresTable) {
this.featuresTable = featuresTable;
}
public Integer getFeaturesTableType() {
return featuresTableType;
}
public void setFeaturesTableType(Integer featuresTableType) {
this.featuresTableType = featuresTableType;
}
public Integer getAppCompileId() {
return appCompileId;
}
public void setAppCompileId(Integer appCompileId) {
this.appCompileId = appCompileId;
}
public Integer getFeaturesCompileId() {
return featuresCompileId;
}
public void setFeaturesCompileId(Integer featuresCompileId) {
this.featuresCompileId = featuresCompileId;
}
}
/**
* appName
* @return appName
@@ -53,17 +111,34 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
* @return appId
*/
public String getAppId() {
public Long getAppId() {
return appId;
}
/**
* @param appId the appId to set
*/
public void setAppId(String appId) {
public void setAppId(Long appId) {
this.appId = appId;
}
/**
* compileId
* @return compileId
*/
public Integer getCompileId() {
return compileId;
}
/**
* @param compileId the compileId to set
*/
public void setCompileId(Integer compileId) {
this.compileId = compileId;
}
/* (non-Javadoc)
* @see com.nis.domain.configuration.BaseCfg#initDefaultValue()
*/
@@ -73,5 +148,29 @@ public class AppIdCfg extends BaseCfg<AppIdCfg> {
super.initDefaultValue();
}
public List<ComplexkeywordCfg> getComplexFeaturesList() {
return complexFeaturesList;
}
public void setComplexFeaturesList(List<ComplexkeywordCfg> complexFeaturesList) {
this.complexFeaturesList = complexFeaturesList;
}
public List<BaseStringCfg> getStrFeaturesCfgList() {
return strFeaturesCfgList;
}
public void setStrFeaturesCfgList(List<BaseStringCfg> strFeaturesCfgList) {
this.strFeaturesCfgList = strFeaturesCfgList;
}
public List<AppFeaturesIndex> getFeaturesList() {
return featuresList;
}
public void setFeaturesList(List<AppFeaturesIndex> featuresList) {
this.featuresList = featuresList;
}
}

View File

@@ -22,6 +22,10 @@ public final class Constants {
* 词典数据key
*/
public static final String CACHE_DICT_MAP = "dictMap";
/**
* 特征域字典key
*/
public static final String CACHE_FEATURES_DICT_MAP = "featuresDictMap";
/**
* 词典数据分类
*/

View File

@@ -1,5 +1,6 @@
package com.nis.util;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -9,7 +10,9 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.nis.domain.SysDataDictionaryItem;
import com.nis.domain.SysDataDictionaryName;
import com.nis.domain.basics.SysDictInfo;
import com.nis.web.dao.SysDictDao;
import com.nis.web.dao.basics.SysDictInfoDao;
import com.nis.web.service.SpringContextHolder;
@@ -24,7 +27,7 @@ import com.nis.web.service.SpringContextHolder;
public class DictUtils {
private final static SysDictDao dictDao = SpringContextHolder.getBean(SysDictDao.class);
private final static SysDictInfoDao sysDictInfoDao = SpringContextHolder.getBean(SysDictInfoDao.class);
public static Map<String, List<SysDataDictionaryItem>> getDictData() {
@@ -139,8 +142,32 @@ public class DictUtils {
public static String getDictListJson(String key){
return JsonMapper.toJsonString(getDictList(key));
}
/**
* 增强字符串配置特征域字典
* @return
*/
public static List<SysDictInfo> getFeaturesDictData(String itemCode) {
Map<String, List<SysDictInfo>> dictMap = (Map<String, List<SysDictInfo>>)CacheUtils.get(Constants.CACHE_FEATURES_DICT_MAP);
if(StringUtil.isEmpty(dictMap)){
dictMap = Maps.newHashMap();
SysDictInfo dict = new SysDictInfo();
dict.setItemType(3);
dict.setItemCode(itemCode);
List<SysDictInfo> dicList = sysDictInfoDao.findAllSysDictInfo(dict,"");
dictMap.put(itemCode, dicList);
CacheUtils.put(Constants.CACHE_FEATURES_DICT_MAP, dictMap);
}else{
if(StringUtil.isEmpty(dictMap.get(itemCode))){
SysDictInfo dict = new SysDictInfo();
dict.setItemType(3);
dict.setItemCode(itemCode);
List<SysDictInfo> dicList = sysDictInfoDao.findAllSysDictInfo(dict,"");
dictMap.put(itemCode, dicList);
CacheUtils.put(Constants.CACHE_FEATURES_DICT_MAP, dictMap);
}
}
return dictMap.get(itemCode);
}
}

View File

@@ -1,13 +1,300 @@
package com.nis.web.controller.configuration;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.nis.domain.Page;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.SystemServiceInfo;
import com.nis.domain.basics.ServiceDictInfo;
import com.nis.domain.basics.SysDictInfo;
import com.nis.domain.configuration.AppIdCfg;
import com.nis.domain.configuration.BaseCfg;
import com.nis.domain.configuration.RequestInfo;
import com.nis.domain.specific.SpecificServiceCfg;
import com.nis.util.Constants;
import com.nis.web.controller.BaseController;
/**
* 特定协议相关配置控制类
* @author dell
* @author zhangwei
*
*/
@Controller
public class AppCfgController {
@RequestMapping("${adminPath}/cfg/app")
public class AppCfgController extends BaseController {
@RequestMapping(value = {"list"})
public String cfgList(Model model,Integer audit,String cfgName,@ModelAttribute("cfg")AppIdCfg cfg,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", audit);
if(cfg!=null){
Integer serviceId=cfg.getServiceId();
logger.info("servcice id is "+serviceId);
if(serviceId!=null){
model.addAttribute("serviceId", serviceId);
List<ServiceConfigInfo> serviceList=serviceConfigInfoService.findList(serviceId);
if(serviceList!=null){
for(ServiceConfigInfo s:serviceList){
if(s.getTableType()==2 || s.getTableType()==4){
model.addAttribute("isContainFeaturesCfg", true);
break;
}
}
Page<AppIdCfg> page = appCfgService.findPage(new Page<AppIdCfg>(request, response,"r"), cfg);
model.addAttribute("page", page);
model.addAttribute("action", cfg.getAction());
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
model.addAttribute("requestInfos", requestInfos);
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
model.addAttribute("fls", fls);
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
model.addAttribute("xzs", xzs);
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
model.addAttribute("lables", lables);
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
specificServiceCfg.setIsValid(1);
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
}else{
logger.error("未获取到正确的serviceId");
}
}
}
return "/cfg/appCfgList";
}
@RequestMapping(value = {"form"})
public String cfgForm(int action,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("action", action);
model.addAttribute("serviceId", serviceId);
model.addAttribute("audit", Constants.CFG_PAGE);
model.addAttribute("cfgName", cfgName);
logger.info("sercice id is "+serviceId);
// SystemServiceInfo serviceInfo=systemServiceService.get(serviceId);
// model.addAttribute("serviceInfo", serviceInfo);
//来函信息
List<RequestInfo> requestInfos=requestInfoService.getValidRequestInfo();
model.addAttribute("requestInfos", requestInfos);
//分类信息
List<ServiceDictInfo> fls=serviceDictInfoService.findFlDict();
model.addAttribute("fls", fls);
//性质信息
List<ServiceDictInfo> xzs=serviceDictInfoService.findXzDict();
model.addAttribute("xzs", xzs);
//标签信息
List<ServiceDictInfo> lables=serviceDictInfoService.findLableDict();
model.addAttribute("lables", lables);
//特定服务信息
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
specificServiceCfg.setIsValid(1);
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
//协议特征配置
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
model.addAttribute("featuresList",featuresList);
//特征作用域信息
/*SysDictInfo sysDictInfo = new SysDictInfo();
sysDictInfo.setItemType(3);
Integer[] itType = new Integer[0];
List<SysDictInfo> featuresAreaList = sysDictInfoService.findAllSysDictInfo(sysDictInfo,itType,null);
model.addAttribute("featuresAreaList", featuresAreaList);*/
AppIdCfg cfg = new AppIdCfg();
cfg.initDefaultValue();
cfg.setAction(action);
cfg.setServiceId(serviceId.intValue());
model.addAttribute("_cfg", cfg);
return "/cfg/appCfgForm";
}
@RequestMapping(value = {"updateForm"})
public String updateAppCfgForm(int action,long cfgId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", action);
model.addAttribute("audit", Constants.CFG_PAGE);
AppIdCfg searchBean=new AppIdCfg();
searchBean.setCfgId(cfgId);
AppIdCfg cfg=appCfgService.getAppCfgById(searchBean);
model.addAttribute("_cfg", cfg);
List<RequestInfo> requestInfos=requestInfoService.getAllRequestInfo();
model.addAttribute("requestInfos", requestInfos);
List<ServiceDictInfo> fls=serviceDictInfoService.findAllFlDict();
model.addAttribute("fls", fls);
List<ServiceDictInfo> xzs=serviceDictInfoService.findAllXzDict();
model.addAttribute("xzs", xzs);
List<ServiceDictInfo> lables=serviceDictInfoService.findAllLableDict();
model.addAttribute("lables", lables);
//特定服务信息
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
specificServiceCfg.setIsValid(1);
model.addAttribute("protocolList",specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg,"spec_service_id DESC"));
//协议特征配置
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
model.addAttribute("featuresList",featuresList);
return "/cfg/appCfgForm";
}
@RequestMapping(value = {"showFeaturesCfg"})
public String showFeaturesCfg(int action,long cfgId,Integer compileId,String cfgName,Integer serviceId,Model model,HttpServletRequest request,HttpServletResponse response){
AppIdCfg cfg=new AppIdCfg();
cfg.setCfgId(cfgId);
cfg.setCompileId(compileId);
cfg = appCfgService.findAppIdCfg(cfg);
model.addAttribute("_cfg", cfg);
model.addAttribute("cfgName", cfgName);
model.addAttribute("serviceId", serviceId);
model.addAttribute("action", action);
//协议特征配置
List<ServiceConfigInfo> featuresList = serviceConfigInfoService.findList(serviceId);
model.addAttribute("featuresList",featuresList);
return "/cfg/appFeaturesCfg";
}
/**
*
* addAppCfg(新增IP配置)
* (这里描述这个方法适用条件 可选)
* @return
*String
* @exception
* @since 1.0.0
*/
@RequestMapping(value = {"saveOrUpdateCfg"})
public String saveOrUpdateAppCfg(String cfgName,Model model, AppIdCfg cfg) {
model.addAttribute("audit", Constants.CFG_PAGE);
model.addAttribute("cfgType","app");
model.addAttribute("cfgName",cfgName);
model.addAttribute("serviceId",cfg.getServiceId());
model.addAttribute("action",cfg.getAction());
logger.info("saveOrUpdateAppCfg loaded");
if(cfg==null){
logger.error("无法保存空的配置!");
addMessage(model,"保存失败!");
}else{
SpecificServiceCfg protocol = specificServiceCfgService.getBySpecServiceId(cfg.getAppId().intValue());
if(protocol!=null){
cfg.setAppName(protocol.getSpecServiceName());
int serviceId=cfg.getServiceId();
cfg.setIsValid(Constants.VALID_NO);
cfg.setIsAudit(Constants.AUDIT_NOT_YET);
if(cfg.getCfgId()==null){
cfg.setCreatorId(cfg.getCurrentUser().getId());
cfg.setCreateTime(new Date());
try {
appCfgService.addAppCfg(cfg);
} catch (Exception e) {
e.printStackTrace();
logger.error("配置保存失败!"+e.getMessage());
addMessage(model,"保存失败!");
}
}else{
cfg.setEditorId(cfg.getCurrentUser().getId());
cfg.setEditTime(new Date());
try {
appCfgService.updateAppCfg(cfg);
} catch (Exception e) {
e.printStackTrace();
logger.error("配置保存失败!"+e.getMessage());
addMessage(model,"保存失败!");
}
}
model.addAttribute("serviceId",serviceId);
model.addAttribute("action",cfg.getAction());
addMessage(model,"保存成功,正在为您跳转页面...");
}else{
logger.error("所选协议信息无效!");
addMessage(model,"保存失败!");
}
}
return "/cfg/resultPage";//StringEscapeUtils.escapeHtml4("?serviceId="+cfg.getServiceId()+"&action="+cfg.getAction()+"&cfgName="+cfgName);
}
/**
*
* auditAppCfg(审核IP配置)
* (这里描述这个方法适用条件 可选)
* @return
*String
* @exception
* @since 1.0.0
*/
@RequestMapping(value = {"auditCfg"})
public String auditAppCfg(String cfgName,AppIdCfg cfg,Model model) {
model.addAttribute("cfgName", cfgName);
model.addAttribute("audit", Constants.AUDIT_PAGE);
if(cfg==null){
logger.error("无法审核空的配置!");
}else{
int audit=appCfgService.getIsAudit(cfg.getCfgId());
if(audit==Constants.AUDIT_YES&&cfg.getIsAudit()!=Constants.AUDIT_NOT_YES){
logger.error("审核通过的配置只能取消审核通过!");
}else{
cfg.setAuditorId(cfg.getCurrentUser().getId());
cfg.setAuditTime(new Date());
if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过设置有效标志为0
cfg.setIsValid(Constants.VALID_NO);
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过设置有效标志为1
cfg.setIsValid(Constants.VALID_YES);
}
int result=appCfgService.auditAppCfg(cfg);
model.addAttribute("serviceId", cfg.getServiceId());
model.addAttribute("action", cfg.getAction());
}
}
return "redirect:" + adminPath + "/cfg/app/list";
}
/**
*
* auditAppCfg(删除IP配置逻辑删除)
* (这里描述这个方法适用条件 可选)
* @return
*String
* @exception
* @since 1.0.0
*/
@RequestMapping(value = {"deleteCfg"})
public String deleteAppCfg(int action,long cfgId,String cfgName,Integer serviceId,Model model) {
model.addAttribute("serviceId", serviceId);
model.addAttribute("cfgName", cfgName);
model.addAttribute("action", action);
model.addAttribute("cfgType","complex");
model.addAttribute("audit", Constants.CFG_PAGE);
int audit=appCfgService.getIsAudit(cfgId);
//未审核时可删除
if(audit!=Constants.AUDIT_YES){
AppIdCfg cfg=new AppIdCfg();
cfg.setCfgId(cfgId);
cfg.setEditorId(cfg.getCurrentUser().getId());
cfg.setEditTime(new Date());
cfg.setIsValid(Constants.VALID_DEL);
int result=appCfgService.deleteAppCfg(cfg);
addMessage(model,"删除成功,正在为您跳转页面...");
}else{
logger.error("通过审核的配置不能删除!");
}
return "/cfg/resultPage";
}
/**
*
* getCompileId(获取编译ID)
* (这里描述这个方法适用条件 可选)
* @return
*long
* @exception
* @since 1.0.0
*/
protected Integer getCompileId(BaseCfg cfg){
return 0;
}
}

View File

@@ -1,11 +1,41 @@
package com.nis.web.dao.configuration;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.AppIdCfg;
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
/**
* 特定协议相关配置数据处理类
* @author dell
*
*/
public class AppCfgDao {
@MyBatisDao
public interface AppCfgDao extends CrudDao<AppIdCfg> {
public AppIdCfg getById(@Param("cfgId")Long id) ;
public AppIdCfg get(AppIdCfg entity) ;
public List<AppIdCfg> findList(AppIdCfg entity) ;
public int insert(AppIdCfg entity) ;
public int updateByPrimaryKeySelective(AppIdCfg entity) ;
public int updateValid(AppIdCfg entity) ;
public int audit(AppIdCfg entity) ;
// public int getIsValid(@Param("tableName")String tableName,@Param("cfgId")Long id);
public int getIsValid(@Param("cfgId")Long id);
// public int getIsAudit(@Param("tableName")String tableName,@Param("cfgId")Long id);
public int getIsAudit(@Param("cfgId")Long id);
public List<ComplexkeywordCfg> getComplexkeywordCfgList();
public List<AppFeaturesIndex> getFeaturesTableListByAppCompileId(@Param("appCompileId")Integer appCompileId) ;
public List<ComplexkeywordCfg> getFeaturesCfgListByCompileId(@Param("compileId")Integer compileId) ;
public int insertFeatures(AppFeaturesIndex entity) ;
public int updateFeaturesByAppId(AppFeaturesIndex entity) ;
public int deleteFeaturesByAppId(AppFeaturesIndex entity) ;
public List<ComplexkeywordCfg> getComplexkeywordFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
public List<BaseStringCfg> getStrFeaturesCfgListByCompileId(@Param("featuresTable") String featuresTable,@Param("compileId")Integer compileId);
}

View File

@@ -0,0 +1,562 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nis.web.dao.configuration.AppCfgDao" >
<resultMap id="AppCfgMap" type="com.nis.domain.configuration.AppIdCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="app_name" property="appName" jdbcType="VARCHAR" />
<result column="app_id" property="appId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="AppCfgMapWithUser" type="com.nis.domain.configuration.AppIdCfg" extends="AppCfgMap">
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="AppFeaturesTableCfgMap" type="com.nis.domain.configuration.AppIdCfg$AppFeaturesIndex" >
<id column="index_id" property="indexId" jdbcType="BIGINT" />
<result column="APP_COMPILE_ID" property="appCompileId" jdbcType="INTEGER" />
<result column="FEATURES_TABLE" property="featuresTable" jdbcType="VARCHAR" />
<result column="FEATURES_COMPILE_ID" property="featuresCompileId" jdbcType="INTEGER" />
<result column="FEATURES_TABLE_TYPE" property="featuresTableType" jdbcType="INTEGER" />
</resultMap>
<resultMap id="ComplexkeywordFeaturesCfgMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="district" property="district" jdbcType="VARCHAR" />
<result column="keywords" property="keywords" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="BaseStringFeaturesCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
<result column="request_id" property="requestId" jdbcType="INTEGER" />
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
<result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
</resultMap>
<sql id="BaseStringFeaturesCfg_Column_List_with_id" >
CFG_ID, CFG_DESC, CFG_KEYWORDS,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
</sql>
<sql id="ComplexkeywordFeaturesCfg_Column_List_with_id" >
CFG_ID, CFG_DESC,DISTRICT, KEYWORDS,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
</sql>
<sql id="AppCfg_Column_List_with_id" >
CFG_ID, CFG_DESC,APP_NAME, APP_ID,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS
</sql>
<sql id="AppCfg_Column_List_with_id_alias" >
<choose>
<when test="page !=null and page.alias != null and page.alias != ''">
${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc,${page.alias}.APP_NAME as appName, ${page.alias}.APP_ID as appId, ${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit,
${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime,
${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify,
${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,
${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds
</when>
<otherwise>
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.APP_NAME as appName, r.APP_ID as appId, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
r.ATTRIBUTE AS attribute,r.LABLE AS lable,
r.AREA_EFFECTIVE_IDS AS areaEffectiveIds
</otherwise>
</choose>
</sql>
<sql id="AppCfg_Column_List" >
CFG_DESC,APP_NAME,APP_ID, ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS
</sql>
<sql id="AppCfg_Value_List" >
#{cfgDesc,jdbcType=VARCHAR},#{appName,jdbcType=VARCHAR},#{appId,jdbcType=INTEGER},#{action,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR}
</sql>
<select id="getById" resultMap="AppCfgMap" parameterType="java.lang.Long" >
SELECT
<include refid="AppCfg_Column_List_with_id" />
FROM app_id_cfg
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
<select id="get" resultMap="AppCfgMap" >
SELECT
<include refid="AppCfg_Column_List_with_id" />
FROM app_id_cfg
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="cfgId != null">
AND CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null">
AND CFG_DESC=#{cfgDesc,jdbcType=VARCHAR}
</if>
<if test="appName != null">
AND APP_NAME=#{appName,jdbcType=VARCHAR}
</if>
<if test="appId != null">
AND APP_ID=#{appId,jdbcType=BIGINT}
</if>
<if test="action != null">
AND ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isAudit != null">
AND IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorId != null">
AND CREATOR_ID=#{creatorId,jdbcType=INTEGER}
</if>
<if test="createTime != null">
AND CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorId != null">
AND EDITOR_ID=#{editorId,jdbcType=INTEGER}
</if>
<if test="editTime != null">
AND EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorId != null">
AND AUDITOR_ID=#{auditorId,jdbcType=INTEGER}
</if>
<if test="auditTime != null">
AND AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null">
AND classify=#{classify,jdbcType=VARCHAR}
</if>
<if test="attribute != null">
AND attribute=#{attribute,jdbcType=VARCHAR}
</if>
<if test="lable != null">
AND lable=#{lable,jdbcType=VARCHAR}
</if>
<if test="areaEffectiveIds != null">
AND AREA_EFFECTIVE_IDS=#{areaEffectiveIds,jdbcType=VARCHAR}
</if>
</trim>
</select>
<select id="findList" resultMap="AppCfgMapWithUser">
select
<include refid="AppCfg_Column_List_with_id_alias"/>
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName
</trim>
from app_id_cfg r
left join sys_user s on r.creator_id=s.id
left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=2 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=3 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<choose>
<when test="page !=null and page.alias != null and page.alias != ''">
<if test="cfgId != null">
AND ${page.alias}.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND ${page.alias}.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="appName != null and appName != ''">
AND ${page.alias}.APP_NAME like concat(concat('%',#{appName,jdbcType=VARCHAR}),'%')
</if>
<if test="appId != null">
AND ${page.alias}.APP_ID=#{appId,jdbcType=BIGINT}
</if>
<if test="action != null">
AND ${page.alias}.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND ${page.alias}.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND ${page.alias}.IS_VALID != -1
</if>
<if test="isAudit != null">
AND ${page.alias}.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>
<if test="createTime != null and createTime != ''">
AND ${page.alias}.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorName != null and editorName != ''">
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<if test="editTime != null and editTime != ''">
AND ${page.alias}.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorName != null and auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</if>
<if test="auditTime != null and auditTime != ''">
AND ${page.alias}.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND ${page.alias}.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND ${page.alias}.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND ${page.alias}.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND ${page.alias}.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify != ''">
AND ${page.alias}.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
</if>
<if test="attribute != null and attribute != ''">
AND ${page.alias}.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="lable != null and lable != ''">
AND ${page.alias}.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND ${page.alias}.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
</when>
<otherwise>
<if test="cfgId != null">
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="appName != null and appName != ''">
AND r.APP_NAME like concat(concat('%',#{appName,jdbcType=VARCHAR}),'%')
</if>
<if test="appId != null">
AND r.APP_ID=#{appId,jdbcType=BIGINT}
</if>
<if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="isValid != null">
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="isValid == null">
AND r.IS_VALID != -1
</if>
<if test="isAudit != null">
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="creatorName != null and creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>
<if test="createTime != null and createTime != ''">
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
</if>
<if test="editorName != null and editorName != ''">
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<if test="editTime != null and editTime != ''">
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
</if>
<if test="auditorName != null and auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</if>
<if test="auditTime != null and auditTime != ''">
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
</if>
<if test="serviceId != null">
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="requestId != null">
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="classify != null and classify != ''">
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
</if>
<if test="attribute != null and attribute != ''">
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="lable != null and lable != ''">
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
</otherwise>
</choose>
</trim>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY CFG_ID desc
</otherwise>
</choose>
</select>
<select id="findAllList" resultMap="AppCfgMap">
select
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="AppCfg_Column_List_with_id"/>
</otherwise>
</choose>
from app_id_cfg
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
</trim>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY CFG_ID desc
</otherwise>
</choose>
</select>
<insert id="insert" parameterType="com.nis.domain.configuration.AppIdCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into app_id_cfg (
<include refid="AppCfg_Column_List" />
)values (
<include refid="AppCfg_Value_List" />
)
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.nis.domain.configuration.AppIdCfg" >
update app_id_cfg
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="appName != null and appName != ''">
APP_NAME = #{appName,jdbcType=VARCHAR},
</if>
<if test="appId != null">
APP_ID = #{appId,jdbcType=BIGINT},
</if>
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="creatorId != null" >
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
<if test="createTime != null and createTime != ''" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="auditorId != null" >
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null and auditTime != ''" >
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="compileId != null" >
compile_id = #{compileId,jdbcType=INTEGER},
</if>
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds != ''" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
</trim>
</set>
where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
<update id="updateValid" parameterType="com.nis.domain.configuration.AppIdCfg" >
update app_id_cfg set is_valid = #{isValid,jdbcType=INTEGER}, editor_id = #{editorId,jdbcType=INTEGER} , edit_time = #{editTime,jdbcType=TIMESTAMP} where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
<update id="audit" parameterType="com.nis.domain.configuration.AppIdCfg" >
update app_id_cfg 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>
where cfg_id = #{cfgId,jdbcType=BIGINT}
</update>
<select id="getIsValid" resultType="java.lang.Integer" parameterType="java.lang.Long" >
SELECT IS_VALID FROM app_id_cfg
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
<select id="getIsAudit" resultType="java.lang.Integer" parameterType="java.lang.Long" >
SELECT IS_AUDIT FROM app_id_cfg
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
<!-- 根据app_id_cfg表的compile_id查询协议特征配置表列表信息 -->
<select id="getFeaturesTableListByAppCompileId" resultMap="AppFeaturesTableCfgMap" parameterType="java.lang.Integer" >
SELECT INDEX_ID,app_compile_id,FEATURES_TABLE,features_compile_id,FEATURES_TABLE_TYPE FROM app_features_index f
WHERE f.app_compile_id = #{appCompileId,jdbcType=BIGINT}
</select>
<!-- 根据普通字符串配置特征表的compile_id查询配置信息 -->
<select id="getStrFeaturesCfgListByCompileId" resultMap="BaseStringFeaturesCfgMap" parameterType="java.lang.Integer" >
SELECT
<include refid="BaseStringFeaturesCfg_Column_List_with_id"/>
FROM ${featuresTable} c
WHERE c.COMPILE_ID =#{compileId,jdbcType=INTEGER}
</select>
<!-- 根据增强字符串配置特征表的compile_id查询配置信息 -->
<select id="getComplexkeywordFeaturesCfgListByCompileId" resultMap="ComplexkeywordFeaturesCfgMap" parameterType="java.lang.Integer" >
SELECT
<include refid="ComplexkeywordFeaturesCfg_Column_List_with_id"/>
FROM ${featuresTable} c
WHERE c.COMPILE_ID =#{compileId,jdbcType=INTEGER}
</select>
<insert id="insertFeatures" parameterType="com.nis.domain.configuration.AppIdCfg$AppFeaturesIndex" >
insert into app_features_index (INDEX_ID,APP_COMPILE_ID,FEATURES_TABLE,FEATURES_COMPILE_ID,FEATURES_TABLE_TYPE)
values
(#{indexId,jdbcType=BIGINT},#{appCompileId,jdbcType=INTEGER},#{featuresTable,jdbcType=VARCHAR},
#{featuresCompileId,jdbcType=INTEGER},#{featuresTableType,jdbcType=INTEGER}
)
</insert>
<!-- <update id="updateFeaturesByAppId" parameterType="com.nis.domain.configuration.AppIdCfg$AppFeaturesIndex" >
update app_features_index
<set >
<trim suffixOverrides=",">
<if test="featuresTable != null and featuresTable != ''" >
FEATURES_TABLE = #{featuresTable,jdbcType=VARCHAR},
</if>
<if test="featuresId != null ">
FEATURES_ID = #{featuresId,jdbcType=INTEGER},
</if>
</trim>
</set>
where APP_ID = #{appId,jdbcType=BIGINT}
</update>
<delete id="deleteFeaturesByAppId" parameterType="com.nis.domain.configuration.AppIdCfg$AppFeaturesIndex" >
delete app_features_index where APP_ID= #{appId,jdbcType=BIGINT}
</delete> -->
</mapper>

View File

@@ -1,6 +1,28 @@
package com.nis.web.service.configuration;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.nis.domain.Page;
import com.nis.domain.ServiceConfigInfo;
import com.nis.domain.configuration.AppIdCfg;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
import com.nis.domain.configuration.ComplexkeywordCfg;
import com.nis.main.ConvertTool;
import com.nis.util.StringUtil;
import com.nis.web.dao.configuration.AppCfgDao;
import com.nis.web.dao.configuration.ComplexStringCfgDao;
import com.nis.web.dao.configuration.StringCfgDao;
import com.nis.web.dao.systemService.ServiceConfigInfoDao;
import com.nis.web.service.CrudService;
/**
* 特定协议相关配置事务类
@@ -8,6 +30,296 @@ import org.springframework.stereotype.Service;
*
*/
@Service
public class AppCfgService {
public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
@Autowired
protected AppCfgDao appCfgDao;
@Autowired
protected ServiceConfigInfoDao serviceConfigInfoDao;
@Autowired
protected StringCfgDao stringCfgDao;
@Autowired
protected ComplexStringCfgDao complexStringCfgDao;
public Page<AppIdCfg> findPage(Page<AppIdCfg> page, AppIdCfg entity) {
entity.setPage(page);
List<AppIdCfg> list = dao.findList(entity);
page.setList(list);
return page;
}
public AppIdCfg findAppIdCfg(AppIdCfg entity) {
//查询协议关联特征表
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(entity.getCompileId());
List<ComplexkeywordCfg> complexList = new ArrayList();
List<BaseStringCfg> strList = new ArrayList();
if(!StringUtil.isEmpty(featuresTableList)){
for(AppFeaturesIndex features:featuresTableList){
if(features.getFeaturesTableType().equals(4)){//增强字符串特征配置
List<ComplexkeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
features.getFeaturesTable(),features.getFeaturesCompileId());
complexList.addAll(complexFeaturesList);
}else if(features.getFeaturesTableType().equals(2)){//普通字符串特征配置
List<BaseStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
features.getFeaturesTable(),features.getFeaturesCompileId());
strList.addAll(strFeaturesCfgList);
}
}
}
entity.setComplexFeaturesList(complexList);
entity.setStrFeaturesCfgList(strList);
return entity;
}
/**
*
* addAppCfg(新增IP类配置)
* (继承AppIdCfg这个类方可使用)
* @param cfg
* @return
*int
* @throws Exception
* @exception
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int addAppCfg(AppIdCfg cfg) throws Exception{
//通过配置转换工具获取compileId
Integer appCompileId = 0;
int cfgId = 0;
appCompileId = new ConvertTool().getCompileId();
cfg.setCompileId(appCompileId);
cfgId = appCfgDao.insert(cfg);
if(cfg.getComplexFeaturesList()!=null){
for(ComplexkeywordCfg c:cfg.getComplexFeaturesList()){
Integer featuresCompileId = new ConvertTool().getCompileId();
AppFeaturesIndex f = new AppFeaturesIndex();
f.setAppCompileId(cfg.getCompileId());
f.setFeaturesCompileId(featuresCompileId);
f.setFeaturesTableType(4);
f.setFeaturesTable(c.getTableName());
appCfgDao.insertFeatures(f);
c.setTableName(c.getTableName());
// c.initDefaultValue();
c.setAction(cfg.getAction());
c.setServiceId(cfg.getServiceId());
c.setCompileId(featuresCompileId);
c.setCreateTime(cfg.getCreateTime());
c.setCreatorId(cfg.getCreatorId());
c.setIsAudit(cfg.getIsAudit());
c.setIsValid(cfg.getIsValid());
c.setIsAreaEffective(cfg.getIsAreaEffective());
c.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
c.setAttribute(cfg.getAttribute());
c.setLable(cfg.getLable());
c.setClassify(cfg.getClassify());
c.setRequestId(cfg.getRequestId());
c.setCfgDesc(cfg.getCfgDesc());
complexStringCfgDao.insert(c);
}
}
if(cfg.getStrFeaturesCfgList()!=null){
for(BaseStringCfg s:cfg.getStrFeaturesCfgList()){
Integer featuresCompileId = new ConvertTool().getCompileId();
AppFeaturesIndex f = new AppFeaturesIndex();
f.setAppCompileId(cfg.getCompileId());
f.setFeaturesCompileId(featuresCompileId);
f.setFeaturesTableType(2);
f.setFeaturesTable(s.getTableName());
appCfgDao.insertFeatures(f);
s.setTableName(s.getTableName());
// s.initDefaultValue();
s.setAction(cfg.getAction());
s.setServiceId(cfg.getServiceId());
s.setCompileId(featuresCompileId);
s.setCreateTime(cfg.getCreateTime());
s.setCreatorId(cfg.getCreatorId());
s.setIsAudit(cfg.getIsAudit());
s.setIsValid(cfg.getIsValid());
s.setIsAreaEffective(cfg.getIsAreaEffective());
s.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
s.setAttribute(cfg.getAttribute());
s.setLable(cfg.getLable());
s.setClassify(cfg.getClassify());
s.setRequestId(cfg.getRequestId());
s.setCfgDesc(cfg.getCfgDesc());
stringCfgDao.insert(s);
}
}
return cfgId;
}
/**
*
* updateAppCfg(更新IP类配置)
* (继承AppIdCfg这个类方可使用)
* @param cfg
* @return
*int
* @throws Exception
* @exception
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int updateAppCfg(AppIdCfg cfg) throws Exception{
if(cfg.getComplexFeaturesList()!=null){
for(ComplexkeywordCfg c:cfg.getComplexFeaturesList()){
Integer featuresCompileId = 0;
c.setIsAreaEffective(cfg.getIsAreaEffective());
c.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
c.setAttribute(cfg.getAttribute());
c.setLable(cfg.getLable());
c.setClassify(cfg.getClassify());
c.setRequestId(cfg.getRequestId());
c.setCfgDesc(cfg.getCfgDesc());
c.setEditorId(cfg.getEditorId());
c.setEditTime(cfg.getEditTime());
if(c.getCompileId()==null){
featuresCompileId = new ConvertTool().getCompileId();
AppFeaturesIndex f = new AppFeaturesIndex();
f.setAppCompileId(cfg.getCompileId());
f.setFeaturesCompileId(featuresCompileId);
f.setFeaturesTableType(4);
f.setFeaturesTable(c.getTableName());
appCfgDao.insertFeatures(f);
c.setTableName(c.getTableName());
c.setAction(cfg.getAction());
c.setServiceId(cfg.getServiceId());
c.setCompileId(featuresCompileId);
c.setCreateTime(new Date());
c.setCreatorId(cfg.getCurrentUser().getId());
c.setIsAudit(cfg.getIsAudit());
c.setIsValid(cfg.getIsValid());
complexStringCfgDao.insert(c);
}else{
complexStringCfgDao.update(c);
}
}
}
if(cfg.getStrFeaturesCfgList()!=null){
for(BaseStringCfg s:cfg.getStrFeaturesCfgList()){
Integer featuresCompileId = 0;
s.setIsAreaEffective(cfg.getIsAreaEffective());
s.setAreaEffectiveIds(cfg.getAreaEffectiveIds());
s.setAttribute(cfg.getAttribute());
s.setLable(cfg.getLable());
s.setClassify(cfg.getClassify());
s.setRequestId(cfg.getRequestId());
s.setCfgDesc(cfg.getCfgDesc());
s.setEditorId(cfg.getEditorId());
s.setEditTime(cfg.getEditTime());
if(s.getCompileId()==null){
featuresCompileId = new ConvertTool().getCompileId();
AppFeaturesIndex f = new AppFeaturesIndex();
f.setAppCompileId(cfg.getCompileId());
f.setFeaturesCompileId(featuresCompileId);
f.setFeaturesTableType(2);
f.setFeaturesTable(s.getTableName());
appCfgDao.insertFeatures(f);
s.setTableName(s.getTableName());
s.setAction(cfg.getAction());
s.setServiceId(cfg.getServiceId());
s.setCompileId(featuresCompileId);
s.setCreateTime(new Date());
s.setCreatorId(cfg.getCurrentUser().getId());
s.setIsAudit(cfg.getIsAudit());
s.setIsValid(cfg.getIsValid());
stringCfgDao.insert(s);
}else{
stringCfgDao.update(s);
}
}
}
return appCfgDao.updateByPrimaryKeySelective(cfg);
}
/**
*
* auditAppCfg(审核IP类配置)
* (继承AppIdCfg这个类方可使用)
* @param cfg
* @return
*int
* @exception
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int auditAppCfg(AppIdCfg cfg){
return appCfgDao.audit(cfg);
}
/**
*
* deleteAppCfg(删除IP类配置)
* (继承AppIdCfg这个类方可使用)
* @param cfg
* @return
*int
* @exception
* @since 1.0.0
*/
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public int deleteAppCfg(AppIdCfg cfg){
return appCfgDao.updateValid(cfg);
}
/**
*
* getAppCfg(根据IP与类名获取IP配置)
* (继承AppIdCfg这个类方可使用)
* @param id
* @return
*AppIdCfg
* @exception
* @since 1.0.0
*/
public AppIdCfg getAppCfgById(long id){
return appCfgDao.getById(id);
}
/**
*
* getAppCfg(根据IP与类名获取IP配置)
* (继承AppIdCfg这个类方可使用)
* @param id
* @return
*AppIdCfg
* @exception
* @since 1.0.0
*/
public AppIdCfg getAppCfgById(AppIdCfg cfg){
cfg = appCfgDao.get(cfg);
List<AppFeaturesIndex> featuresTableList = appCfgDao.getFeaturesTableListByAppCompileId(cfg.getCompileId());
List<ComplexkeywordCfg> complexList = new ArrayList();
List<BaseStringCfg> strList = new ArrayList();
if(!StringUtil.isEmpty(featuresTableList)){
for(AppFeaturesIndex features:featuresTableList){
if(features.getFeaturesTableType().equals(4)){//增强字符串特征配置
List<ComplexkeywordCfg> complexFeaturesList = appCfgDao.getComplexkeywordFeaturesCfgListByCompileId(
features.getFeaturesTable(),features.getFeaturesCompileId());
complexList.addAll(complexFeaturesList);
}else if(features.getFeaturesTableType().equals(2)){//普通字符串特征配置
List<BaseStringCfg> strFeaturesCfgList = appCfgDao.getStrFeaturesCfgListByCompileId(
features.getFeaturesTable(),features.getFeaturesCompileId());
strList.addAll(strFeaturesCfgList);
}
}
}
cfg.setComplexFeaturesList(complexList);
cfg.setStrFeaturesCfgList(strList);
return cfg;
}
public Integer getIsValid(Long cfgId){
return appCfgDao.getIsValid(cfgId);
}
/*public Integer getIsValid(String tableName, long id){
return appCfgDao.getIsValid(tableName,id);
}*/
public Integer getIsAudit(Long cfgId){
return appCfgDao.getIsAudit(cfgId);
}
/*public Integer getIsAudit(String tableName, long id){
return appCfgDao.getIsAudit(tableName,id);
}*/
}

View File

@@ -268,7 +268,13 @@
<example>${fns:getDictListJson(dictKey)}</example>
</function>
<function>
<description>获取特征域字典对象列表</description>
<name>getFeaturesDictData</name>
<function-class>com.nis.util.DictUtils</function-class>
<function-signature>java.lang.String getFeaturesDictData(java.lang.String)</function-signature>
<example>${fns:getFeaturesDictData(itemCode)}</example>
</function>
<!-- DateUtils -->
<function>

View File

@@ -0,0 +1,302 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
$("#save").on("click",function(){
$("#cfgFrom").attr("action","${ctx}/cfg/app/saveOrUpdateCfg");
$("#save").submit();
});
$("#cancel").on("click",function(){
window.history.back();
});
$("#cfgFrom").validate({
submitHandler: function(form){
//loading('onloading...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
</div>
<!-- <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
</div> -->
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
<div class="form-body">
<h3 class="form-section"><spring:message code="block_config"/></h3>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
<div class="col-md-6">
<select name="appId" title="<spring:message code="select"/>" data-live-search="true" data-live-search-placeholder="search" class="required selectpicker form-control">
<c:forEach items="${protocolList}" var="app">
<option value="${app.specServiceId}" <c:if test="${app.specServiceId eq _cfg.appId}">selected</c:if>>
${app.specServiceName}
</option>
</c:forEach>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="config_describe"/></label>
<div class="col-md-6">
<input class="required form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" class="required" name="isAreaEffective" value="1"
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
><spring:message code="yes"/>
</label>
<label class="radio-inline">
<input type="radio" class="required" name="isAreaEffective" value="0"
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
><spring:message code="no"/>
</label>
<%-- <input class="form-control" type="text" name="isAreaEffective" value="${_cfg.isAreaEffective}"> --%>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><spring:message code="area_effect_id"></spring:message></label>
<div class="col-md-6">
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
</div>
</div>
</div>
<c:if test="${fn:length(featuresList)>0}">
<c:set var="index1" value="0"/>
<c:set var="index2" value="0"/>
<c:forEach items="${featuresList }" var="features" >
<c:if test="${features.tableType eq 2}">
<h3 class="form-section"><spring:message code="${features.tableDesc}"/></h3>
<input type="hidden" name="strFeaturesCfgList[${index1}].tableName" value="${features.tableName }"/>
<input type="hidden" name="strFeaturesCfgList[${index1}].cfgId" value="${_cfg.strFeaturesCfgList[index1].cfgId }"/>
<input type="hidden" name="strFeaturesCfgList[${index1}].compileId" value="${_cfg.strFeaturesCfgList[index1].compileId }"/>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="strFeaturesCfgList[${index1}].cfgKeywords" value="${_cfg.strFeaturesCfgList[index1].cfgKeywords }">
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" class="required" name="strFeaturesCfgList[${index1}].exprType" value="1"
<c:if test="${_cfg.strFeaturesCfgList[index1].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" class ="required" name="strFeaturesCfgList[${index1}].exprType" value="0"
<c:if test="${_cfg.strFeaturesCfgList[index1].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</div>
<div for="exprType"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<select name="strFeaturesCfgList[${index1}].matchMethod" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</div>
<div for="matchMethod"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<select name="strFeaturesCfgList[${index1}].isHexbin" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</div>
<div for="isHexbin"></div>
</div>
</div>
</div>
<c:set var="index1" value="${index1+1 }"/>
</c:if>
<c:if test="${features.tableType eq 4}">
<h3 class="form-section"><spring:message code="${features.tableDesc}"/></h3>
<input type="hidden" name="complexFeaturesList[${index2}].tableName" value="${features.tableName }"/>
<input type="hidden" name="complexFeaturesList[${index2}].cfgId" value="${_cfg.complexFeaturesList[index2].cfgId }"/>
<input type="hidden" name="complexFeaturesList[${index2}].compileId" value="${_cfg.complexFeaturesList[index2].compileId }"/>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].district" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<c:forEach items="${fns:getFeaturesDictData(features.tableName) }" var="item">
<option value="${item.itemValue }" <c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">selected</c:if>><spring:message code="${item.itemValue}"></spring:message></option>
</c:forEach>
</select>
<%-- <input class="required form-control" type="text" name="complexFeaturesList[${index2}].district" value="${_cfg.complexFeaturesList[index2].district }"> --%>
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<input class="required form-control" type="text" name="complexFeaturesList[${index2}].keywords" value="${_cfg.complexFeaturesList[index2].keywords }">
</div>
<div for="cfgDesc"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" class="required" name="complexFeaturesList[${index2}].exprType" value="1"
<c:if test="${_cfg.complexFeaturesList[index2].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" class="required" name="complexFeaturesList[${index2}].exprType" value="0"
<c:if test="${_cfg.complexFeaturesList[index2].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</div>
<div for="exprType"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].matchMethod" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</div>
<div for="matchMethod"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].isHexbin" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</div>
<div for="isHexbin"></div>
</div>
</div>
</div>
<c:set var="index2" value="${index2+1 }"/>
</c:if>
</c:forEach>
</c:if>
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<input type="hidden" name="audit" value="${audit}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="action" value="${_cfg.action}">
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,417 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script>
$(document).ready(function() {
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#appId").change(function(){
page();
});
//reset
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
$(this).selectpicker('val',$(this).find('option:first').val());
$(this).find("option").attr("selected",false);
$(this).find("option:first").attr("selected",true);
});
$(".Wdate").attr("value",'');
$("#keywords").attr("value",'');
$("#searchForm")[0].reset();
});
});
//查询
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<%-- <button type="button" class="btn btn-default" onclick="location='${ctx}/cfg/app/list?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="refresh"></spring:message></button> --%>
<c:if test="${audit==0}">
<shiro:hasPermission name="cfg:add">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/app/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}'"><spring:message code="add"></spring:message></button>
</shiro:hasPermission>
</c:if>
</div>
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/app/list" method="post" class="form-search">
<input id="cfgName" name="cfgName" type="hidden" value="${cfgName}"/>
<input id="action" name="action" type="hidden" value="${action}"/>
<input id="serviceId" name="serviceId" type="hidden" value="${serviceId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<c:set var="state"><spring:message code='state'/></c:set>
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="all_states"/></form:option>
<form:option value="0"><spring:message code="created"></spring:message></form:option>
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
</form:select>
</div>
<div class="pull-left">
<form:select path="appId" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${protocolList}" var="app">
<form:option value="${app.specServiceId}">
${app.specServiceName}
</form:option>
</c:forEach>
</form:select>
</div>
<%-- <div class="pull-left">
<spring:message code="config_describe"></spring:message>
<form:input path="cfgDesc"/>
</div> --%>
<%-- <button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button> --%>
<%-- <div class="pull-left">
<c:set var="sortI18n"><spring:message code="sort"/></c:set>
<select name="orderBy" class="selectpicker select2 input-small">
<option value="" <c:if test="${empty page.orderBy}">selected</c:if> ><spring:message code="${sortI18n}"/></option>
<option value="${page.alias}.create_time asc" <c:if test="${fn:contains(page.orderBy,'create_time asc') }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="${page.alias}.create_time desc" <c:if test="${fn:contains(page.orderBy , 'create_time desc') }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="${page.alias}.edit_time asc" <c:if test="${fn:contains(page.orderBy , 'edit_time asc') }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="${page.alias}.edit_time desc" <c:if test="${fn:contains(page.orderBy , 'edit_time desc') }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="${page.alias}.audit_time asc" <c:if test="${fn:contains(page.orderBy , 'audit_time asc') }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="${page.alias}.audit_time desc" <c:if test="${fn:contains(page.orderBy , 'audit_time desc') }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div> --%>
<div class="pull-left">
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" onClick="resetx()"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
<!-- /搜索内容与操作按钮栏 -->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='request_number'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="requestId" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${requestInfos}" var="requestInfo" >
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='type'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="classify" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='attribute'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="attribute" class="selectpicker form-control" title="${select}" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='label'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="lable" class="selectpicker form-control" title="${select }" data-live-search="true" data-live-search-placeholder="search">
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="config_time"/></label>
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="edit_time"/></label>
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code="config_describe"/></th>
<th><spring:message code="protocol_id"/></th>
<th><spring:message code="protocol_name"/></th>
<c:if test="${isContainFeaturesCfg}">
<th><spring:message code="features_config"/></th>
</c:if>
<th><spring:message code="block_type"/></th>
<!-- <th>业务id</th> -->
<th><spring:message code="letter"/></th>
<!-- <th>编译id</th> -->
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="type"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<!-- <th>区域生效id</th> -->
<th><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<th><spring:message code="creator"/></th>
<th><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
<th><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th><spring:message code="audit_time"/></th>
<th><spring:message code="operation"></spring:message></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
<tr>
<td>${cfg.cfgDesc }</td>
<td>${cfg.appId }</td>
<td>${cfg.appName }</td>
<c:if test="${isContainFeaturesCfg}">
<td>
<a href="${ctx}/cfg/app/showFeaturesCfg?serviceId=${cfg.serviceId}&compileId=${cfg.compileId }&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}">
<spring:message code="show"></spring:message>
</a>
</td>
</c:if>
<td>
<c:if test="${1 eq cfg.action }"><spring:message code="block"/></c:if>
<c:if test="${2 eq cfg.action }"><spring:message code="monitor"/></c:if>
<c:if test="${5 eq cfg.action }"><spring:message code="block_white_list"/></c:if>
<c:if test="${6 eq cfg.action }"><spring:message code="monitor_white_list"/></c:if>
<c:if test="${7 eq cfg.action }"><spring:message code="block_monitor_white_list"/></c:if>
<c:if test="${8 eq cfg.action }"><spring:message code="grey_list"/></c:if>
</td>
<%-- <td>${cfg.serviceId }</td> --%>
<td>${cfg.requestName }</td>
<%-- <td>${cfg.compileId }</td> --%>
<td>
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${cfg.isAreaEffective==1}"><spring:message code="yes"/></c:if>
</td>
<td>
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
</c:forEach>
${classifyName[status]}
</td>
<td>
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
<td>
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td>${cfg.creatorName }</td>
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${cfg.editorName }</td>
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${cfg.auditorName }</td>
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<c:if test="${audit==0}">
<c:choose>
<c:when test="${cfg.isAudit eq '2'}">
<shiro:hasPermission name="cfg:edit">
<li><a href="${ctx}/cfg/app/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
</shiro:hasPermission>
</c:when>
<c:when test="${cfg.isAudit eq '0'}">
<shiro:hasPermission name="cfg:edit">
<li><a href="${ctx}/cfg/app/updateForm?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="cfg:delete">
<li><a href="${ctx}/cfg/app/deleteCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</shiro:hasPermission>
</c:when>
</c:choose>
</c:if>
<c:if test="${audit==1}">
<c:choose>
<c:when test="${cfg.isAudit eq '1'}">
<shiro:hasPermission name="cfg:audit:cancel">
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=3&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="cancel"></spring:message></a></li>
</shiro:hasPermission>
</c:when>
<c:when test="${cfg.isAudit eq '0'}">
<shiro:hasPermission name="cfg:audit:valid">
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=1&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
</shiro:hasPermission>
<shiro:hasPermission name="cfg:audit:invalid">
<li><a href="${ctx}/cfg/app/auditCfg?serviceId=${cfg.serviceId}&action=${cfg.action}&cfgId=${cfg.cfgId}&isAudit=2&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
</shiro:hasPermission>
</c:when>
</c:choose>
</c:if>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
<style>
.input-medium {
width: 200px !important;
}
.Wdate {
border: #c2cad8 1px solid;
height: 26px;
}
.dropdown-menu {
min-width: 50px;
}
</style>
</body>
</html>

View File

@@ -0,0 +1,226 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
$("#cfgFrom").find("input,select,radio").attr("disabled",true);
$("#cancel").on("click",function(){
window.history.back();
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>
<spring:message code="show"></spring:message>
</div>
<!-- <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
<a href="#portlet-config" data-toggle="modal" class="config" data-original-title="" title=""> </a>
<a href="javascript:;" class="reload" data-original-title="" title=""> </a>
<a href="javascript:;" class="remove" data-original-title="" title=""> </a>
</div> -->
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="#" method="post" class="form-horizontal">
<div class="form-body">
<c:if test="${fn:length(featuresList)>0}">
<c:set var="index1" value="0"/>
<c:set var="index2" value="0"/>
<c:forEach items="${featuresList }" var="features" >
<c:if test="${features.tableType eq 2}">
<h3 class="form-section"><spring:message code="${features.tableDesc}"/></h3>
<input type="hidden" name="strFeaturesCfgList[${index1}].tableName" value="${features.tableName }"/>
<input type="hidden" name="strFeaturesCfgList[${index1}].compileId" value="${_cfg.strFeaturesCfgList[index1].compileId }"/>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<input class="form-control required" type="text" name="strFeaturesCfgList[${index1}].cfgKeywords" value="${_cfg.strFeaturesCfgList[index1].cfgKeywords }">
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" class="required" name="strFeaturesCfgList[${index1}].exprType" value="1"
<c:if test="${_cfg.strFeaturesCfgList[index1].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" class ="required" name="strFeaturesCfgList[${index1}].exprType" value="0"
<c:if test="${_cfg.strFeaturesCfgList[index1].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</div>
<div for="exprType"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<select name="strFeaturesCfgList[${index1}].matchMethod" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.strFeaturesCfgList[index1].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</div>
<div for="matchMethod"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<select name="strFeaturesCfgList[${index1}].isHexbin" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.strFeaturesCfgList[index1].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</div>
<div for="isHexbin"></div>
</div>
</div>
</div>
<c:set var="index1" value="${index1+1 }"/>
</c:if>
<c:if test="${features.tableType eq 4}">
<h3 class="form-section"><spring:message code="${features.tableDesc}"/></h3>
<input type="hidden" name="complexFeaturesList[${index2}].tableName" value="${features.tableName }"/>
<input type="hidden" name="complexFeaturesList[${index2}].compileId" value="${_cfg.complexFeaturesList[index2].compileId }"/>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_area"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].district" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<c:forEach items="${fns:getFeaturesDictData(features.tableName) }" var="item">
<option value="${item.itemValue }" <c:if test="${_cfg.complexFeaturesList[index2].district==item.itemValue }">selected</c:if>><spring:message code="${item.itemValue}"></spring:message></option>
</c:forEach>
</select>
<%-- <input class="required form-control" type="text" name="complexFeaturesList[${index2}].district" value="${_cfg.complexFeaturesList[index2].district }"> --%>
</div>
<div for="cfgDesc"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<input class="required form-control" type="text" name="complexFeaturesList[${index2}].keywords" value="${_cfg.complexFeaturesList[index2].keywords }">
</div>
<div for="cfgDesc"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" class="required" name="complexFeaturesList[${index2}].exprType" value="1"
<c:if test="${_cfg.complexFeaturesList[index2].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" class="required" name="complexFeaturesList[${index2}].exprType" value="0"
<c:if test="${_cfg.complexFeaturesList[index2].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</div>
<div for="exprType"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].matchMethod" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexFeaturesList[index2].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</div>
<div for="matchMethod"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<select name="complexFeaturesList[${index2}].isHexbin" class="required selectpicker select2 form-control" title="<spring:message code="select"/>" >
<option value="0" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexFeaturesList[index2].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</div>
<div for="isHexbin"></div>
</div>
</div>
</div>
<c:set var="index2" value="${index2+1 }"/>
</c:if>
</c:forEach>
</c:if>
<c:if test="${not empty _cfg.cfgId}">
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
</c:if>
<input type="hidden" name="audit" value="${audit}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="action" value="${_cfg.action}">
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>