|
@@ -89,6 +89,8 @@ public class AuditRejectedResubmitServiceImpl implements AuditRejectedResubmitSe
|
|
|
log.info("进行重提:{}", reviewDetail);
|
|
|
Integer submit_size = obj.getSubmitSize();
|
|
|
if (submit_size < 2) {
|
|
|
+ String imageToken=null;
|
|
|
+ List<Map<String, String>> documentByAccountId=null;
|
|
|
JSONObject updateJson = new JSONObject();
|
|
|
updateJson.put("creativeId", obj.getCreativeId());
|
|
|
//更换封面
|
|
@@ -97,29 +99,31 @@ public class AuditRejectedResubmitServiceImpl implements AuditRejectedResubmitSe
|
|
|
if (!Check.isNull(cutJson)) {
|
|
|
String signature = cutJson.getString("signature");
|
|
|
String url = cutJson.getString("url");
|
|
|
- String imageToken = getImageToken(signature, obj.getAccountId(), oauthToken.getAccessToken(), url);
|
|
|
- if (!Check.isNull(imageToken)) {
|
|
|
- updateJson.put("imageToken", imageToken);
|
|
|
- }
|
|
|
+ imageToken = getImageToken(signature, obj.getAccountId(), oauthToken.getAccessToken(), url);
|
|
|
+
|
|
|
}
|
|
|
//更换文案
|
|
|
- List<Map<String, String>> documentByAccountId = documentLibraryMapper.getDocumentByAccountId(String.valueOf(obj.getAccountId()), obj.getCopyWriterId());
|
|
|
- if (!documentByAccountId.isEmpty() && documentByAccountId.size() > 0) {
|
|
|
+ documentByAccountId = documentLibraryMapper.getDocumentByAccountId(String.valueOf(obj.getAccountId()), obj.getCopyWriterId());
|
|
|
+ if(!Check.isNull(imageToken)&&documentByAccountId!=null&&documentByAccountId.size()>0){
|
|
|
+ updateJson.put("imageToken", imageToken);
|
|
|
updateJson.put("description", documentByAccountId.get(0).get("copyWriter"));
|
|
|
- }
|
|
|
- Map<String, Object> creativeMap = updateService.updateCreative(oauthToken.getAccessToken(), obj.getAccountId(), updateJson);
|
|
|
- Integer code = (Integer) creativeMap.get("code");
|
|
|
- if (code == 0) {
|
|
|
- //修改重提次数和文案id
|
|
|
- auditRejectedResubmitMapper.updateCreativeResubmitSize(obj.getCreativeId(), documentByAccountId != null && documentByAccountId.size() > 0 ? documentByAccountId.get(0).get("copyWriterId") : null);
|
|
|
- //插入文案关联创意表信息
|
|
|
- if (!documentByAccountId.isEmpty() && documentByAccountId.size() > 0) {
|
|
|
- auditRejectedResubmitMapper.saveCopyWriterCenter(documentByAccountId.get(0).get("copyWriterId"), String.valueOf(obj.getCreativeId()), new Date());
|
|
|
+ Map<String, Object> creativeMap = updateService.updateCreative(oauthToken.getAccessToken(), obj.getAccountId(), updateJson);
|
|
|
+ Integer code = (Integer) creativeMap.get("code");
|
|
|
+ if (code == 0) {
|
|
|
+ //修改重提次数和文案id
|
|
|
+ auditRejectedResubmitMapper.updateCreativeResubmitSize(obj.getCreativeId(), documentByAccountId != null && documentByAccountId.size() > 0 ? documentByAccountId.get(0).get("copyWriterId") : null);
|
|
|
+ //插入文案关联创意表信息
|
|
|
+ if (!documentByAccountId.isEmpty() && documentByAccountId.size() > 0) {
|
|
|
+ auditRejectedResubmitMapper.saveCopyWriterCenter(documentByAccountId.get(0).get("copyWriterId"), String.valueOf(obj.getCreativeId()), new Date());
|
|
|
+ }
|
|
|
+ log.info("拒审重提成功,accountId:{},creativeId:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
+ } else {
|
|
|
+ log.info("拒审重提失败,accountId:{},creativeId:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
}
|
|
|
- log.info("拒审重提成功,accountId:{},creativeId:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
- } else {
|
|
|
- log.info("拒审重提失败,accountId:{},creativeId:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
+ }else {
|
|
|
+ log.info("未查询到更换数据,accountId:{},creativeId:{},imageToken:{},description:{}",obj.getAccountId(), obj.getCreativeId(),imageToken,documentByAccountId);
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
log.info("重提次数已达上限:accountId:{},creativeId:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
}
|