|
@@ -150,28 +150,7 @@ public class MonitorBytedanceServiceImpl implements IMonitorBytedanceService {
|
|
//查询 配置的点击监测链接
|
|
//查询 配置的点击监测链接
|
|
List<MonitorBytedanceAdVo> accountList = monitorBytedanceActionTrackUrlMapper.getAccountActionTrackUrl(accountId,"1",null);
|
|
List<MonitorBytedanceAdVo> accountList = monitorBytedanceActionTrackUrlMapper.getAccountActionTrackUrl(accountId,"1",null);
|
|
for (MonitorBytedanceAdVo accountInfo : accountList) {
|
|
for (MonitorBytedanceAdVo accountInfo : accountList) {
|
|
- /*
|
|
|
|
- //1:校验 账户自动投放配置中 监测链接
|
|
|
|
- //查询账户配置中的 转化id
|
|
|
|
- List<MonitorBytedanceAdVo> converId = monitorBytedanceActionTrackUrlMapper.getBytedancStrategyAcctionId(accountInfo.getAccountId());
|
|
|
|
- if (!Check.isNull(converId)){
|
|
|
|
- // 账户id 和 转化id 查询 第三方监测链接
|
|
|
|
- Result resultConvert = aiBytedanceAdvertiserStrategyService.readToolConvertInfo(converId.get(0).getAccountId(),converId.get(0).getConvertId());
|
|
|
|
- if (!resultConvert.isSuccess()){
|
|
|
|
- return Result.errorMsg(resultConvert.getMessage());
|
|
|
|
- }
|
|
|
|
- JSONObject jsonObject = (JSONObject) JSONObject.toJSON(resultConvert.getResult());
|
|
|
|
- String action_track_url = jsonObject.getString("action_track_url");
|
|
|
|
- //自动投放账户配置中的链接 != 监测链接配置
|
|
|
|
- if (!StringUtils.equals(action_track_url,accountInfo.getActionTrackUrl())){
|
|
|
|
- //发送预警消息
|
|
|
|
- sendEnterpriseWeiXinMessage(accountInfo);
|
|
|
|
- log.info("accountId:=={}==目标转化id:{}=====第三方点击监测链接与自动投放配置不一致,已发送企业微信通知============",accountInfo.getAccountId(),converId.get(0).getConvertId());
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-*/
|
|
|
|
- //2:校验 拉取后台计划 监测链接
|
|
|
|
|
|
+ //校验 拉取后台计划 监测链接
|
|
//根据账户 查询头条计划中的 点击监测链接
|
|
//根据账户 查询头条计划中的 点击监测链接
|
|
List<MonitorBytedanceAdVo> actionTrackUrlList = monitorBytedanceActionTrackUrlMapper.getBytedancPlanActionTrackUrl(Long.valueOf(accountInfo.getAccountId()));
|
|
List<MonitorBytedanceAdVo> actionTrackUrlList = monitorBytedanceActionTrackUrlMapper.getBytedancPlanActionTrackUrl(Long.valueOf(accountInfo.getAccountId()));
|
|
if (!Check.isNull(actionTrackUrlList)){
|
|
if (!Check.isNull(actionTrackUrlList)){
|
|
@@ -210,4 +189,42 @@ public class MonitorBytedanceServiceImpl implements IMonitorBytedanceService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * @description: 自动投放中 账户自动创建时 校验第三方监测链接
|
|
|
|
+ *
|
|
|
|
+ * @param token
|
|
|
|
+ * @param accountId 账户id
|
|
|
|
+ * @param converId 转化目标id
|
|
|
|
+ * @param planId 计划id
|
|
|
|
+ * @return: void
|
|
|
|
+ * @author: zianY
|
|
|
|
+ * @time: 2022/1/13
|
|
|
|
+ */
|
|
|
|
+ public void trackUrlContrast(CtopOauthToken token,String accountId,String converId,String planId){
|
|
|
|
+ //校验 账户自动投放配置中 监测链接
|
|
|
|
+ //查询 链接配置
|
|
|
|
+ List<MonitorBytedanceAdVo> monitorBytedanceAdVos = monitorBytedanceActionTrackUrlMapper.getAccountActionTrackUrl(String.valueOf(accountId),"1",null);
|
|
|
|
+ if (!Check.isNull(monitorBytedanceAdVos)){
|
|
|
|
+ MonitorBytedanceAdVo bytedanceAdVo = monitorBytedanceAdVos.get(0);
|
|
|
|
+ // 账户id 和 转化id 查询 第三方监测链接
|
|
|
|
+ Result resultConvert = aiBytedanceAdvertiserStrategyService.readToolConvertInfo(accountId,converId);
|
|
|
|
+ if (resultConvert.isSuccess()){
|
|
|
|
+ JSONObject jsonObject = (JSONObject) JSONObject.toJSON(resultConvert.getResult());
|
|
|
|
+ String action_track_url = jsonObject.getString("action_track_url");
|
|
|
|
+ //自动投放账户配置中的链接 != 监测链接配置
|
|
|
|
+ if (!StringUtils.equals(action_track_url,bytedanceAdVo.getActionTrackUrl())){
|
|
|
|
+ //关停计划
|
|
|
|
+ marketingServiceImpl.updPlanStatus(token, Arrays.asList(Long.valueOf(planId)),"disable");
|
|
|
|
+ //发送预警消息
|
|
|
|
+ sendEnterpriseWeiXinMessage(bytedanceAdVo);
|
|
|
|
+ log.info("accountId:=={}==目标转化id:{}=====自动投创建====第三方点击监测链接与自动投放配置不一致,已发送企业微信通知============",bytedanceAdVo.getAccountId(),bytedanceAdVo.getConvertId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ log.info("accountId:=={}==目标转化id:{}=====第三方点击监测链接获取失败",accountId,converId);
|
|
|
|
+ }
|
|
|
|
+ log.info("accountId:=={}==目标转化id为空。",accountId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|