Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
toutiao-api
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
chenmingyang
toutiao-api
Commits
81e6486a
Commit
81e6486a
authored
May 06, 2019
by
BetterXT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify dto
parent
4adaea7e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
230 additions
and
300 deletions
+230
-300
DataReportApi.java
.../java/io/better/toutiao/api/datareport/DataReportApi.java
+10
-10
AdvertisingCreativeApi.java
...o/better/toutiao/api/delivery/AdvertisingCreativeApi.java
+28
-28
AdvertisingGroupApi.java
...a/io/better/toutiao/api/delivery/AdvertisingGroupApi.java
+13
-13
AdvertisingPlanApi.java
...va/io/better/toutiao/api/delivery/AdvertisingPlanApi.java
+17
-17
FileManagerApi.java
src/main/java/io/better/toutiao/api/util/FileManagerApi.java
+21
-21
TouTiaoRespDTO.java
src/main/java/io/better/toutiao/dto/TouTiaoRespDTO.java
+1
-1
AdvertisingCreativeInfoDTO.java
...iao/dto/delivery/creative/AdvertisingCreativeInfoDTO.java
+14
-44
AdvertisingCreativeListInfoDTO.java
...dto/delivery/creative/AdvertisingCreativeListInfoDTO.java
+62
-134
AdvertisingCreativeRespDTO.java
...iao/dto/delivery/creative/AdvertisingCreativeRespDTO.java
+23
-0
ImageInfo.java
...va/io/better/toutiao/dto/delivery/creative/ImageInfo.java
+7
-20
MaterialInfo.java
...io/better/toutiao/dto/delivery/creative/MaterialInfo.java
+10
-12
TitleInfo.java
...va/io/better/toutiao/dto/delivery/creative/TitleInfo.java
+24
-0
No files found.
src/main/java/io/better/toutiao/api/datareport/DataReportApi.java
View file @
81e6486a
package
io
.
better
.
toutiao
.
api
.
datareport
;
package
io
.
better
.
toutiao
.
api
.
datareport
;
import
io.better.toutiao.dto.
Base
RespDTO
;
import
io.better.toutiao.dto.
TouTiao
RespDTO
;
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"
)
Base
RespDTO
<?>
getAdvertisingPlanReportData
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<?>
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
);
/**
/**
* 获取广告创意报表数据
* 获取广告创意报表数据
...
...
src/main/java/io/better/toutiao/api/delivery/AdvertisingCreativeApi.java
View file @
81e6486a
package
io
.
better
.
toutiao
.
api
.
delivery
;
package
io
.
better
.
toutiao
.
api
.
delivery
;
import
io.better.toutiao.dto.
Base
RespDTO
;
import
io.better.toutiao.dto.
TouTiao
RespDTO
;
import
io.better.toutiao.dto.delivery.creative.AdvertisingCreativeInDTO
;
import
io.better.toutiao.dto.delivery.creative.AdvertisingCreativeIn
fo
DTO
;
import
io.better.toutiao.dto.delivery.creative.AdvertisingCreative
Out
DTO
;
import
io.better.toutiao.dto.delivery.creative.AdvertisingCreative
Resp
DTO
;
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
<
AdvertisingCreativeIn
DTO
>
listAdvertisingCreative
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertisingCreativeResp
DTO
>
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 advertisingCreative
Out
创建信息
* @param advertisingCreative
Info
创建信息
* @return the base resp dto
* @return the base resp dto
*/
*/
@PostMapping
(
value
=
"/create_v2"
)
@PostMapping
(
value
=
"/create_v2"
)
Base
RespDTO
<
Integer
>
createAdvertisingCreative
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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 advertisingCreative
Out
更新信息
* @param advertisingCreative
Info
更新信息
* @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
);
}
}
src/main/java/io/better/toutiao/api/delivery/AdvertisingGroupApi.java
View file @
81e6486a
package
io
.
better
.
toutiao
.
api
.
delivery
;
package
io
.
better
.
toutiao
.
api
.
delivery
;
import
io.better.toutiao.dto.
Base
RespDTO
;
import
io.better.toutiao.dto.
TouTiao
RespDTO
;
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"
)
Base
RespDTO
<
AdvertisingGroupInDTO
>
getAdvertisingGroup
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
Long
>
createAdvertisingGroup
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
Long
>
updateAdvertisingGroup
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
Long
>
updateAdvertisingGroupStatus
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
Long
>
updateAdvertisingGroupStatus
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
UpdateStatusDTO
updateStatusDTO
);
@RequestBody
UpdateStatusDTO
updateStatusDTO
);
}
}
src/main/java/io/better/toutiao/api/delivery/AdvertisingPlanApi.java
View file @
81e6486a
package
io
.
better
.
toutiao
.
api
.
delivery
;
package
io
.
better
.
toutiao
.
api
.
delivery
;
import
io.better.toutiao.dto.
Base
RespDTO
;
import
io.better.toutiao.dto.
TouTiao
RespDTO
;
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"
)
Base
RespDTO
<
List
<
AdvertisingPlanInDTO
>>
getAdvertisingPlan
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
Integer
>
createAdvertisingPlan
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
Integer
>
updateAdvertisingPlan
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
List
<
Integer
>>
updateAdvertisingPlanStatus
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
List
<
Integer
>>
updateAdvertisingPlanBudget
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
List
<
Integer
>>
updateAdvertisingPlanBid
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
List
<
Integer
>>
updateAdvertisingPlanBid
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
UpdateBidDTO
updateBid
);
@RequestBody
UpdateBidDTO
updateBid
);
}
}
src/main/java/io/better/toutiao/api/util/FileManagerApi.java
View file @
81e6486a
package
io
.
better
.
toutiao
.
api
.
util
;
package
io
.
better
.
toutiao
.
api
.
util
;
import
io.better.toutiao.dto.
Base
RespDTO
;
import
io.better.toutiao.dto.
TouTiao
RespDTO
;
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"
)
Base
RespDTO
<
FileInfoInDTO
>
uploadAdvertiserImage
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
FileInfoInDTO
>
uploadAdvertisingImage
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
FileInfoInDTO
>
getImageInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
FileInfoInDTO
>
getVideoInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
FileInfoInDTO
>
getImageMaterialInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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"
)
Base
RespDTO
<
FileInfoInDTO
>
getVideoMaterialInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiao
RespDTO
<
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
);
}
}
src/main/java/io/better/toutiao/dto/
Base
RespDTO.java
→
src/main/java/io/better/toutiao/dto/
TouTiao
RespDTO.java
View file @
81e6486a
...
@@ -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
Base
RespDTO
<
T
>
{
public
class
TouTiao
RespDTO
<
T
>
{
/**
/**
* 成功响应码
* 成功响应码
...
...
src/main/java/io/better/toutiao/dto/delivery/creative/AdvertisingCreative
Out
DTO.java
→
src/main/java/io/better/toutiao/dto/delivery/creative/AdvertisingCreative
Info
DTO.java
View file @
81e6486a
...
@@ -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
AdvertisingCreative
Out
DTO
{
public
class
AdvertisingCreative
Info
DTO
{
/**
/**
* 广告主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
<
Title
Creative
Info
>
titleList
;
private
List
<
TitleInfo
>
titleList
;
/**
/**
* 素材信息,程序化创意必填
* 素材信息,程序化创意必填
*/
*/
private
List
<
Image
Creative
Info
>
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
;
}
}
}
src/main/java/io/better/toutiao/dto/delivery/creative/AdvertisingCreative
In
DTO.java
→
src/main/java/io/better/toutiao/dto/delivery/creative/AdvertisingCreative
ListInfo
DTO.java
View file @
81e6486a
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
;
}
}
src/main/java/io/better/toutiao/dto/delivery/creative/AdvertisingCreativeRespDTO.java
0 → 100644
View file @
81e6486a
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
;
}
src/main/java/io/better/toutiao/dto/delivery/creative/
VideoCreativeOutDTO
.java
→
src/main/java/io/better/toutiao/dto/delivery/creative/
ImageInfo
.java
View file @
81e6486a
...
@@ -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
src/main/java/io/better/toutiao/dto/delivery/creative/
ImageCreativeOutDTO
.java
→
src/main/java/io/better/toutiao/dto/delivery/creative/
MaterialInfo
.java
View file @
81e6486a
...
@@ -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
;
}
}
src/main/java/io/better/toutiao/dto/delivery/creative/TitleInfo.java
0 → 100644
View file @
81e6486a
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment