diff --git a/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java b/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java index bace8c006..9fb349789 100644 --- a/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java @@ -33,7 +33,7 @@ public class AppTopicDomainCfg extends BaseCfg { private String domain; private String cfgKeywords; private String appName; - private Integer topic; + private String topic; @Expose @ExcelField(title="expression_type") @@ -51,11 +51,11 @@ public class AppTopicDomainCfg extends BaseCfg { protected Integer isHexbin; - public Integer getTopic() { + public String getTopic() { return topic; } - public void setTopic(Integer topic) { + public void setTopic(String topic) { this.topic = topic; } diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index 9c79e0eee..5bc3c325c 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -30,9 +30,11 @@ import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.specific.SpecificServiceCfg; import com.nis.exceptions.CallExternalProceduresException; import com.nis.exceptions.MaatConvertException; +import com.nis.util.CodeDicUtils; import com.nis.util.Constants; import com.nis.util.DictUtils; import com.nis.web.controller.BaseController; +import com.nis.web.dao.dashboard.codedic.CodeResult; import com.nis.web.security.UserUtils; /** @@ -879,10 +881,19 @@ public class AppCfgController extends BaseController { public String TopicDomainCfgList(Model model,@ModelAttribute("cfg")AppTopicDomainCfg cfg,HttpServletRequest request,HttpServletResponse response) { Page searchPage=new Page(request,response,"r"); Page page = appCfgService.findAppTopicDomainList(searchPage, cfg); -// for(AppDomainCfg entity:page.getList()){ +// for(AppTopicDomainCfg entity:page.getList()){ // SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); // entity.setAppName(app.getSpecServiceName()); // } + //设置topic主题 + for (AppTopicDomainCfg entity:page.getList()) { + List codeList = CodeDicUtils.getCodeList("serviceCode"); + for (CodeResult codeResult : codeList) { + if(null!=entity.getTopic()&&codeResult.getCode().equals(entity.getTopic())){ + entity.setAppName(codeResult.getItem()); + } + } + } model.addAttribute("page", page); initPageCondition(model,cfg); return "/cfg/app/appTopicDomainCfgList"; @@ -896,7 +907,7 @@ public class AppCfgController extends BaseController { */ @RequestMapping(value = {"topicDomainCfgForm"}) @RequiresPermissions(value={"app:topic:config"}) - public String topicDomainCfgForm(Model model,String ids,AppTopicDomainCfg entity) { + public String topicDomainCfgForm(Model model,String ids,@ModelAttribute("_cfg")AppTopicDomainCfg entity) { if(StringUtils.isNotBlank(ids)){ entity = appCfgService.getAppTopicDomainCfg(Long.parseLong(ids)); initUpdateFormCondition(model,entity); diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index af72be5b4..12a2cb593 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -140,7 +140,7 @@ - + @@ -398,7 +398,7 @@ #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER} - #{topic,jdbcType=INTEGER},#{behavCode,jdbcType=INTEGER},#{specServiceId,jdbcType=INTEGER}, + #{topic,jdbcType=VARCHAR},#{behavCode,jdbcType=INTEGER},#{specServiceId,jdbcType=INTEGER}, #{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP}, @@ -980,6 +980,7 @@ + + <%-- --%> + + + + + + <%-- --%> +
@@ -153,14 +158,14 @@ $(function(){
- <%--
+ --%> +
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp index 5ff34f585..0587bc18b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appTopicDomainCfgList.jsp @@ -304,7 +304,7 @@ ${cfg.compileId } ${cfg.cfgDesc } - ${cfg.topic } + ${cfg.appName } ${cfg.domain }