|
@@ -163,12 +163,14 @@ public class BytedanceReportController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="投放数据-更新计划出价-cpaBid", notes="投放数据-更新计划出价")
|
|
|
+ @ApiOperation(value="投放数据-更新计划出价-cpaBid-计划预算", notes="投放数据-更新计划出价-计划预算")
|
|
|
@GetMapping(value = "/updateADCpaBid")
|
|
|
public Result updateADCpaBid(@RequestParam("accountId") String accountId,
|
|
|
@RequestParam("adId") String adId,
|
|
|
- @RequestParam("cpaBid") BigDecimal cpaBid,
|
|
|
- @RequestParam("adScheduleTime") String adScheduleTime) {
|
|
|
+ @RequestParam(value = "cpaBid",required = false) BigDecimal cpaBid,
|
|
|
+ @RequestParam(value = "adScheduleTime",required = false) String adScheduleTime,
|
|
|
+ //@RequestParam(value = "budgetMode",required = false) String budgetMode,
|
|
|
+ @RequestParam(value = "budget",required = false) Integer budget) {
|
|
|
try {
|
|
|
CtopOauthToken token = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
PlanSearchVo planSearchVo = new PlanSearchVo();
|
|
@@ -191,6 +193,8 @@ public class BytedanceReportController {
|
|
|
strategy.setAccountId(Long.valueOf(accountId));
|
|
|
strategy.setAdCpaBid(cpaBid);
|
|
|
strategy.setAdScheduleTime(adScheduleTime);
|
|
|
+ //strategy.setAdBudgetMode(budgetMode);
|
|
|
+ strategy.setAdBudget(budget);
|
|
|
//3 修改广告计划 中的 cpaBid
|
|
|
Result resultUpd = marketingService.updateAdvertiserPlan(token,adId,modifyTime,strategy);
|
|
|
if (!resultUpd.isSuccess()){
|
|
@@ -200,13 +204,15 @@ public class BytedanceReportController {
|
|
|
byteDanceAdvertisePlan.setId(Long.valueOf(adId));
|
|
|
byteDanceAdvertisePlan.setCpaBid(cpaBid);
|
|
|
byteDanceAdvertisePlan.setScheduleTime(adScheduleTime);
|
|
|
+ //byteDanceAdvertisePlan.setBudgetMode(budgetMode);
|
|
|
+ byteDanceAdvertisePlan.setBudget(Check.isNull(budget) ? null : new BigDecimal(budget));
|
|
|
//更新 表 bid || 定向包id || 状态
|
|
|
byteDanceAdvertisePlanService.updatePlanOrPackage(byteDanceAdvertisePlan);
|
|
|
}
|
|
|
|
|
|
return Result.successMsg("修改出价成功。",null);
|
|
|
}catch (Exception e){
|
|
|
- log.error("投放数据-更新计划出价-cpaBid异常",e);
|
|
|
+ log.error("投放数据-更新计划出价-cpaBid-计划预算异常",e);
|
|
|
return Result.error("请求失败,请联系开发人员!");
|
|
|
}
|
|
|
}
|