代理文件批量审核
This commit is contained in:
@@ -85,43 +85,47 @@ public class ProxyFileStrategyService extends BaseService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||||
public void audit(Integer isAudit,Integer isValid,Integer functionId,String id){
|
public void audit(Integer isAudit,Integer isValid,Integer functionId,String ids){
|
||||||
Date auditTime = new Date();//审核时间
|
Date auditTime = new Date();//审核时间
|
||||||
ProxyFileStrategyCfg entity = proxyFileDao.getCfgById(Long.parseLong(id));
|
String[] idArray = ids.split(",");
|
||||||
entity.setIsAudit(isAudit);
|
for(String id : idArray) {
|
||||||
entity.setIsValid(isValid);
|
ProxyFileStrategyCfg entity = proxyFileDao.getCfgById(Long.parseLong(id));
|
||||||
entity.setAuditorId(UserUtils.getUser().getId());
|
entity.setIsAudit(isAudit);
|
||||||
entity.setAuditTime(auditTime);
|
entity.setIsValid(isValid);
|
||||||
proxyFileDao.update(entity);
|
entity.setAuditorId(UserUtils.getUser().getId());
|
||||||
if(isAudit == 1) {//审核通过,下发配置回调配置信息
|
entity.setAuditTime(auditTime);
|
||||||
Map<String,Object> params = Maps.newHashMap();
|
proxyFileDao.update(entity);
|
||||||
params.put("fileId", entity.getCompileId());//文件ID
|
if(isAudit == 1) {//审核通过,下发配置回调配置信息
|
||||||
params.put("service", entity.getServiceId());//业务ID
|
Map<String,Object> params = Maps.newHashMap();
|
||||||
params.put("fileDesc", entity.getFileDesc());//文件描述
|
params.put("fileId", entity.getCompileId());//文件ID
|
||||||
params.put("contentType", entity.getContentType());//内容类型
|
params.put("service", entity.getServiceId());//业务ID
|
||||||
params.put("contentLength", entity.getContentLength());//文件长度
|
params.put("fileDesc", entity.getFileDesc());//文件描述
|
||||||
params.put("filePath", entity.getUrl());//文件路径
|
params.put("contentType", entity.getContentType());//内容类型
|
||||||
params.put("isValid", 1);//有效标志,有效
|
params.put("contentLength", entity.getContentLength());//文件长度
|
||||||
params.put("opTime", new Date());
|
params.put("filePath", entity.getUrl());//文件路径
|
||||||
List list = Lists.newArrayList();
|
params.put("isValid", 1);//有效标志,有效
|
||||||
list.add(params);
|
params.put("opTime", new Date());
|
||||||
String json = gsonToJson(list);
|
List list = Lists.newArrayList();
|
||||||
logger.debug("params:" + json);
|
list.add(params);
|
||||||
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
String json = gsonToJson(list);
|
||||||
logger.debug("响应:"+gsonToJson(result));
|
logger.debug("params:" + json);
|
||||||
}else if(isAudit == 3) {//取消审核通过,将回调配置信息置为无效
|
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
|
||||||
Map<String,Object> params = Maps.newHashMap();
|
logger.debug("响应:"+gsonToJson(result));
|
||||||
params.put("fileId", entity.getCompileId());//文件ID
|
}else if(isAudit == 3) {//取消审核通过,将回调配置信息置为无效
|
||||||
params.put("service", entity.getServiceId());//业务ID
|
Map<String,Object> params = Maps.newHashMap();
|
||||||
params.put("isValid", 0);//有效标志,无效
|
params.put("fileId", entity.getCompileId());//文件ID
|
||||||
params.put("opTime", new Date());
|
params.put("service", entity.getServiceId());//业务ID
|
||||||
List list = Lists.newArrayList();
|
params.put("isValid", 0);//有效标志,无效
|
||||||
list.add(params);
|
params.put("opTime", new Date());
|
||||||
String json = gsonToJson(list);
|
List list = Lists.newArrayList();
|
||||||
logger.debug("params:" + json);
|
list.add(params);
|
||||||
ToMaatResult result = ConfigServiceUtil.put(json,2);
|
String json = gsonToJson(list);
|
||||||
logger.debug("响应:"+gsonToJson(result));
|
logger.debug("params:" + json);
|
||||||
|
ToMaatResult result = ConfigServiceUtil.put(json,2);
|
||||||
|
logger.debug("响应:"+gsonToJson(result));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user