|
@@ -6,16 +6,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
|
|
import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
|
|
-import org.jeecg.modules.ctop.service.IByteDanceBudgetTemplateService;
|
|
|
|
-import org.jeecg.modules.ctop.service.ITouTiaoAdvertiserService;
|
|
|
|
|
|
+import org.jeecg.modules.ctop.entity.ByteDanceCampaignTemplate;
|
|
|
|
+import org.jeecg.modules.ctop.entity.BytedanceDeliveryTargetTemplate;
|
|
|
|
+import org.jeecg.modules.ctop.service.*;
|
|
import org.jeecg.modules.system.entity.SysDictItem;
|
|
import org.jeecg.modules.system.entity.SysDictItem;
|
|
import org.jeecg.modules.system.service.ISysDictItemService;
|
|
import org.jeecg.modules.system.service.ISysDictItemService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -26,14 +25,14 @@ import java.util.Map;
|
|
@RequestMapping("toutiao")
|
|
@RequestMapping("toutiao")
|
|
public class ByteDanceAdvertiserPostController {
|
|
public class ByteDanceAdvertiserPostController {
|
|
@Autowired
|
|
@Autowired
|
|
- private ITouTiaoAdvertiserService touTiaoAdvertiserService;
|
|
|
|
|
|
+ private IByteDanceAdvertiserDataService advertiserDataService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 1:获取广告主信息 @param accountId 本平台广告主id
|
|
* 1:获取广告主信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/info")
|
|
@RequestMapping("/advertiser/info")
|
|
public Map<String, Object> advertiserInfo(String accountId) {
|
|
public Map<String, Object> advertiserInfo(String accountId) {
|
|
- return touTiaoAdvertiserService.getAdvertiserInfo(accountId);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserInfo(accountId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -41,7 +40,7 @@ public class ByteDanceAdvertiserPostController {
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/plan/get")
|
|
@RequestMapping("/advertiser/plan/get")
|
|
public Map<String, Object> advertiserPlan(String accountId, String ids) {
|
|
public Map<String, Object> advertiserPlan(String accountId, String ids) {
|
|
- return touTiaoAdvertiserService.getAdvertiserPlan(accountId, ids);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserPlan(accountId, ids);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,87 +48,95 @@ public class ByteDanceAdvertiserPostController {
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/plan/update/status")
|
|
@RequestMapping("/advertiser/plan/update/status")
|
|
public Map<String, Object> advertiserPlanUpdateStatus(String accountId, String adIds, String optStatus) {
|
|
public Map<String, Object> advertiserPlanUpdateStatus(String accountId, String adIds, String optStatus) {
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateStatus(accountId, adIds, optStatus);
|
|
|
|
|
|
+ return advertiserDataService.advertiserPlanUpdateStatus(accountId, adIds, optStatus);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 3:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 4:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/plan/update/bid")
|
|
@RequestMapping("/advertiser/plan/update/bid")
|
|
public Map<String, Object> advertiserPlanUpdateBid(String accountId, String adIds, String bids) {
|
|
public Map<String, Object> advertiserPlanUpdateBid(String accountId, String adIds, String bids) {
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateBid(accountId, adIds, bids);
|
|
|
|
|
|
+ return advertiserDataService.advertiserPlanUpdateBid(accountId, adIds, bids);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 3:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 5:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/plan/update/budget")
|
|
@RequestMapping("/advertiser/plan/update/budget")
|
|
public Map<String, Object> advertiserPlanUpdateBudget(String accountId, String adIds, String budgets) {
|
|
public Map<String, Object> advertiserPlanUpdateBudget(String accountId, String adIds, String budgets) {
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateBudget(accountId, adIds, budgets);
|
|
|
|
|
|
+ return advertiserDataService.advertiserPlanUpdateBudget(accountId, adIds, budgets);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 4:获取广告主广告预算信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 6:获取广告主广告预算信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/budget/get/")
|
|
@RequestMapping("/advertiser/budget/get/")
|
|
public Map<String, Object> advertiserBudget(String accountId) {
|
|
public Map<String, Object> advertiserBudget(String accountId) {
|
|
- return touTiaoAdvertiserService.getAdvertiserBudget(accountId);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserBudget(accountId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 3:获取广告主广告组信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 7:获取广告主广告组信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/campaign/get")
|
|
@RequestMapping("/advertiser/campaign/get")
|
|
public Map<String, Object> advertiserCampaign(String accountId, String ids) {
|
|
public Map<String, Object> advertiserCampaign(String accountId, String ids) {
|
|
- return touTiaoAdvertiserService.getAdvertiserCampaign(accountId, ids);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserCampaign(accountId, ids);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 5:获取广告主广告创意信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 8:获取广告主广告创意信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/creative/get")
|
|
@RequestMapping("/advertiser/creative/get")
|
|
public Map<String, Object> getAdvertiserCreative(String accountId, String ids) {
|
|
public Map<String, Object> getAdvertiserCreative(String accountId, String ids) {
|
|
- return touTiaoAdvertiserService.getAdvertiserCreative(accountId, ids);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserCreative(accountId, ids);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 5:修改广告创意信息状态 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 9:修改广告创意信息状态 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/update/status/")
|
|
@RequestMapping("/advertiser/update/status/")
|
|
public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
|
|
public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
|
|
- return touTiaoAdvertiserService.advertiserCreativeUpdateStatus(accountId, creativeIds, optStatus);
|
|
|
|
|
|
+ return advertiserDataService.advertiserCreativeUpdateStatus(accountId, creativeIds, optStatus);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 6:获取广告主广告创意素材信息 @param accountId 本平台广告主id @param creativeIds 广告创意id
|
|
|
|
|
|
+ * 10:获取广告主广告创意素材信息 @param accountId 本平台广告主id @param creativeIds 广告创意id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/creative/material/read")
|
|
@RequestMapping("/advertiser/creative/material/read")
|
|
public Map<String, Object> advertiserCreativeMaterial(String accountId, String creativeIds) {
|
|
public Map<String, Object> advertiserCreativeMaterial(String accountId, String creativeIds) {
|
|
- return touTiaoAdvertiserService.getAdvertiserCreativeMaterial(accountId, creativeIds);
|
|
|
|
|
|
+ return advertiserDataService.getAdvertiserCreativeMaterial(accountId, creativeIds);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 7:创建广告组信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 11:创建广告组信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/campaign/create")
|
|
@RequestMapping("/advertiser/campaign/create")
|
|
public Map<String, Object> advertiserCampaignCreate(String accountId, String campaignName, String budgetMode, Integer budget, String landingType) {
|
|
public Map<String, Object> advertiserCampaignCreate(String accountId, String campaignName, String budgetMode, Integer budget, String landingType) {
|
|
- return touTiaoAdvertiserService.advertiserCampaignCreate(accountId, campaignName, budgetMode, budget, landingType);
|
|
|
|
|
|
+ return advertiserDataService.advertiserCampaignCreate(accountId, campaignName, budgetMode, budget, landingType);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 7:广告组更新状态信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 12:广告组更新状态信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/campaign/update/status")
|
|
@RequestMapping("/advertiser/campaign/update/status")
|
|
public Map<String, Object> advertiserCampaignUpdateStatus(String accountId, String campaignIds, String optStatus) {
|
|
public Map<String, Object> advertiserCampaignUpdateStatus(String accountId, String campaignIds, String optStatus) {
|
|
- return touTiaoAdvertiserService.advertiserCampaignUpdateStatus(accountId, campaignIds, optStatus);
|
|
|
|
|
|
+ return advertiserDataService.advertiserCampaignUpdateStatus(accountId, campaignIds, optStatus);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 8:广告组更新信息 @param accountId 本平台广告主id
|
|
|
|
|
|
+ * 13:广告组更新信息 @param accountId 本平台广告主id
|
|
*/
|
|
*/
|
|
@RequestMapping("/advertiser/campaign/update")
|
|
@RequestMapping("/advertiser/campaign/update")
|
|
public Map<String, Object> advertiserCampaignUpdate(String accountId, Long campaignId, String budgetMode, Integer budget, String campaignName) {
|
|
public Map<String, Object> advertiserCampaignUpdate(String accountId, Long campaignId, String budgetMode, Integer budget, String campaignName) {
|
|
- return touTiaoAdvertiserService.advertiserCampaignUpdate(accountId, campaignId, budgetMode, budget, campaignName);
|
|
|
|
|
|
+ return advertiserDataService.advertiserCampaignUpdate(accountId, campaignId, budgetMode, budget, campaignName);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 14:获取人群包信息
|
|
|
|
+ */
|
|
|
|
+ @RequestMapping("/advertiser/custom/audience/select")
|
|
|
|
+ public Map<String, Object> customAudienceSelect(String accountId) {
|
|
|
|
+ return advertiserDataService.advertiserCustomAudienceSelect(accountId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -154,18 +161,47 @@ public class ByteDanceAdvertiserPostController {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 预算与出价模板
|
|
* @param template
|
|
* @param template
|
|
* @param req
|
|
* @param req
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @RequestMapping(value = "budget/template/insert", method = RequestMethod.GET)
|
|
|
|
- public Map<String, Object> budgetModelInsert(@RequestBody ByteDanceBudgetTemplate template, HttpServletRequest req) {
|
|
|
|
|
|
+ @PostMapping("budget/template/insert")
|
|
|
|
+ public Map<String, Object> budgetTemplateInsert(@RequestBody ByteDanceBudgetTemplate template, HttpServletRequest req) {
|
|
return budgetTemplateService.insertTemplate(template);
|
|
return budgetTemplateService.insertTemplate(template);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 广告组模板
|
|
|
|
+ *
|
|
|
|
+ * @param template
|
|
|
|
+ * @param req
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("campaign/template/insert")
|
|
|
|
+ public Map<String, Object> campaignTemplateInsert(@RequestBody ByteDanceCampaignTemplate template, HttpServletRequest req) {
|
|
|
|
+ return campaignTemplateService.insertTemplate(template);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 投放目标
|
|
|
|
+ *
|
|
|
|
+ * @param template
|
|
|
|
+ * @param req
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("deliverytarget/template/insert")
|
|
|
|
+ public Map<String, Object> diliverytargetTemplateInsert(@RequestBody BytedanceDeliveryTargetTemplate template, HttpServletRequest req) {
|
|
|
|
+ return deliveryTargetTemplateService.insertTemplate(template);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private IByteDanceCampaignTemplateService campaignTemplateService;
|
|
|
|
+ @Autowired
|
|
private IByteDanceBudgetTemplateService budgetTemplateService;
|
|
private IByteDanceBudgetTemplateService budgetTemplateService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private IBytedanceDeliveryTargetTemplateService deliveryTargetTemplateService;
|
|
|
|
+ @Autowired
|
|
private ISysDictItemService sysDictItemService;
|
|
private ISysDictItemService sysDictItemService;
|
|
}
|
|
}
|