浏览代码

添加计划创建日志打印

songyh 4 年之前
父节点
当前提交
4020a621d5

+ 2 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/dockapi/MarketingServiceImpl.java

@@ -1,6 +1,5 @@
 package org.jeecg.modules.bytedance.advertise.dockapi;
 
-import android.widget.CheckBox;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
@@ -318,9 +317,10 @@ public class MarketingServiceImpl implements MarketingService{
      */
     @Override
     public  Result createAdvertiserPlan(CtopOauthToken token, JSONObject params, AiBytedanceAdvertiserStrategy strategy) {
+        log.info("创建参数:{}",params.toJSONString());
         JSONObject jsonObject = HttpUtils.bytedancePostRequest(token.getAccessToken(),
                 urlPath + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_ad_create"), params);
-        log.info("广告计划输出返回信息---->>>>>",jsonObject);
+        log.info("广告计划输出返回信息---->>>>>{}",jsonObject);
         Integer code = jsonObject.getInteger("code");
         if (null ==  code || !code.equals(0)) {
             log.error("广告计划创建失败==》accountId:{},message:{}", token.getAccountId(), jsonObject.getString("message"));

+ 9 - 4
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -746,11 +746,16 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         if(!Check.isNull(strategy.getAdHideIfExists())){
             params.put("hide_if_exists",strategy.getAdHideIfExists());
         }
-        if(!Check.isNull(strategy.getAdConvertedTimeDuration())){
-            params.put("converted_time_duration",strategy.getAdConvertedTimeDuration());
-        }
+
+
         if(!Check.isNull(strategy.getAdHideIfConverted())){
-            params.put("hide_if_converted",strategy.getAdHideIfConverted());
+            String hideIfConverted = strategy.getAdHideIfConverted();
+            params.put("hide_if_converted",hideIfConverted);
+            if(hideIfConverted.equals("APP")||hideIfConverted.equals("CUSTOMER")){
+                if(!Check.isNull(strategy.getAdConvertedTimeDuration())){
+                    params.put("converted_time_duration",strategy.getAdConvertedTimeDuration());
+                }
+            }
         }
 
         if(!Check.isNull(strategy.getAdActivateType())){