Commit 4adaea7e by BetterXT

modify advertising plan dto field

parent b99ecbde
package io.better.toutiao.api.advertisingdelivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.BaseRespDTO;
import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeInDTO; import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeInDTO;
......
package io.better.toutiao.api.advertisingdelivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.BaseRespDTO;
import io.better.toutiao.dto.delivery.group.AdvertisingGroupOutDTO; import io.better.toutiao.dto.delivery.group.AdvertisingGroupOutDTO;
......
package io.better.toutiao.api.advertisingdelivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.BaseRespDTO;
import io.better.toutiao.dto.delivery.plan.AdvertisingPlanInDTO; import io.better.toutiao.dto.delivery.plan.AdvertisingPlanInDTO;
import io.better.toutiao.dto.budget.UpdateBidDTO; import io.better.toutiao.dto.budget.UpdateBidDTO;
import io.better.toutiao.dto.budget.UpdateBudgetDTO; import io.better.toutiao.dto.budget.UpdateBudgetDTO;
import io.better.toutiao.dto.resp.AdvertisingPlanRespDTO; import io.better.toutiao.dto.delivery.plan.AdvertisingPlanOutDTO;
import io.better.toutiao.dto.status.UpdateStatusDTO; import io.better.toutiao.dto.status.UpdateStatusDTO;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -21,7 +21,7 @@ import java.util.Map; ...@@ -21,7 +21,7 @@ import java.util.Map;
public interface AdvertisingPlanApi { public interface AdvertisingPlanApi {
/** /**
* 广告投放-获取某广告的广告计划 * 广告投放-获取某广告的广告计划
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertiserId the advertiser id * @param advertiserId the advertiser id
...@@ -32,7 +32,7 @@ public interface AdvertisingPlanApi { ...@@ -32,7 +32,7 @@ public interface AdvertisingPlanApi {
* @return advertising plan * @return advertising plan
*/ */
@GetMapping(value = "/get") @GetMapping(value = "/get")
BaseRespDTO<List<AdvertisingPlanRespDTO>> getAdvertisingPlan(@RequestHeader("Access-Token") String accessToken, BaseRespDTO<List<AdvertisingPlanInDTO>> getAdvertisingPlan(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam(value = "page", defaultValue = "1", required = false) Integer page, @RequestParam(value = "page", defaultValue = "1", required = false) Integer page,
@RequestParam(value = "page_size", defaultValue = "20", required = false) Integer pageSize, @RequestParam(value = "page_size", defaultValue = "20", required = false) Integer pageSize,
...@@ -41,7 +41,7 @@ public interface AdvertisingPlanApi { ...@@ -41,7 +41,7 @@ public interface AdvertisingPlanApi {
/** /**
* 广告投放-为某广告创建广告计划 * 广告投放-为某广告创建广告计划
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertisingPlanIn 更新对象 * @param advertisingPlanIn 更新对象
...@@ -56,12 +56,12 @@ public interface AdvertisingPlanApi { ...@@ -56,12 +56,12 @@ public interface AdvertisingPlanApi {
* 广告投放-更新某广告主的广告计划 * 广告投放-更新某广告主的广告计划
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertisingPlanIn 更新信息 * @param advertisingPlanOut 更新信息
* @return 广告计划ID * @return 广告计划ID
*/ */
@PostMapping(value = "/update") @PostMapping(value = "/update")
BaseRespDTO<Integer> updateAdvertisingPlan(@RequestHeader("Access-Token") String accessToken, BaseRespDTO<Integer> updateAdvertisingPlan(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingPlanInDTO advertisingPlanIn @RequestBody AdvertisingPlanOutDTO advertisingPlanOut
); );
/** /**
......
...@@ -10,11 +10,23 @@ import java.util.List; ...@@ -10,11 +10,23 @@ import java.util.List;
@Data @Data
public class UpdateBidDTO { public class UpdateBidDTO {
/**
* 广告主ID
*/
private Long advertiserId; private Long advertiserId;
private Integer[] adIds; /**
* 计划ID集合
*/
private List<Integer> adIds;
/**
* 出价
*/
private Integer bid; private Integer bid;
/**
* ID集合
*/
private List<Integer> data; private List<Integer> data;
} }
...@@ -10,11 +10,23 @@ import java.util.List; ...@@ -10,11 +10,23 @@ import java.util.List;
@Data @Data
public class UpdateBudgetDTO { public class UpdateBudgetDTO {
/**
* 广告主ID
*/
private Long advertiserId; private Long advertiserId;
/**
* 计划ID
*/
private Integer adId; private Integer adId;
/**
* 预算
*/
private Integer budget; private Integer budget;
/**
* ID集合
*/
private List<Integer> data; private List<Integer> data;
} }
...@@ -35,4 +35,9 @@ public class AdvertisingGroupOutDTO extends BaseDTO { ...@@ -35,4 +35,9 @@ public class AdvertisingGroupOutDTO extends BaseDTO {
* 第三方唯一键 * 第三方唯一键
*/ */
private String uniqueFk; private String uniqueFk;
/**
* 时间戳-更新时使用
*/
private String modifyTime;
} }
package io.better.toutiao.dto.delivery.plan; package io.better.toutiao.dto.delivery.plan;
import io.better.toutiao.dto.AudienceDTO;
import io.better.toutiao.dto.resp.PageRespDTO;
import lombok.Data; import lombok.Data;
/** /**
...@@ -9,14 +11,29 @@ import lombok.Data; ...@@ -9,14 +11,29 @@ import lombok.Data;
public class AdvertisingPlanInDTO { public class AdvertisingPlanInDTO {
/** /**
* 广告组ID
*/
private Long id;
/**
* 广告组名称
*/
private String name;
/**
* 广告主ID * 广告主ID
*/ */
private Integer advertiserId; private Long advertiserId;
/** /**
* 广告组ID * 广告组ID
*/ */
private String campaignId; private Long campaignId;
/**
* 广告组时间戳,用于更新时提交,服务端判断是否基于最新信息修改
*/
private String modifyTime;
/** /**
* 投放范围 * 投放范围
...@@ -24,14 +41,36 @@ public class AdvertisingPlanInDTO { ...@@ -24,14 +41,36 @@ public class AdvertisingPlanInDTO {
private String deliveryRange; private String deliveryRange;
/** /**
* 广告预算类型 * 计划上次修改时间
*/
private String adModifyTime;
/**
* 计划创建时间
*/
private String adCreateTime;
/**
* 广告组预算
*/
private Integer budget;
/**
* 广告组预算类型
*/ */
private String budgetMode; private String budgetMode;
/** /**
* 广告预算 * 广告计划投放状态
*
* @see io.better.toutiao.enums.AdvertisingPlanDeliveryStatus
*/
private String status;
/**
* 广告计划操作状态
*/ */
private Long budget; private String optStatus;
/** /**
* 广告投放起始时间 * 广告投放起始时间
...@@ -46,10 +85,10 @@ public class AdvertisingPlanInDTO { ...@@ -46,10 +85,10 @@ public class AdvertisingPlanInDTO {
/** /**
* 广告出价 * 广告出价
*/ */
private Long bid; private Integer bid;
/** /**
* 计划出价类型 * 广告出价类型
*/ */
private String pricing; private String pricing;
...@@ -84,17 +123,12 @@ public class AdvertisingPlanInDTO { ...@@ -84,17 +123,12 @@ public class AdvertisingPlanInDTO {
private String externalUrl; private String externalUrl;
/** /**
* 应用下载方式 * 广告应用下载链接
*/ */
private String downloadUrl; private String downloadUrl;
/** /**
* 广告名称 * 广告应用下载类型
*/
private String name;
/**
* 应用广告下载类型
*/ */
private String appType; private String appType;
...@@ -104,42 +138,57 @@ public class AdvertisingPlanInDTO { ...@@ -104,42 +138,57 @@ public class AdvertisingPlanInDTO {
private String packageName; private String packageName;
/** /**
* 过滤已转化用户类型的字段,只有转化为目标时可填 * 广告计划审核不通过原因
*/ */
private String hideIfConverted; private String auditRejectReason;
/** /**
* 过滤已安装,允许值: 0, 1 * ocpc广告转化出价,如果是cpc或cpm出价方式则使用bid字段
*/ */
private Long hideIfExists; private Integer cpaBid;
/** /**
* ocpm广告转化出价 * ocpc广告是否跳过第一阶段,0表示不跳过,1表示跳过
* (此参数将于2018年7月13日下线,ocpc将与ocpm保持一致,ocpc会默认进入第二阶段)
*/ */
private Long cpaBid; private Integer cpaSkipFirstPhrase;
/** /**
* 转换ID * 转化类型广告的转化工具id
*/ */
private Long convertId; private Integer convertId;
/** /**
* 穿山甲视频创意类型,允许值:ORIGINAL_VIDEO,REWARDED_VIDEO * 过滤已转化用户类型字段,只有转化为目标时可填
*/ */
private String unionVideoType; private String hideIfConverted;
/** /**
* 深度优化方式 * 过滤已安装,当推广目标为安卓应用下载时可填,0表示不过滤,1表示过滤,默认为不过滤
*/ */
private String deepBidType; private Integer hideIfExists;
/** /**
* 深度优化出价,deep_bid_type=DEEP_BID_MIN时必填 * 广告受众
*/ */
private Long deepCpabid; private AudienceDTO audience;
/**
* 分页信息
*/
private PageRespDTO pageInfo;
/** /**
* 第三方唯一键 * 第三方唯一键
*/ */
private String uniqueFk; private String uniqueFk;
/**
* 设置package属性
*
* @param packageName
*/
public void setPackage(String packageName) {
this.packageName = packageName;
}
} }
package io.better.toutiao.dto.delivery.plan; package io.better.toutiao.dto.delivery.plan;
import io.better.toutiao.dto.AudienceDTO;
import lombok.Data; import lombok.Data;
/** /**
* @author better create in 2019-04-29 10:23 * @author better create in 2019-04-29 10:23
*/ */
@Data @Data
public class AdvertisingPlanOutDTO extends AdvertisingPlanInDTO { public class AdvertisingPlanOutDTO extends AudienceDTO {
/** /**
* 广告主ID * 广告主ID
...@@ -142,4 +143,16 @@ public class AdvertisingPlanOutDTO extends AdvertisingPlanInDTO { ...@@ -142,4 +143,16 @@ public class AdvertisingPlanOutDTO extends AdvertisingPlanInDTO {
* 第三方唯一键 * 第三方唯一键
*/ */
private String uniqueFk; private String uniqueFk;
// 更新所需属性==============================
/**
* 计划ID
*/
private String adId;
/**
* 修改时间
*/
private String modifyTime;
} }
package io.better.toutiao.dto.resp;
import io.better.toutiao.dto.AudienceDTO;
import lombok.Data;
/**
* @author better create in 2019-04-29 14:21
*/
@Data
public class AdvertisingPlanRespDTO {
/**
* 广告组ID
*/
private Long id;
/**
* 广告组名称
*/
private String name;
/**
* 广告主ID
*/
private Long advertiserId;
/**
* 广告组ID
*/
private Long campaignId;
/**
* 广告组时间戳,用于更新时提交,服务端判断是否基于最新信息修改
*/
private String modifyTime;
/**
* 投放范围
*/
private String deliveryRange;
/**
* 计划上次修改时间
*/
private String adModifyTime;
/**
* 计划创建时间
*/
private String adCreateTime;
/**
* 广告组预算
*/
private Integer budget;
/**
* 广告组预算类型
*/
private String budgetMode;
/**
* 广告组推广目的
*
* @see io.better.toutiao.enums.LandingType
*/
private String landingType;
/**
* 广告计划投放状态
*
* @see io.better.toutiao.enums.AdvertisingPlanDeliveryStatus
*/
private String status;
/**
* 广告计划操作状态
*/
private String optStatus;
/**
* 广告投放起始时间
*/
private String startTime;
/**
* 广告投放结束时间
*/
private String endTime;
/**
* 广告出价
*/
private Integer bid;
/**
* 广告出价类型
*/
private String pricing;
/**
* 广告投放时间类型
*/
private String scheduleType;
/**
* 广告投放时段
*/
private String scheduleTime;
/**
* 广告投放速度类型
*/
private String flowControlMode;
/**
* 应用直达链接
*/
private String openUrl;
/**
* 应用下载方式
*/
private String downloadType;
/**
* 广告落地页链接
*/
private String externalUrl;
/**
* 广告应用下载链接
*/
private String downloadUrl;
/**
* 广告应用下载类型
*/
private String appType;
/**
* 广告应用下载包名
*/
private String packageName;
/**
* 广告计划审核不通过原因
*/
private String auditRejectReason;
/**
* ocpc广告转化出价,如果是cpc或cpm出价方式则使用bid字段
*/
private Integer cpaBid;
/**
* ocpc广告是否跳过第一阶段,0表示不跳过,1表示跳过
* (此参数将于2018年7月13日下线,ocpc将与ocpm保持一致,ocpc会默认进入第二阶段)
*/
private Integer cpaSkipFirstPhrase;
/**
* 转化类型广告的转化工具id
*/
private Integer convertId;
/**
* 过滤已转化用户类型字段,只有转化为目标时可填
*/
private String hideIfConverted;
/**
* 过滤已安装,当推广目标为安卓应用下载时可填,0表示不过滤,1表示过滤,默认为不过滤
*/
private Integer hideIfExists;
/**
* 广告受众
*/
private AudienceDTO audience;
/**
* 分页信息
*/
private PageRespDTO pageInfo;
/**
* 第三方唯一键
*/
private String uniqueFk;
/**
* 设置package属性
*
* @param packageName
*/
public void setPackage(String packageName) {
this.packageName = packageName;
}
}
...@@ -8,11 +8,28 @@ import lombok.Data; ...@@ -8,11 +8,28 @@ import lombok.Data;
@Data @Data
public class UpdateStatusDTO { public class UpdateStatusDTO {
/**
* 广告主ID
*/
private Long advertiserId; private Long advertiserId;
/**
* 计划ID集合
*/
private Integer[] adIds;
/**
* 广告组ID集合
*/
private Integer[] campaignIds; private Integer[] campaignIds;
/**
* 创意ID集合
*/
private Integer[] creativeIds; private Integer[] creativeIds;
/**
* 状态
*/
private String optStatus; private String optStatus;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment