|
@@ -1,206 +0,0 @@
|
|
|
-package org.jeecg.modules.ctop.controller;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.modules.ctop.service.ITouTiaoAdvertiserService;
|
|
|
-import org.jeecg.modules.system.entity.SysDictItem;
|
|
|
-import org.jeecg.modules.system.service.ISysDictItemService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-/**
|
|
|
- * 头条广告主相关 2019年7月10日14:13:04 @author 宋英豪
|
|
|
- */
|
|
|
-@Controller
|
|
|
-@RequestMapping("toutiao")
|
|
|
-public class TouTiaoAdvertiserController {
|
|
|
- @Autowired
|
|
|
- private ITouTiaoAdvertiserService touTiaoAdvertiserService;
|
|
|
-
|
|
|
- /**
|
|
|
- * 1:获取广告主信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/info")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserInfo(String accountId) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserInfo(accountId);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 2:获取广告主广告计划信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/plan/get")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserPlan(String accountId, String ids) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserPlan(accountId, ids);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 3:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/plan/update/status")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserPlanUpdateStatus(String accountId, String adIds, String optStatus) {
|
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateStatus(accountId, adIds, optStatus);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 3:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/plan/update/bid")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserPlanUpdateBid(String accountId, String adIds, String bids) {
|
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateBid(accountId, adIds, bids);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 3:修改广告计划信息状态 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/plan/update/budget")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserPlanUpdateBudget(String accountId, String adIds, String budgets) {
|
|
|
- return touTiaoAdvertiserService.advertiserPlanUpdateBudget(accountId, adIds, budgets);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 4:获取广告主广告预算信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/budget/get/")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserBudget(String accountId) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserBudget(accountId);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 3:获取广告主广告组信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/campaign/get")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCampaign(String accountId, String ids) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserCampaign(accountId, ids);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 5:获取广告主广告创意信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/creative/get")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> getAdvertiserCreative(String accountId, String ids) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserCreative(accountId, ids);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 5:修改广告创意信息状态 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/update/status/")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCreativeUpdateStatus(String accountId, String creativeIds, String optStatus) {
|
|
|
- return touTiaoAdvertiserService.advertiserCreativeUpdateStatus(accountId, creativeIds, optStatus);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 6:获取广告主广告创意素材信息 @param accountId 本平台广告主id @param creativeIds 广告创意id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/creative/material/read")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCreativeMaterial(String accountId, String creativeIds) {
|
|
|
- return touTiaoAdvertiserService.getAdvertiserCreativeMaterial(accountId, creativeIds);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 7:创建广告组信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/campaign/create")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCampaignCreate(String accountId, String campaignName, String budgetMode, Integer budget, String landingType) {
|
|
|
- return touTiaoAdvertiserService.advertiserCampaignCreate(accountId, campaignName, budgetMode, budget, landingType);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 7:广告组更新状态信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/campaign/update/status")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCampaignUpdateStatus(String accountId, String campaignIds, String optStatus) {
|
|
|
- return touTiaoAdvertiserService.advertiserCampaignUpdateStatus(accountId, campaignIds, optStatus);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 8:广告组更新信息 @param accountId 本平台广告主id
|
|
|
- */
|
|
|
- @RequestMapping("/advertiser/campaign/update")
|
|
|
- @ResponseBody
|
|
|
- public Map<String, Object> advertiserCampaignUpdate(String accountId, Long campaignId, String budgetMode, Integer budget, String campaignName) {
|
|
|
- return touTiaoAdvertiserService.advertiserCampaignUpdate(accountId, campaignId, budgetMode, budget, campaignName);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * @功能:查询字典数据
|
|
|
- * @param sysDictItem
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "dictItem/list", method = RequestMethod.GET)
|
|
|
- @ResponseBody
|
|
|
- public Result<IPage<SysDictItem>> queryPageList(SysDictItem sysDictItem, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
- @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
|
|
|
- Result<IPage<SysDictItem>> result = new Result<IPage<SysDictItem>>();
|
|
|
- QueryWrapper<SysDictItem> queryWrapper = QueryGenerator.initQueryWrapper(sysDictItem, req.getParameterMap());
|
|
|
- queryWrapper.orderByAsc("sort_order");
|
|
|
- Page<SysDictItem> page = new Page<SysDictItem>(pageNo, pageSize);
|
|
|
- IPage<SysDictItem> pageList = sysDictItemService.page(page, queryWrapper);
|
|
|
- System.err.println(pageList);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(pageList);
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- * @param setBidType
|
|
|
- * @param setFlowControlMode
|
|
|
- * @param setBudgetPrice
|
|
|
- * @param setBudgetMode
|
|
|
- * @param setFlowDate
|
|
|
- * @param setDateFlowRange
|
|
|
- * @param setDateQuantum
|
|
|
- * @param setPriceType
|
|
|
- * @param setConvertPrice
|
|
|
- * @param setFilterType
|
|
|
- * @param setDateQuantumRange
|
|
|
- * @param req
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "budgetModel/insert", method = RequestMethod.GET)
|
|
|
- @ResponseBody
|
|
|
- public Map<String,Object> budgetModelInsert(@RequestParam(name="setBidType", defaultValue="1")String setBidType,
|
|
|
- @RequestParam(name="setFlowControlMode", defaultValue="1") String setFlowControlMode,
|
|
|
- @RequestParam(name="setBudgetPrice", defaultValue="1") String setBudgetPrice,
|
|
|
- @RequestParam(name="setBudgetMode", defaultValue="1") String setBudgetMode,
|
|
|
- @RequestParam(name="setFlowDate", defaultValue="1") String setFlowDate,
|
|
|
- @RequestParam(name="setDateFlowRange", defaultValue="1") String setDateFlowRange,
|
|
|
- @RequestParam(name="setDateQuantum", defaultValue="1") String setDateQuantum,
|
|
|
- @RequestParam(name="setPriceType", defaultValue="1") String setPriceType,
|
|
|
- @RequestParam(name="setConvertPrice", defaultValue="1") String setConvertPrice,
|
|
|
- @RequestParam(name="setFilterType", defaultValue="1") String setFilterType,
|
|
|
- @RequestParam(name="setDateQuantumRange", defaultValue="1") String setDateQuantumRange,HttpServletRequest req) {
|
|
|
- Map<String,Object> result = new HashMap<>();
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ISysDictItemService sysDictItemService;
|
|
|
-}
|