关键字转url时,新增的http url配置来函取自关键字配置
This commit is contained in:
@@ -138,9 +138,12 @@ public class WhiteListController extends CommonController{
|
||||
@RequestMapping(value = {"saveHttpUrlCfgs"})
|
||||
public String saveHttpUrlCfgs(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,CfgIndexInfo entity) {
|
||||
if(!StringUtil.isEmpty(entity) && !StringUtil.isEmpty(entity.getHttpUrlList())){
|
||||
|
||||
CfgIndexInfo sourceCfg=websiteCfgService.getCfgIndexInfo(entity.getHttpUrlList().get(0).getSourceCompileId());
|
||||
for (HttpUrlCfg httpUrlCfg : entity.getHttpUrlList()) {
|
||||
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||
List httpList=new ArrayList<>();
|
||||
httpUrlCfg.setRequestId(sourceCfg.getRequestId());
|
||||
BeanUtils.copyProperties(httpUrlCfg, cfg);
|
||||
httpList.add(httpUrlCfg);
|
||||
cfg.setHttpUrlList(httpList);
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
and cfg_id=#{cfgId}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and compileId=#{compileId}
|
||||
and compile_id=#{compileId}
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
and function_id=#{functionId}
|
||||
|
||||
@@ -62,6 +62,15 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
||||
@Autowired
|
||||
private ServiceDictInfoDao serviceDictInfoDao;
|
||||
|
||||
public CfgIndexInfo getCfgIndexInfo(Integer compileId){
|
||||
CfgIndexInfo entity=new CfgIndexInfo();
|
||||
entity.setCompileId(compileId);
|
||||
List<CfgIndexInfo> cfgs=websiteCfgDao.getCfgIndexInfos(entity);
|
||||
if(!StringUtil.isEmpty(cfgs)){
|
||||
entity=cfgs.get(0);
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
public CfgIndexInfo getHttpCfg(Long cfgId){
|
||||
CfgIndexInfo entity = websiteCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
|
||||
|
||||
Reference in New Issue
Block a user