列表查询子配置处理
This commit is contained in:
@@ -14,6 +14,7 @@ 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 org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
@@ -58,6 +59,24 @@ public class WebsiteController extends BaseController{
|
||||
public String httpForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids));
|
||||
if(entity.getIpPortList().size()==0){
|
||||
entity.getIpPortList().add(new IpPortCfg());
|
||||
}
|
||||
if(entity.getHttpUrlList().size()==0){
|
||||
entity.getHttpUrlList().add(new HttpUrlCfg());
|
||||
}
|
||||
if(entity.getHttpReqHdrList().size()==0){
|
||||
entity.getHttpReqHdrList().add(new HttpReqHeadCfg());
|
||||
}
|
||||
if(entity.getHttpResHdrList().size()==0){
|
||||
entity.getHttpResHdrList().add(new HttpResHeadCfg());
|
||||
}
|
||||
if(entity.getHttpReqBodyList().size()==0){
|
||||
entity.getHttpReqBodyList().add(new HttpBodyCfg());
|
||||
}
|
||||
if(entity.getHttpResBodyList().size()==0){
|
||||
entity.getHttpResBodyList().add(new HttpBodyCfg());
|
||||
}
|
||||
}else{
|
||||
List<IpPortCfg> ipList=new ArrayList<IpPortCfg>();
|
||||
ipList.add(new IpPortCfg());
|
||||
@@ -88,4 +107,11 @@ public class WebsiteController extends BaseController{
|
||||
websiteCfgService.saveHttpCfg(entity);
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
@RequestMapping(value = {"ajaxHttpSubList"})
|
||||
public String ajaxHttpSubList(Model model,Long cfgId,Integer index) {
|
||||
CfgIndexInfo cfg = websiteCfgService.getHttpCfg(cfgId);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
return "/cfg/website/httpSubList";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user