|
@@ -294,24 +294,24 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
|
|
|
String startDate = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
|
|
|
//查询符合模板规则的组
|
|
|
List<String> groupMessage = kuaishouAccountCleanTemplateMapper.getGroupMessage(ob, optimizationObjectiveList, startDate);
|
|
|
- AtomicReference<Boolean> falg= new AtomicReference<>(true);
|
|
|
+ AtomicReference<Boolean> falg = new AtomicReference<>(true);
|
|
|
if (!groupMessage.isEmpty()) {
|
|
|
//获取Token
|
|
|
CtopOauthToken ctopOauthToken = ctopOauthTokenMapper.selectByAccountId(Long.parseLong(ob.getAccountId()));
|
|
|
if (ctopOauthToken != null) {
|
|
|
groupMessage.stream().forEach(item -> {
|
|
|
//修改广告组状态
|
|
|
- /* Map<String, Object> resultMap = iKuaiShouUpdateService.updateUnitStatus(ctopOauthToken.getAccessToken(), Long.parseLong(ob.getAccountId()), Long.parseLong(item), Integer.parseInt(ob.getPerformOperations()), null);
|
|
|
- Boolean resultFlag= (Boolean) resultMap.get("success");
|
|
|
+ Map<String, Object> resultMap = iKuaiShouUpdateService.updateUnitStatus(ctopOauthToken.getAccessToken(), Long.parseLong(ob.getAccountId()), Long.parseLong(item), Integer.parseInt(ob.getPerformOperations()), null);
|
|
|
+ Boolean resultFlag = (Boolean) resultMap.get("success");
|
|
|
//判断有没有失败
|
|
|
- if(!resultFlag){
|
|
|
+ if (!resultFlag) {
|
|
|
falg.set(false);
|
|
|
- }*/
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- if(!groupMessage.isEmpty()&&falg.get()){
|
|
|
+ if (!groupMessage.isEmpty() && falg.get()) {
|
|
|
//修改成功插入日志记录
|
|
|
KuaiShouAccountCleanLogInfo kuaiShouAccountCleanLogInfo = new KuaiShouAccountCleanLogInfo();
|
|
|
//设置账户id
|
|
@@ -320,10 +320,10 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
|
|
|
kuaiShouAccountCleanLogInfo.setOperationType(ob.getPerformOperations());
|
|
|
//设置运营
|
|
|
Map<String, String> map = kuaishouAccountCleanTemplateMapper.getUserNameByAccountId(ob.getAccountId());
|
|
|
- String authName="";
|
|
|
- if(map!=null){
|
|
|
+ String authName = "";
|
|
|
+ if (map != null) {
|
|
|
kuaiShouAccountCleanLogInfo.setUserName(map.get("userName"));
|
|
|
- authName=map.get("authName");
|
|
|
+ authName = map.get("authName");
|
|
|
}
|
|
|
//设置时间
|
|
|
kuaiShouAccountCleanLogInfo.setCreateTime(sd.format(new Date()));
|
|
@@ -340,7 +340,7 @@ public class KuaiShouAccountCleanServiceImpl implements KuaiShouAccountCleanServ
|
|
|
operationType = "删除";
|
|
|
}
|
|
|
//执行信息
|
|
|
- String textMessage = "清理规则执行: 账户:" + ob.getAccountId() + ", 授权名称: " + authName + ",推广组:" + unitIds + "已经被清理规则"+operationType;
|
|
|
+ String textMessage = "清理规则执行: 账户:" + ob.getAccountId() + ", 授权名称: " + authName + ",推广组:" + unitIds + "已经被清理规则" + operationType;
|
|
|
kuaiShouAccountCleanLogInfo.setExecutiveInformation(textMessage);
|
|
|
kuaishouAccountCleanTemplateMapper.saveCleamLog(kuaiShouAccountCleanLogInfo);
|
|
|
}
|