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
31ebf22f
Commit
31ebf22f
authored
May 07, 2019
by
chenmingyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify delivery account day budget api and dto
parent
9c09ad30
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
1 deletion
+78
-1
AccountDayBudgetApi.java
...a/io/better/toutiao/api/delivery/AccountDayBudgetApi.java
+41
-0
AccountBudgetDTO.java
.../better/toutiao/dto/delivery/budget/AccountBudgetDTO.java
+18
-1
AccountBudgetRespDTO.java
...ter/toutiao/dto/delivery/budget/AccountBudgetRespDTO.java
+19
-0
No files found.
src/main/java/io/better/toutiao/api/delivery/AccountDayBudgetApi.java
0 → 100644
View file @
31ebf22f
package
io
.
better
.
toutiao
.
api
.
delivery
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.delivery.budget.AccountBudgetDTO
;
import
io.better.toutiao.dto.delivery.budget.AccountBudgetRespDTO
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
/**
* 账号日预算Api
*
* @author better create in 2019-05-07 17:42
*/
@FeignClient
(
value
=
"${toutiao.api.advertiser-url}"
,
url
=
"/advertiser/"
)
public
interface
AccountDayBudgetApi
{
/**
* 广告投放-账号日预算-获取账号日预算
*
* @param accessToken 访问凭证
* @param advertiserIds 广告主ID集合
* @return the account day budget
*/
@GetMapping
(
value
=
"/budget/get"
)
TouTiaoRespDTO
<
AccountBudgetRespDTO
>
getAccountDayBudget
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_ids"
)
Long
[]
advertiserIds
);
/**
* 广告投放-账号日预算-更新账号日预算
*
* @param accessToken 访问凭证
* @param accountBudget 预算信息
* @return the tou tiao resp dto
*/
@PostMapping
(
value
=
"/update/budget"
)
TouTiaoRespDTO
<?>
updateAccountDayBudget
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
AccountBudgetDTO
accountBudget
);
}
src/main/java/io/better/toutiao/dto/delivery/budget/AccountBudgetDTO.java
View file @
31ebf22f
package
io
.
better
.
toutiao
.
dto
.
delivery
.
budget
;
package
io
.
better
.
toutiao
.
dto
.
delivery
.
budget
;
import
io.better.toutiao.dto.BaseDTO
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
/**
* 账号预算信息
*
* @author better create in 2019-04-29 14:03
* @author better create in 2019-04-29 14:03
*/
*/
@Data
@Data
public
class
AccountBudgetDTO
{
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AccountBudgetDTO
extends
BaseDTO
{
/**
* 广告组预算
*/
private
Integer
budget
;
/**
* 广告组预算类型
*
* @see io.better.toutiao.enums.BudgetType
*/
private
String
budgetMode
;
}
}
src/main/java/io/better/toutiao/dto/delivery/budget/AccountBudgetRespDTO.java
0 → 100644
View file @
31ebf22f
package
io
.
better
.
toutiao
.
dto
.
delivery
.
budget
;
import
lombok.Data
;
import
java.util.List
;
/**
* 账号预算响应信息
*
* @author better create in 2019-05-07 17:48
*/
@Data
public
class
AccountBudgetRespDTO
{
/**
* 广告主预算数据列表
*/
private
List
<
AccountBudgetDTO
>
list
;
}
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