|
@@ -1279,4 +1279,40 @@ public class MarketingServiceImpl implements MarketingService{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取已创建资产列表
|
|
|
|
+ * @param token
|
|
|
|
+ * @param landingType
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Result getEventAssets(CtopOauthToken token,String landingType) {
|
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
|
+ //params.put("advertiser_id", 1700992275550222L);
|
|
|
|
+ // params.put("asset_type", landingType);
|
|
|
|
+ params.put("page", 1);
|
|
|
|
+ params.put("page_size", 30);
|
|
|
|
+ //params = Check.jsonRemoveEmpty(params);
|
|
|
|
+ log.info("params======{}",params);
|
|
|
|
+ JSONObject jsonObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(),
|
|
|
|
+ urlPath+ PropertiesUtils.getValue("bytedance_config", "bytedance_v2_event_assets")+"?advertiser_id="+1700992275550222L+"&asset_type="+landingType,params);
|
|
|
|
+ log.info("result======{}",jsonObject);
|
|
|
|
+ Integer code = jsonObject.getInteger("code");
|
|
|
|
+ String message = jsonObject.getString("message");
|
|
|
|
+ if (null == code || !code.equals(0)) {
|
|
|
|
+ log.info("查询资产列表接口异常==》accountId:{},message:{}", token.getAccountId(), message);
|
|
|
|
+ return Result.error(message);
|
|
|
|
+ }
|
|
|
|
+ JSONObject dataList = jsonObject.getJSONObject("data");
|
|
|
|
+ if (null == dataList || dataList.isEmpty()) {
|
|
|
|
+ log.info("查询资产列表不存在==》accountId:{},message:{}", token.getAccountId(), message);
|
|
|
|
+ return Result.error("查询资产列表不存在");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return Result.successMsg("查询资产列表成功",dataList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|