优化app topic domain界面,去掉domain重复性判断
This commit is contained in:
@@ -1083,17 +1083,14 @@ public class AppCfgController extends BaseController {
|
||||
@RequestMapping(value = {"saveAppTopicDomainCfg"})
|
||||
@RequiresPermissions(value={"app:topic:config"})
|
||||
public String saveAppTopicDomainCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
AppTopicDomainCfg entity,@RequestParam("userDomain")String userDomain,RedirectAttributes redirectAttributes) {
|
||||
AppTopicDomainCfg entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
//验证域名的重复行
|
||||
if(!StringUtil.isBlank(userDomain)){
|
||||
if(!StringUtil.isBlank(entity.getDomain())){
|
||||
WebsiteDomainTopic websiteDomainTopic = new WebsiteDomainTopic();
|
||||
websiteDomainTopic.setDomain(userDomain);
|
||||
websiteDomainTopic.setDomain(entity.getDomain());
|
||||
List<WebsiteDomainTopic> domainDict = appCfgService.getDomainDict(websiteDomainTopic);
|
||||
if((domainDict!=null&&domainDict.size()>0)){
|
||||
addMessage(redirectAttributes,"domain_existed");
|
||||
return "redirect:" + adminPath +"/app/topicDomainCfgList?functionId="+entity.getFunctionId();
|
||||
}else{
|
||||
if((domainDict==null || domainDict.size()==0)){
|
||||
//保存到域名关联表中
|
||||
if(entity!=null&&entity.getWebsiteServiceId()!=null&&entity.getTopicId()!=null){
|
||||
websiteDomainTopic.setWebsiteServiceId(entity.getWebsiteServiceId());
|
||||
@@ -1108,8 +1105,8 @@ public class AppCfgController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity!=null&&StringUtil.isBlank(entity.getDomain())&&!StringUtil.isBlank(userDomain)){
|
||||
entity.setDomain(userDomain);//自定义域名
|
||||
if(entity!=null&&StringUtil.isBlank(entity.getDomain())&&!StringUtil.isBlank(entity.getDomain())){
|
||||
entity.setDomain(entity.getDomain());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppTopicDomainCfg(entity);
|
||||
addMessage(redirectAttributes,"save_success");
|
||||
|
||||
Reference in New Issue
Block a user