APP策略、文件摘要加SubscribeId域.
This commit is contained in:
@@ -225,7 +225,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
entity.setCreateTime(date);
|
||||
fileTime=entity.getCreateTime();
|
||||
}
|
||||
ToMaatResult result = null;
|
||||
ToMaatResult result = new ToMaatResult();
|
||||
if(file!=null && file.getSize()>0 && entity!=null){
|
||||
String sep = System.getProperty("file.separator");
|
||||
String digestFilePath = request.getRealPath("/")+"digestFile";
|
||||
@@ -245,6 +245,9 @@ public class FileTransferCfgController extends BaseController{
|
||||
String md5 = DigestUtils.md5Hex(file.getBytes());
|
||||
fileMap.put("checksum", md5);
|
||||
result = ConfigServiceUtil.getFileDigest(null, uploadFile, JsonMapper.toJsonString(fileMap));
|
||||
if((result.getData().getRawLen() == null) || (result.getData().getDigest() == null)) {
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+null);
|
||||
}
|
||||
logger.info("获取文件摘要响应信息:"+result);
|
||||
}
|
||||
fileTransferCfgService.saveOrUpdateFileDigestCfg(entity,result,areaCfgIds);
|
||||
@@ -282,6 +285,25 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"ajaxFileDigestSubIdList"})
|
||||
public String ajaxFileDigestSubIdList(Model model,Long cfgId,Integer index) {
|
||||
FileDigestCfg cfg = fileTransferCfgService.getFileDigestSubIdCfg(cfgId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
//查询SubscribeId域配置
|
||||
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||
String cfgType = null;
|
||||
for(NtcSubscribeIdCfg ntc:cfg.getNtcSubscribeIdCfgList()){
|
||||
if(!ntc.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",ntc.getCfgType()});
|
||||
cfgType = ntc.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/fileDigestSubList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pList"})
|
||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
|
||||
Reference in New Issue
Block a user