|
@@ -10,6 +10,7 @@ import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
import cn.com.ctop.common.module.utils.*;
|
|
|
import cn.com.ctop.kuaishou.modules.ai.service.IAiCreativeLimitService;
|
|
|
import cn.com.ctop.kuaishou.modules.ai.service.IKuaishouAccountCreativeOverrunInfoService;
|
|
|
+import cn.com.ctop.kuaishou.modules.ai.service.IKuaishouDirectionalPackageService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.*;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.vo.ConvertVo;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.mapper.*;
|
|
@@ -119,6 +120,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
@Autowired
|
|
|
private IWarningOperationService warningOperationService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IKuaishouDirectionalPackageService directionalPackageService;
|
|
|
|
|
|
@Override
|
|
|
public void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate) {
|
|
@@ -971,6 +974,23 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
returnMap.put("message", "success");
|
|
|
returnMap.put("unitId", unitId);
|
|
|
returnMap.put("success", true);
|
|
|
+ //添加广告组和定向模板绑定关系
|
|
|
+ if (!Check.isNull(requestJson.getLong("templateId"))) {
|
|
|
+ Thread thread2 = new Thread() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ try {
|
|
|
+ JSONObject request = new JSONObject();
|
|
|
+ request.put("unitId", unitId);
|
|
|
+ request.put("templateId", requestJson.getLong("templateId"));
|
|
|
+ directionalPackageService.createUnitAndTemplate(request);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ thread2.start();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
} else {
|