|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.ctop.job.bytedance.handler;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
|
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
import cn.com.ctop.common.module.service.ISendMessageService;
|
|
|
import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertisePlan;
|
|
@@ -27,6 +28,8 @@ public class ByteDanceCheckAccountMonitoringLinkJob {
|
|
|
private IByteDanceCreativeService creativeService;
|
|
|
@Autowired
|
|
|
private ISendMessageService sendMessageService;
|
|
|
+ @Autowired
|
|
|
+ private ICtopOauthTokenService oauthTokenService;
|
|
|
|
|
|
@XxlJob("byteDanceCheckAccountMonitoringLinkJob")
|
|
|
public ReturnT<String> execute(String param) throws Exception{
|
|
@@ -38,7 +41,7 @@ public class ByteDanceCheckAccountMonitoringLinkJob {
|
|
|
List<ByteDanceAdvertisePlan> plans = advertisePlanService.getAllPlans(userAllocation.getAccountId(), DateUtils.formatDate(new Date()));
|
|
|
if(null!=plans&&!plans.isEmpty()){
|
|
|
for (ByteDanceAdvertisePlan plan:plans) {
|
|
|
- Map<String, Object> creativeDetail = creativeService.getCreativeDetail(userAllocation.getAccountId(), plan.getId());
|
|
|
+ Map<String, Object> creativeDetail = creativeService.getCreativeDetail(oauthTokenService.getTokenByAccountId(userAllocation.getAccountId()), plan.getId());
|
|
|
if(null!=creativeDetail.get("data")){
|
|
|
JSONObject data = (JSONObject) creativeDetail.get("data");
|
|
|
checkMonitorLink(data,plan,userAllocation);
|