|
@@ -463,6 +463,10 @@ public class BatchController {
|
|
|
campaignJson.put("campaign_name", requestJson.getString("campaignName"));
|
|
|
campaignJson.put("type", requestJson.getInteger("type"));
|
|
|
campaignJson.put("day_budget", requestJson.getLong("dayBudget"));
|
|
|
+ Integer bidType = requestJson.getInteger("bidType");
|
|
|
+ if (!Check.isNull(bidType)) {
|
|
|
+ campaignJson.put("bid_type", requestJson.getLong("bidType"));
|
|
|
+ }
|
|
|
Map<String, Object> campaignMap = iKuaishouInterfaceService.campaignCreate(oauthToken.getAccessToken(), accountId, campaignJson);
|
|
|
Integer code = (Integer) campaignMap.get("code");
|
|
|
if (code != 0) {
|
|
@@ -610,7 +614,7 @@ public class BatchController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-@PostMapping(value = "/deepTypes")
|
|
|
+ @PostMapping(value = "/deepTypes")
|
|
|
public Result<JSONObject> deepTypes(@RequestBody JSONObject requestJson) {
|
|
|
Result result = new Result<JSONObject>();
|
|
|
try {
|
|
@@ -626,7 +630,37 @@ public class BatchController {
|
|
|
Long appId = requestJson.getLong("appId");
|
|
|
Integer ocpxActionType = requestJson.getInteger("ocpxActionType");
|
|
|
|
|
|
- JSONObject deepConversionJson = iKuaishouInterfaceService.deepTypes(accountId, token.getAccessToken(), sceneCategory, campaignType, sceneIds, appId,ocpxActionType);
|
|
|
+ JSONObject deepConversionJson = iKuaishouInterfaceService.deepTypes(accountId, token.getAccessToken(), sceneCategory, campaignType, sceneIds, appId, ocpxActionType);
|
|
|
+ if (Check.isNull(deepConversionJson)) {
|
|
|
+ throw new Exception("深度类型数据返回为空");
|
|
|
+ }
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(deepConversionJson);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ result.setSuccess(false);
|
|
|
+ result.setMessage(e.getMessage());
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping(value = "/mcbConversionInfos")
|
|
|
+ public Result<JSONObject> mcbConversionInfos(@RequestBody JSONObject requestJson) {
|
|
|
+ Result result = new Result<JSONObject>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ Long accountId = requestJson.getLong("accountId");
|
|
|
+ CtopOauthToken token = oauthTokenService.getTokenByAccountId(accountId);
|
|
|
+ if (Check.isNull(token)) {
|
|
|
+ throw new Exception("未获取授权信息");
|
|
|
+ }
|
|
|
+ Integer sceneCategory = requestJson.getInteger("sceneCategory");
|
|
|
+ Integer campaignType = requestJson.getInteger("campaignType");
|
|
|
+ JSONArray sceneIds = requestJson.getJSONArray("sceneIds");
|
|
|
+ Long appId = requestJson.getLong("appId");
|
|
|
+
|
|
|
+ JSONObject deepConversionJson = iKuaishouInterfaceService.mcbConversionInfos(accountId, token.getAccessToken(), sceneCategory, campaignType, sceneIds, appId);
|
|
|
if (Check.isNull(deepConversionJson)) {
|
|
|
throw new Exception("深度类型数据返回为空");
|
|
|
}
|