Commit 81e6486a by BetterXT

modify dto

parent 4adaea7e
package io.better.toutiao.api.datareport; package io.better.toutiao.api.datareport;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.TouTiaoRespDTO;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
...@@ -87,15 +87,15 @@ public interface DataReportApi { ...@@ -87,15 +87,15 @@ public interface DataReportApi {
* @return advertising plan report data * @return advertising plan report data
*/ */
@GetMapping(value = "/ad/get/", consumes = "application/json") @GetMapping(value = "/ad/get/", consumes = "application/json")
BaseRespDTO<?> getAdvertisingPlanReportData(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<?> getAdvertisingPlanReportData(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam("start_date") String startDate, @RequestParam("start_date") String startDate,
@RequestParam("end_date") String endDate, @RequestParam("end_date") String endDate,
@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,
@RequestParam(value = "group_by", required = false) String[] groupBy, @RequestParam(value = "group_by", required = false) String[] groupBy,
@RequestParam(value = "time_granularity", defaultValue = STAT_TIME_GRANULARITY_DAILY, required = false) String timeGranularity, @RequestParam(value = "time_granularity", defaultValue = STAT_TIME_GRANULARITY_DAILY, required = false) String timeGranularity,
@RequestParam(value = "filtering", required = false) Map<String, Object> filtering); @RequestParam(value = "filtering", required = false) Map<String, Object> filtering);
/** /**
* 获取广告创意报表数据 * 获取广告创意报表数据
......
package io.better.toutiao.api.delivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.TouTiaoRespDTO;
import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeInDTO; import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeInfoDTO;
import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeOutDTO; import io.better.toutiao.dto.delivery.creative.AdvertisingCreativeRespDTO;
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.*;
...@@ -30,26 +30,26 @@ public interface AdvertisingCreativeApi { ...@@ -30,26 +30,26 @@ public interface AdvertisingCreativeApi {
* @return 广告创意信息 base resp dto * @return 广告创意信息 base resp dto
*/ */
@GetMapping(value = "/get") @GetMapping(value = "/get")
BaseRespDTO<AdvertisingCreativeInDTO> listAdvertisingCreative(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<AdvertisingCreativeRespDTO> listAdvertisingCreative(@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,
@RequestParam(value = "filtering", required = false) Map<String, Object> filtering, @RequestParam(value = "filtering", required = false) Map<String, Object> filtering,
@RequestParam(value = "fields", required = false) String[] fields); @RequestParam(value = "fields", required = false) String[] fields);
/** /**
* 广告投放-为某广告主下的某计划创建广告创意 * 广告投放-为某广告主下的某计划创建广告创意
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertisingCreativeOut 创建信息 * @param advertisingCreativeInfo 创建信息
* @return the base resp dto * @return the base resp dto
*/ */
@PostMapping(value = "/create_v2") @PostMapping(value = "/create_v2")
BaseRespDTO<Integer> createAdvertisingCreative(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Integer> createAdvertisingCreative(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingCreativeOutDTO advertisingCreativeOut); @RequestBody AdvertisingCreativeInfoDTO advertisingCreativeInfo);
/** /**
* 广告投放-查看某广告主下某计划下的创详情信息 * 广告投放-查看某广告主下某计划下的创详情信息
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertiserId 广告主ID * @param advertiserId 广告主ID
...@@ -57,20 +57,20 @@ public interface AdvertisingCreativeApi { ...@@ -57,20 +57,20 @@ public interface AdvertisingCreativeApi {
* @return the advertising creative detail info * @return the advertising creative detail info
*/ */
@GetMapping(value = "/read_v2") @GetMapping(value = "/read_v2")
BaseRespDTO<List<AdvertisingCreativeOutDTO>> getAdvertisingCreativeDetailInfo(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<AdvertisingCreativeInfoDTO> getAdvertisingCreativeDetailInfo(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Integer advertiserId, @RequestParam("advertiser_id") Integer advertiserId,
@RequestParam("ad_id") Integer adId); @RequestParam("ad_id") Integer adId);
/** /**
* 更新 * 广告投放-更新具体广告计划下创意详情信息
* *
* @param accessToken 访问凭证 * @param accessToken 访问凭证
* @param advertisingCreativeOut 更新信息 * @param advertisingCreativeInfo 更新信息
* @return the base resp dto * @return the base resp dto
*/ */
@PostMapping(value = "/update_v2") @PostMapping(value = "/update_v2")
BaseRespDTO<Integer> updateAdvertisingCreative(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Integer> updateAdvertisingCreativeDetailInfo(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingCreativeOutDTO advertisingCreativeOut); @RequestBody AdvertisingCreativeInfoDTO advertisingCreativeInfo);
/** /**
* 广告投放-更新某个广告创意状态 * 广告投放-更新某个广告创意状态
...@@ -80,8 +80,8 @@ public interface AdvertisingCreativeApi { ...@@ -80,8 +80,8 @@ public interface AdvertisingCreativeApi {
* @return the base resp dto * @return the base resp dto
*/ */
@PostMapping(value = "/update/status") @PostMapping(value = "/update/status")
BaseRespDTO<?> updateAdvertisingCreativeStatus(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<List<Long>> updateAdvertisingCreativeStatus(@RequestHeader("Access-Token") String accessToken,
@RequestBody UpdateStatusDTO updateStatus); @RequestBody UpdateStatusDTO updateStatus);
/** /**
* 广告投放-获取光广告创意下的素材信息 * 广告投放-获取光广告创意下的素材信息
...@@ -93,8 +93,8 @@ public interface AdvertisingCreativeApi { ...@@ -93,8 +93,8 @@ public interface AdvertisingCreativeApi {
* @return * @return
*/ */
@GetMapping(value = "/material/read") @GetMapping(value = "/material/read")
BaseRespDTO<AdvertisingCreativeInDTO.CreativeMaterialInfo> getCreativeMaterial(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<?> getCreativeMaterial(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam("creative_ids") Long[] creativeIds, @RequestParam("creative_ids") Long[] creativeIds,
@RequestParam("fields") String[] fields); @RequestParam("fields") String[] fields);
} }
package io.better.toutiao.api.delivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.TouTiaoRespDTO;
import io.better.toutiao.dto.delivery.group.AdvertisingGroupOutDTO; import io.better.toutiao.dto.delivery.group.AdvertisingGroupOutDTO;
import io.better.toutiao.dto.delivery.group.AdvertisingGroupInDTO; import io.better.toutiao.dto.delivery.group.AdvertisingGroupInDTO;
import io.better.toutiao.dto.status.UpdateStatusDTO; import io.better.toutiao.dto.status.UpdateStatusDTO;
...@@ -39,12 +39,12 @@ public interface AdvertisingGroupApi { ...@@ -39,12 +39,12 @@ public interface AdvertisingGroupApi {
* @return advertising group * @return advertising group
*/ */
@GetMapping(value = "/get") @GetMapping(value = "/get")
BaseRespDTO<AdvertisingGroupInDTO> getAdvertisingGroup(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<AdvertisingGroupInDTO> getAdvertisingGroup(@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,
@RequestParam(value = "filtering", required = false) Map<String, Object> filtering, @RequestParam(value = "filtering", required = false) Map<String, Object> filtering,
@RequestParam(value = "fields", required = false) String[] fields); @RequestParam(value = "fields", required = false) String[] fields);
/** /**
* 广告投放-为某广告主创建广告组信息 * 广告投放-为某广告主创建广告组信息
...@@ -54,8 +54,8 @@ public interface AdvertisingGroupApi { ...@@ -54,8 +54,8 @@ public interface AdvertisingGroupApi {
* @return the list * @return the list
*/ */
@PostMapping(value = "/create") @PostMapping(value = "/create")
BaseRespDTO<Long> createAdvertisingGroup(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Long> createAdvertisingGroup(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingGroupOutDTO advertisingGroupOutDTO); @RequestBody AdvertisingGroupOutDTO advertisingGroupOutDTO);
/** /**
* 广告投放-修改某广告主的广告组信息 * 广告投放-修改某广告主的广告组信息
...@@ -65,8 +65,8 @@ public interface AdvertisingGroupApi { ...@@ -65,8 +65,8 @@ public interface AdvertisingGroupApi {
* @return the list * @return the list
*/ */
@PostMapping(value = "/update") @PostMapping(value = "/update")
BaseRespDTO<Long> updateAdvertisingGroup(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Long> updateAdvertisingGroup(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingGroupOutDTO advertisingGroupOutDTO); @RequestBody AdvertisingGroupOutDTO advertisingGroupOutDTO);
/** /**
* 广告投放-修改某广告主的广告组状态信息 * 广告投放-修改某广告主的广告组状态信息
...@@ -76,7 +76,7 @@ public interface AdvertisingGroupApi { ...@@ -76,7 +76,7 @@ public interface AdvertisingGroupApi {
* @return list list * @return list list
*/ */
@PostMapping(value = "/update/status") @PostMapping(value = "/update/status")
BaseRespDTO<Long> updateAdvertisingGroupStatus(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Long> updateAdvertisingGroupStatus(@RequestHeader("Access-Token") String accessToken,
@RequestBody UpdateStatusDTO updateStatusDTO); @RequestBody UpdateStatusDTO updateStatusDTO);
} }
package io.better.toutiao.api.delivery; package io.better.toutiao.api.delivery;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.TouTiaoRespDTO;
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;
...@@ -32,12 +32,12 @@ public interface AdvertisingPlanApi { ...@@ -32,12 +32,12 @@ public interface AdvertisingPlanApi {
* @return advertising plan * @return advertising plan
*/ */
@GetMapping(value = "/get") @GetMapping(value = "/get")
BaseRespDTO<List<AdvertisingPlanInDTO>> getAdvertisingPlan(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<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,
@RequestParam(value = "filtering", required = false) Map<String, Object> filtering, @RequestParam(value = "filtering", required = false) Map<String, Object> filtering,
@RequestParam(value = "fields", required = false) String[] fields); @RequestParam(value = "fields", required = false) String[] fields);
/** /**
...@@ -48,8 +48,8 @@ public interface AdvertisingPlanApi { ...@@ -48,8 +48,8 @@ public interface AdvertisingPlanApi {
* @return 广告计划ID * @return 广告计划ID
*/ */
@PostMapping(value = "/create") @PostMapping(value = "/create")
BaseRespDTO<Integer> createAdvertisingPlan(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Integer> createAdvertisingPlan(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingPlanInDTO advertisingPlanIn @RequestBody AdvertisingPlanInDTO advertisingPlanIn
); );
/** /**
...@@ -60,8 +60,8 @@ public interface AdvertisingPlanApi { ...@@ -60,8 +60,8 @@ public interface AdvertisingPlanApi {
* @return 广告计划ID * @return 广告计划ID
*/ */
@PostMapping(value = "/update") @PostMapping(value = "/update")
BaseRespDTO<Integer> updateAdvertisingPlan(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<Integer> updateAdvertisingPlan(@RequestHeader("Access-Token") String accessToken,
@RequestBody AdvertisingPlanOutDTO advertisingPlanOut @RequestBody AdvertisingPlanOutDTO advertisingPlanOut
); );
/** /**
...@@ -72,8 +72,8 @@ public interface AdvertisingPlanApi { ...@@ -72,8 +72,8 @@ public interface AdvertisingPlanApi {
* @return 广告计划ID集合 * @return 广告计划ID集合
*/ */
@PostMapping(value = "/update/status") @PostMapping(value = "/update/status")
BaseRespDTO<List<Integer>> updateAdvertisingPlanStatus(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<List<Integer>> updateAdvertisingPlanStatus(@RequestHeader("Access-Token") String accessToken,
@RequestBody UpdateStatusDTO updateStatusDTO); @RequestBody UpdateStatusDTO updateStatusDTO);
/** /**
* 广告投放-更新某广告主下广告计划预算,可以批量更新 * 广告投放-更新某广告主下广告计划预算,可以批量更新
...@@ -83,8 +83,8 @@ public interface AdvertisingPlanApi { ...@@ -83,8 +83,8 @@ public interface AdvertisingPlanApi {
* @return 广告计划ID集合 * @return 广告计划ID集合
*/ */
@PostMapping(value = "/update/budget") @PostMapping(value = "/update/budget")
BaseRespDTO<List<Integer>> updateAdvertisingPlanBudget(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<List<Integer>> updateAdvertisingPlanBudget(@RequestHeader("Access-Token") String accessToken,
@RequestBody UpdateBudgetDTO updateBudget); @RequestBody UpdateBudgetDTO updateBudget);
/** /**
* 广告投放-更新某广告主下广告计划出价,可以批量更新 * 广告投放-更新某广告主下广告计划出价,可以批量更新
...@@ -94,6 +94,6 @@ public interface AdvertisingPlanApi { ...@@ -94,6 +94,6 @@ public interface AdvertisingPlanApi {
* @return 广告计划ID集合 * @return 广告计划ID集合
*/ */
@PostMapping(value = "/update/bid") @PostMapping(value = "/update/bid")
BaseRespDTO<List<Integer>> updateAdvertisingPlanBid(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<List<Integer>> updateAdvertisingPlanBid(@RequestHeader("Access-Token") String accessToken,
@RequestBody UpdateBidDTO updateBid); @RequestBody UpdateBidDTO updateBid);
} }
package io.better.toutiao.api.util; package io.better.toutiao.api.util;
import io.better.toutiao.dto.BaseRespDTO; import io.better.toutiao.dto.TouTiaoRespDTO;
import io.better.toutiao.dto.util.FileInfoInDTO; import io.better.toutiao.dto.util.FileInfoInDTO;
import io.better.toutiao.dto.util.FileInfoOutDTO; import io.better.toutiao.dto.util.FileInfoOutDTO;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
...@@ -24,8 +24,8 @@ public interface FileManagerApi { ...@@ -24,8 +24,8 @@ public interface FileManagerApi {
* @return the base resp dto * @return the base resp dto
*/ */
@PostMapping(value = "/image/advertiser") @PostMapping(value = "/image/advertiser")
BaseRespDTO<FileInfoInDTO> uploadAdvertiserImage(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> uploadAdvertiserImage(@RequestHeader("Access-Token") String accessToken,
@RequestBody FileInfoOutDTO fileInfoOut); @RequestBody FileInfoOutDTO fileInfoOut);
/** /**
* 工具-文件管理-上传广告图片 * 工具-文件管理-上传广告图片
...@@ -35,8 +35,8 @@ public interface FileManagerApi { ...@@ -35,8 +35,8 @@ public interface FileManagerApi {
* @return the base resp dto * @return the base resp dto
*/ */
@PostMapping(value = "/image/ad") @PostMapping(value = "/image/ad")
BaseRespDTO<FileInfoInDTO> uploadAdvertisingImage(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> uploadAdvertisingImage(@RequestHeader("Access-Token") String accessToken,
@RequestBody FileInfoOutDTO fileInfoOut); @RequestBody FileInfoOutDTO fileInfoOut);
/** /**
* 工具-文件管理-查询图片信息 * 工具-文件管理-查询图片信息
...@@ -47,9 +47,9 @@ public interface FileManagerApi { ...@@ -47,9 +47,9 @@ public interface FileManagerApi {
* @return the image info * @return the image info
*/ */
@GetMapping(value = "/ad/get") @GetMapping(value = "/ad/get")
BaseRespDTO<FileInfoInDTO> getImageInfo(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> getImageInfo(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam("image_ids") String[] imageIds); @RequestParam("image_ids") String[] imageIds);
/** /**
* 工具-文件管理-查询视频信息 * 工具-文件管理-查询视频信息
...@@ -60,9 +60,9 @@ public interface FileManagerApi { ...@@ -60,9 +60,9 @@ public interface FileManagerApi {
* @return the video info * @return the video info
*/ */
@GetMapping(value = "/video/ad/get") @GetMapping(value = "/video/ad/get")
BaseRespDTO<FileInfoInDTO> getVideoInfo(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> getVideoInfo(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam("video_ids") String[] videoIds); @RequestParam("video_ids") String[] videoIds);
/** /**
...@@ -76,11 +76,11 @@ public interface FileManagerApi { ...@@ -76,11 +76,11 @@ public interface FileManagerApi {
* @return the image material info * @return the image material info
*/ */
@GetMapping(value = "/image/get") @GetMapping(value = "/image/get")
BaseRespDTO<FileInfoInDTO> getImageMaterialInfo(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> getImageMaterialInfo(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam(value = "video_ids", required = false) Map<String, Object> filtering, @RequestParam(value = "video_ids", required = false) Map<String, Object> filtering,
@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);
/** /**
* 工具-文件管理-获取视频素材 * 工具-文件管理-获取视频素材
...@@ -93,11 +93,11 @@ public interface FileManagerApi { ...@@ -93,11 +93,11 @@ public interface FileManagerApi {
* @return the video material info * @return the video material info
*/ */
@GetMapping(value = "/video/get") @GetMapping(value = "/video/get")
BaseRespDTO<FileInfoInDTO> getVideoMaterialInfo(@RequestHeader("Access-Token") String accessToken, TouTiaoRespDTO<FileInfoInDTO> getVideoMaterialInfo(@RequestHeader("Access-Token") String accessToken,
@RequestParam("advertiser_id") Long advertiserId, @RequestParam("advertiser_id") Long advertiserId,
@RequestParam(value = "video_ids", required = false) Map<String, Object> filtering, @RequestParam(value = "video_ids", required = false) Map<String, Object> filtering,
@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);
} }
...@@ -6,7 +6,7 @@ import lombok.Data; ...@@ -6,7 +6,7 @@ import lombok.Data;
* @author better create in 2019-04-29 14:06 * @author better create in 2019-04-29 14:06
*/ */
@Data @Data
public class BaseRespDTO<T> { public class TouTiaoRespDTO<T> {
/** /**
* 成功响应码 * 成功响应码
......
...@@ -5,10 +5,12 @@ import lombok.Data; ...@@ -5,10 +5,12 @@ import lombok.Data;
import java.util.List; import java.util.List;
/** /**
* 广告创意详情信息DTO,粒度比较细
*
* @author better create in 2019-04-29 11:16 * @author better create in 2019-04-29 11:16
*/ */
@Data @Data
public class AdvertisingCreativeOutDTO { public class AdvertisingCreativeInfoDTO {
/** /**
* 广告主ID * 广告主ID
...@@ -142,7 +144,7 @@ public class AdvertisingCreativeOutDTO { ...@@ -142,7 +144,7 @@ public class AdvertisingCreativeOutDTO {
private String advancedCreativeType; private String advancedCreativeType;
/** /**
* 标题 * 附加创意标题
*/ */
private String advancedCreativeTitle; private String advancedCreativeTitle;
...@@ -174,54 +176,22 @@ public class AdvertisingCreativeOutDTO { ...@@ -174,54 +176,22 @@ public class AdvertisingCreativeOutDTO {
/** /**
* 标题信息,程序化创意必填 * 标题信息,程序化创意必填
*/ */
private List<TitleCreativeInfo> titleList; private List<TitleInfo> titleList;
/** /**
* 素材信息,程序化创意必填 * 素材信息,程序化创意必填
*/ */
private List<ImageCreativeInfo> imageList; private List<ImageInfo> imageList;
/** /**
* 素材信息,投放位置和创意类型决定素材规格 * 素材信息,投放位置和创意类型决定素材规格
*
* @see MaterialInfo
*/ */
private List<?> creatives; private List<MaterialInfo> creatives;
@Data /**
public static class TitleCreativeInfo { * 修改时间
*/
/** private String modifyTime;
* 创意标题
*/
private String title;
/**
* 动态词包ID
* 可使用动态词包查询接口获得
*/
private List<?> creativeWordIds;
}
@Data
public static class ImageCreativeInfo {
/**
* 素材类型
*/
private String imageMode;
/**
* 图片ID
*/
private String imageId;
/**
* 视频ID
*/
private String videoId;
/**
* 图片id列表,非视频素材时填写
*/
private List<?> imageIds;
}
} }
package io.better.toutiao.dto.delivery.creative; package io.better.toutiao.dto.delivery.creative;
import io.better.toutiao.dto.resp.PageRespDTO;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
/** /**
* 广告创意列表信息DTO,粒度不够细
*
* @author better create in 2019-04-29 11:16 * @author better create in 2019-04-29 11:16
*/ */
@Data @Data
public class AdvertisingCreativeInDTO { public class AdvertisingCreativeListInfoDTO {
/**
* 创意ID
*/
private String creativeId;
/**
* 广告计划ID
*/
private String adId;
/**
* 广告主ID
*/
private String advertiserId;
/**
* 创意素材标题
*/
private String title;
/**
* 动态词包列表
*/
private String[] creativeWordIds;
/**
* 创意素材状态
*/
private String status;
/**
* 创意素材操作状态
*/
private String optStatus;
/**
* 创意素材类型
*/
private String imageMode;
/**
* 图片素材id列表
*/
private String[] imageIds;
/**
* 视频素材封面
*/
private String imageId;
/** /**
* 分页信息 * 视频id
*/ */
private PageRespDTO pageInfo; private String videoId;
/** /**
* 创意信息集合 * 第三方id
*/ */
private List<CreativeInfo> list; private String thirdPartyId;
/** /**
* 创意信息 * 创意审核信息
*/ */
@Data private String auditRejectReason;
private static class CreativeInfo {
/**
* 创意ID
*/
private String creativeId;
/**
* 广告计划ID
*/
private String adId;
/**
* 广告主ID
*/
private String advertiserId;
/**
* 创意素材标题
*/
private String title;
/**
* 动态词包列表
*/
private String[] creativeWordIds;
/**
* 创意素材状态
*/
private String status;
/**
* 创意素材操作状态
*/
private String optStatus;
/**
* 创意素材类型
*/
private String imageMode;
/**
* 图片素材id列表
*/
private String[] imageIds;
/**
* 视频素材封面
*/
private String imageId;
/**
* 视频id
*/
private String videoId;
/**
* 第三方id
*/
private String thirdPartyId;
/**
* 创意审核信息
*/
private String auditRejectReason;
/**
* 素材信息列表
*/
private List<?> materials;
}
/** /**
* 创意素材信息 * 素材信息列表
*/ */
@Data private List<MaterialInfo> materials;
public static class CreativeMaterialInfo { }
\ No newline at end of file
/**
* 创意ID
*/
private String id;
/**
* 广告ID
*/
private String adId;
/**
* 广告主ID
*/
private String advertiserId;
/**
* 创意标题
*/
private String title;
/**
* 创意状态
*/
private String optStatus;
/**
* 创意类型
*/
private String imageMode;
/**
* 图片素材信息
*/
private String[] imageInfo;
/**
*
*/
private String imageId;
/**
*
*/
private String videoId;
/**
*
*/
private String auditRejectReason;
}
}
package io.better.toutiao.dto.delivery.creative;
import io.better.toutiao.dto.resp.PageRespDTO;
import lombok.Data;
import java.util.List;
/**
* @author better create in 2019-04-29 11:16
*/
@Data
public class AdvertisingCreativeRespDTO {
/**
* 分页信息
*/
private PageRespDTO pageInfo;
/**
* 创意信息集合
*/
private List<AdvertisingCreativeListInfoDTO> list;
}
...@@ -8,21 +8,7 @@ import java.util.List; ...@@ -8,21 +8,7 @@ import java.util.List;
* @author better create in 2019-04-30 09:50 * @author better create in 2019-04-30 09:50
*/ */
@Data @Data
public class VideoCreativeOutDTO { public class ImageInfo {
/**
* 创意标题,如果要使用动态词包
* 格式如下:“XXX{词包名}XXX{词包名}XXX”
* 请注意当您使用动态词包需在下方creative_word_ids字段中按顺序传入词包ID
* 并且在一个标题中最多使用两个动态词包。标题,长度为6-30个字, 两个英文字符占1位
*/
private String title;
/**
* 动态词包ID,可使用动态词包查询接口获得,结合标题中的词包格式您需要填写相同个数与顺序的词包ID,
* 如果实际ID顺序与标题中词包名顺序不一致我们将以词包ID顺序为准。
*/
private List<?> creativeWordIds;
/** /**
* 素材类型 * 素材类型
...@@ -30,17 +16,17 @@ public class VideoCreativeOutDTO { ...@@ -30,17 +16,17 @@ public class VideoCreativeOutDTO {
private String imageMode; private String imageMode;
/** /**
* 图片id,视频素材时填写。图片ID和视频ID可通过文件管理 中的接口获得。 * 图片ID
*/ */
private String imageId; private String imageId;
/** /**
* 视频id,视频素材时填写。图片ID和视频ID可通过文件管理 中的接口获得。 * 视频ID
*/ */
private String videoId; private String videoId;
/** /**
* 创意自定义参数,例如开发者可设定此参数为创意打标签用于区分使用的素材类型,选填 * 图片id列表,非视频素材时填写
*/ */
private String thirdPartyId; private List<?> imageIds;
} }
\ No newline at end of file
...@@ -5,10 +5,19 @@ import lombok.Data; ...@@ -5,10 +5,19 @@ import lombok.Data;
import java.util.List; import java.util.List;
/** /**
* 素材信息
* <p>
* 包含图片素材字段和视频素材字段
*
* @author better create in 2019-04-30 09:50 * @author better create in 2019-04-30 09:50
*/ */
@Data @Data
public class ImageCreativeOutDTO { public class MaterialInfo extends ImageInfo {
/**
* 创意ID
*/
private Long creativeId;
/** /**
* 创意标题,如果要使用动态词包 * 创意标题,如果要使用动态词包
...@@ -25,21 +34,10 @@ public class ImageCreativeOutDTO { ...@@ -25,21 +34,10 @@ public class ImageCreativeOutDTO {
*/ */
private List<?> creativeWordIds; private List<?> creativeWordIds;
/**
* 素材类型
*/
private String imageMode;
/**
* 图片id列表,非视频素材时填写(组图传3张图,其他传1张)
* 图片ID和视频ID可通过文件管理 中的接口获得。
*/
private List<?> imageIds;
/** /**
* 创意自定义参数, * 创意自定义参数,
* 例如开发者可设定此参数为创意打标签用于区分使用的素材类型,选填 * 例如开发者可设定此参数为创意打标签用于区分使用的素材类型,选填
*/ */
private String thirdPartyId; private String thirdPartyId;
} }
package io.better.toutiao.dto.delivery.creative;
import lombok.Data;
import java.util.List;
/**
* @author better create in 2019-04-30 09:50
*/
@Data
public class TitleInfo {
/**
* 创意标题
*/
private String title;
/**
* 动态词包ID
* 可使用动态词包查询接口获得
*/
private List<?> creativeWordIds;
}
\ No newline at end of file
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