|
@@ -12,7 +12,6 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouUpdateService;
|
|
|
import cn.com.ctop.kuaishou.modules.document.mapper.AuditRejectedResubmitMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.document.mapper.DocumentLibraryMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.document.service.AuditRejectedResubmitService;
|
|
|
-import cn.com.ctop.kuaishou.modules.document.service.DocumentLibraryService;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -70,7 +69,7 @@ public class AuditRejectedResubmitServiceImpl implements AuditRejectedResubmitSe
|
|
|
calendar.roll(Calendar.DAY_OF_YEAR, -1);
|
|
|
try {
|
|
|
log.info(formatter.format(calendar.getTime()));
|
|
|
- creativeList = auditRejectedResubmitMapper.getCreativeList(42,formatter.format(calendar.getTime()));
|
|
|
+ creativeList = auditRejectedResubmitMapper.getCreativeList(42, formatter.format(calendar.getTime()));
|
|
|
//可重提词组
|
|
|
List<String> submit = auditRejectedResubmitMapper.getRejectThesaurusListByStatus(0);
|
|
|
//不可重提词组
|
|
@@ -89,7 +88,7 @@ public class AuditRejectedResubmitServiceImpl implements AuditRejectedResubmitSe
|
|
|
//重提
|
|
|
log.info("进行重提:{}", reviewDetail);
|
|
|
Integer submit_size = obj.getSubmitSize();
|
|
|
- if(submit_size<2){
|
|
|
+ if (submit_size < 2) {
|
|
|
JSONObject updateJson = new JSONObject();
|
|
|
updateJson.put("creativeId", obj.getCreativeId());
|
|
|
//更换封面
|
|
@@ -104,20 +103,23 @@ public class AuditRejectedResubmitServiceImpl implements AuditRejectedResubmitSe
|
|
|
}
|
|
|
}
|
|
|
//更换文案
|
|
|
- List<String> documentByAccountId = documentLibraryMapper.getDocumentByAccountId(String.valueOf(obj.getAccountId()),obj.getDescription());
|
|
|
- if(!documentByAccountId.isEmpty()){
|
|
|
- updateJson.put("description", documentByAccountId.get(0));
|
|
|
+ List<Map<String, String>> documentByAccountId = documentLibraryMapper.getDocumentByAccountId(String.valueOf(obj.getAccountId()), obj.getCopyWriterId());
|
|
|
+ if (!documentByAccountId.isEmpty()) {
|
|
|
+ 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) {
|
|
|
- auditRejectedResubmitMapper.updateCreativeResubmitSize(obj.getCreativeId());
|
|
|
+ //修改重提次数和文案id
|
|
|
+ auditRejectedResubmitMapper.updateCreativeResubmitSize(obj.getCreativeId(), documentByAccountId.get(0).get("copyWriterId"));
|
|
|
+ //插入文案关联创意表信息
|
|
|
+ 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:{}", obj.getAccountId(), obj.getCreativeId());
|
|
|
}
|
|
|
|
|
|
} else {
|