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
9c09ad30
Commit
9c09ad30
authored
May 07, 2019
by
chenmingyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify account service dto name and api config
parent
9ea91eeb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
52 additions
and
52 deletions
+52
-52
AccountApi.java
src/main/java/io/better/toutiao/api/account/AccountApi.java
+1
-1
AdvertiserApi.java
...ain/java/io/better/toutiao/api/account/AdvertiserApi.java
+10
-10
AgentApi.java
src/main/java/io/better/toutiao/api/account/AgentApi.java
+13
-13
FundFlowApi.java
src/main/java/io/better/toutiao/api/account/FundFlowApi.java
+19
-19
AccountBalanceRespDTO.java
.../io/better/toutiao/dto/account/AccountBalanceRespDTO.java
+1
-1
AccountDayFundFlowRespDTO.java
...better/toutiao/dto/account/AccountDayFundFlowRespDTO.java
+1
-1
AccountFundFlowDetailRespDTO.java
...ter/toutiao/dto/account/AccountFundFlowDetailRespDTO.java
+1
-1
AdvertiserInfoReqRespDTO.java
.../better/toutiao/dto/account/AdvertiserInfoReqRespDTO.java
+1
-1
AdvertiserQualificationReqRespDTO.java
...outiao/dto/account/AdvertiserQualificationReqRespDTO.java
+1
-1
AdvertiserRespDTO.java
...java/io/better/toutiao/dto/account/AdvertiserRespDTO.java
+1
-1
FundFlowRespDTO.java
...n/java/io/better/toutiao/dto/account/FundFlowRespDTO.java
+2
-2
application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/io/better/toutiao/api/account/AccountApi.java
View file @
9c09ad30
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
*
*
* @author better create in 2019-05-07 15:15
* @author better create in 2019-05-07 15:15
*/
*/
@FeignClient
(
value
=
"
https://ad.toutiao.com/open_api/2
"
,
url
=
"/majordomo"
)
@FeignClient
(
value
=
"
${toutiao.api.advertiser-url}
"
,
url
=
"/majordomo"
)
public
interface
AccountApi
{
public
interface
AccountApi
{
/**
/**
...
...
src/main/java/io/better/toutiao/api/account/AdvertiserApi.java
View file @
9c09ad30
package
io
.
better
.
toutiao
.
api
.
account
;
package
io
.
better
.
toutiao
.
api
.
account
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.account.AdvertiserInfoDTO
;
import
io.better.toutiao.dto.account.AdvertiserInfo
ReqResp
DTO
;
import
io.better.toutiao.dto.account.AdvertiserQualificationDTO
;
import
io.better.toutiao.dto.account.AdvertiserQualification
ReqResp
DTO
;
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.*
;
...
@@ -23,9 +23,9 @@ public interface AdvertiserApi {
...
@@ -23,9 +23,9 @@ public interface AdvertiserApi {
* @return the advertiser info
* @return the advertiser info
*/
*/
@GetMapping
(
value
=
"/info"
)
@GetMapping
(
value
=
"/info"
)
TouTiaoRespDTO
<
AdvertiserInfoDTO
>
getAdvertiserInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertiserInfo
ReqResp
DTO
>
getAdvertiserInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_ids"
)
Long
[]
advertiserIds
,
@RequestParam
(
"advertiser_ids"
)
Long
[]
advertiserIds
,
@RequestParam
(
"fields"
)
String
[]
fields
@RequestParam
(
"fields"
)
String
[]
fields
);
);
/**
/**
...
@@ -36,8 +36,8 @@ public interface AdvertiserApi {
...
@@ -36,8 +36,8 @@ public interface AdvertiserApi {
* @return advertiser qualification
* @return advertiser qualification
*/
*/
@GetMapping
(
value
=
"/qualification/get/"
)
@GetMapping
(
value
=
"/qualification/get/"
)
TouTiaoRespDTO
<
AdvertiserQualificationDTO
>
getAdvertiserQualification
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertiserQualification
ReqResp
DTO
>
getAdvertiserQualification
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_id"
)
Integer
advertiserId
@RequestParam
(
"advertiser_id"
)
Integer
advertiserId
);
);
...
@@ -50,7 +50,7 @@ public interface AdvertiserApi {
...
@@ -50,7 +50,7 @@ public interface AdvertiserApi {
*/
*/
@PostMapping
(
value
=
"qualification/submit/"
)
@PostMapping
(
value
=
"qualification/submit/"
)
TouTiaoRespDTO
<?>
submitAdvertiserQualification
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<?>
submitAdvertiserQualification
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
AdvertiserQualificationDTO
advertiserQualification
@RequestBody
AdvertiserQualification
ReqResp
DTO
advertiserQualification
);
);
...
@@ -62,8 +62,8 @@ public interface AdvertiserApi {
...
@@ -62,8 +62,8 @@ public interface AdvertiserApi {
* @return the advertiser public info
* @return the advertiser public info
*/
*/
@GetMapping
(
value
=
"/public_info"
)
@GetMapping
(
value
=
"/public_info"
)
TouTiaoRespDTO
<
AdvertiserInfoDTO
>
getAdvertiserPublicInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertiserInfo
ReqResp
DTO
>
getAdvertiserPublicInfo
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_ids"
)
Long
[]
advertiserIds
@RequestParam
(
"advertiser_ids"
)
Long
[]
advertiserIds
);
);
}
}
src/main/java/io/better/toutiao/api/account/AgentApi.java
View file @
9c09ad30
package
io
.
better
.
toutiao
.
api
.
account
;
package
io
.
better
.
toutiao
.
api
.
account
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.account.AdvertiserInfoDTO
;
import
io.better.toutiao.dto.account.AdvertiserInfo
ReqResp
DTO
;
import
io.better.toutiao.dto.account.AdvertiserDTO
;
import
io.better.toutiao.dto.account.Advertiser
Resp
DTO
;
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.*
;
...
@@ -24,10 +24,10 @@ public interface AgentApi {
...
@@ -24,10 +24,10 @@ public interface AgentApi {
* @return advertiser by agent id
* @return advertiser by agent id
*/
*/
@GetMapping
(
value
=
"/advertiser/select"
)
@GetMapping
(
value
=
"/advertiser/select"
)
TouTiaoRespDTO
<
AdvertiserDTO
>
getAdvertiserByAgentId
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
Advertiser
Resp
DTO
>
getAdvertiserByAgentId
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
,
required
=
false
)
String
page
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
,
required
=
false
)
String
page
,
@RequestParam
(
value
=
"page_size"
,
defaultValue
=
"100"
,
required
=
false
)
String
pageSize
);
@RequestParam
(
value
=
"page_size"
,
defaultValue
=
"100"
,
required
=
false
)
String
pageSize
);
/**
/**
* 账号服务-代理商账号-创建广告主信息
* 账号服务-代理商账号-创建广告主信息
...
@@ -37,8 +37,8 @@ public interface AgentApi {
...
@@ -37,8 +37,8 @@ public interface AgentApi {
* @return the list
* @return the list
*/
*/
@PostMapping
(
value
=
"/advertiser/create"
)
@PostMapping
(
value
=
"/advertiser/create"
)
TouTiaoRespDTO
<
AdvertiserInfoDTO
>
createAdvertiserByAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertiserInfo
ReqResp
DTO
>
createAdvertiserByAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
AdvertiserInfo
DTO
advertiserInfo
);
@RequestBody
AdvertiserInfoReqResp
DTO
advertiserInfo
);
/**
/**
* 账号服务-代理商账号-更新广告主信息
* 账号服务-代理商账号-更新广告主信息
...
@@ -48,8 +48,8 @@ public interface AgentApi {
...
@@ -48,8 +48,8 @@ public interface AgentApi {
* @return the list
* @return the list
*/
*/
@PostMapping
(
value
=
"/advertiser/update"
)
@PostMapping
(
value
=
"/advertiser/update"
)
TouTiaoRespDTO
<
AdvertiserInfoDTO
>
updateAdvertiserByAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AdvertiserInfo
ReqResp
DTO
>
updateAdvertiserByAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestBody
AdvertiserInfo
DTO
advertiserInfo
);
@RequestBody
AdvertiserInfoReqResp
DTO
advertiserInfo
);
/**
/**
...
@@ -61,7 +61,7 @@ public interface AgentApi {
...
@@ -61,7 +61,7 @@ public interface AgentApi {
* @return the second agent
* @return the second agent
*/
*/
@GetMapping
(
value
=
"/child_agent/select/"
)
@GetMapping
(
value
=
"/child_agent/select/"
)
TouTiaoRespDTO
<
AdvertiserDTO
>
getSecondAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
Advertiser
Resp
DTO
>
getSecondAgent
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
,
required
=
false
)
String
page
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
,
required
=
false
)
String
page
,
@RequestParam
(
value
=
"page_size"
,
defaultValue
=
"100"
,
required
=
false
)
String
pageSize
);
@RequestParam
(
value
=
"page_size"
,
defaultValue
=
"100"
,
required
=
false
)
String
pageSize
);
}
}
src/main/java/io/better/toutiao/api/account/FundFlowApi.java
View file @
9c09ad30
package
io
.
better
.
toutiao
.
api
.
account
;
package
io
.
better
.
toutiao
.
api
.
account
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.TouTiaoRespDTO
;
import
io.better.toutiao.dto.account.AccountBalanceDTO
;
import
io.better.toutiao.dto.account.AccountBalance
Resp
DTO
;
import
io.better.toutiao.dto.account.AccountDayFundFlowDTO
;
import
io.better.toutiao.dto.account.AccountDayFundFlow
Resp
DTO
;
import
io.better.toutiao.dto.account.FundFlow
CallBack
DTO
;
import
io.better.toutiao.dto.account.FundFlow
Resp
DTO
;
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
;
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
*
*
* @author better create in 2019-05-07 16:45
* @author better create in 2019-05-07 16:45
*/
*/
@FeignClient
(
value
=
"
https://ad.toutiao.com/open_api/2
"
,
url
=
"/advertiser/fund"
)
@FeignClient
(
value
=
"
${toutiao.api.advertiser-url}
"
,
url
=
"/advertiser/fund"
)
public
interface
FundFlowApi
{
public
interface
FundFlowApi
{
/**
/**
...
@@ -25,8 +25,8 @@ public interface FundFlowApi {
...
@@ -25,8 +25,8 @@ public interface FundFlowApi {
* @return the account balance
* @return the account balance
*/
*/
@GetMapping
(
value
=
"/get"
)
@GetMapping
(
value
=
"/get"
)
TouTiaoRespDTO
<
AccountBalanceDTO
>
getAccountBalance
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AccountBalance
Resp
DTO
>
getAccountBalance
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
);
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
);
/**
/**
...
@@ -41,12 +41,12 @@ public interface FundFlowApi {
...
@@ -41,12 +41,12 @@ public interface FundFlowApi {
* @return the account balance
* @return the account balance
*/
*/
@GetMapping
(
value
=
"/daily_stat"
)
@GetMapping
(
value
=
"/daily_stat"
)
TouTiaoRespDTO
<
AccountDayFundFlowDTO
>
getAccountDayFundFlow
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
AccountDayFundFlow
Resp
DTO
>
getAccountDayFundFlow
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
value
=
"start_date"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"start_date"
,
required
=
false
)
String
startDate
,
@RequestParam
(
value
=
"end_date"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"end_date"
,
required
=
false
)
String
endDate
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"page_size"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
pageSize
@RequestParam
(
value
=
"page_size"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
pageSize
);
);
/**
/**
...
@@ -63,12 +63,12 @@ public interface FundFlowApi {
...
@@ -63,12 +63,12 @@ public interface FundFlowApi {
* @see io.better.toutiao.enums.FlowType 查看流水类型取值
* @see io.better.toutiao.enums.FlowType 查看流水类型取值
*/
*/
@GetMapping
(
value
=
"/transaction/get"
)
@GetMapping
(
value
=
"/transaction/get"
)
TouTiaoRespDTO
<
FundFlow
CallBack
DTO
>
getAccountFundFlowDetail
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
TouTiaoRespDTO
<
FundFlow
Resp
DTO
>
getAccountFundFlowDetail
(
@RequestHeader
(
"Access-Token"
)
String
accessToken
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
"advertiser_id"
)
Long
advertiserId
,
@RequestParam
(
value
=
"start_date"
)
String
startDate
,
@RequestParam
(
value
=
"start_date"
)
String
startDate
,
@RequestParam
(
value
=
"end_date"
)
String
endDate
,
@RequestParam
(
value
=
"end_date"
)
String
endDate
,
@RequestParam
(
value
=
"transaction_type"
)
String
transactionType
,
@RequestParam
(
value
=
"transaction_type"
)
String
transactionType
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"page"
,
required
=
false
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"page_size"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
pageSize
@RequestParam
(
value
=
"page_size"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
pageSize
);
);
}
}
src/main/java/io/better/toutiao/dto/account/AccountBalanceDTO.java
→
src/main/java/io/better/toutiao/dto/account/AccountBalance
Resp
DTO.java
View file @
9c09ad30
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AccountBalanceDTO
extends
BaseDTO
{
public
class
AccountBalance
Resp
DTO
extends
BaseDTO
{
/**
/**
* 账户名
* 账户名
...
...
src/main/java/io/better/toutiao/dto/account/AccountDayFundFlowDTO.java
→
src/main/java/io/better/toutiao/dto/account/AccountDayFundFlow
Resp
DTO.java
View file @
9c09ad30
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AccountDayFundFlowDTO
extends
BaseDTO
{
public
class
AccountDayFundFlow
Resp
DTO
extends
BaseDTO
{
/**
/**
* 日期
* 日期
...
...
src/main/java/io/better/toutiao/dto/account/AccountFundFlowDetailDTO.java
→
src/main/java/io/better/toutiao/dto/account/AccountFundFlowDetail
Resp
DTO.java
View file @
9c09ad30
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
...
@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AccountFundFlowDetailDTO
extends
BaseDTO
{
public
class
AccountFundFlowDetail
Resp
DTO
extends
BaseDTO
{
/**
/**
* 流水类型
* 流水类型
...
...
src/main/java/io/better/toutiao/dto/account/AdvertiserInfoDTO.java
→
src/main/java/io/better/toutiao/dto/account/AdvertiserInfo
ReqResp
DTO.java
View file @
9c09ad30
...
@@ -8,7 +8,7 @@ import lombok.Data;
...
@@ -8,7 +8,7 @@ import lombok.Data;
* @author better create in 2019-05-07 15:17
* @author better create in 2019-05-07 15:17
*/
*/
@Data
@Data
public
class
AdvertiserInfoDTO
{
public
class
AdvertiserInfo
ReqResp
DTO
{
/**
/**
* 账户ID
* 账户ID
...
...
src/main/java/io/better/toutiao/dto/account/AdvertiserQualificationDTO.java
→
src/main/java/io/better/toutiao/dto/account/AdvertiserQualification
ReqResp
DTO.java
View file @
9c09ad30
...
@@ -13,7 +13,7 @@ import java.util.List;
...
@@ -13,7 +13,7 @@ import java.util.List;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AdvertiserQualificationDTO
extends
BaseDTO
{
public
class
AdvertiserQualification
ReqResp
DTO
extends
BaseDTO
{
/**
/**
* 状态
* 状态
...
...
src/main/java/io/better/toutiao/dto/account/AdvertiserDTO.java
→
src/main/java/io/better/toutiao/dto/account/Advertiser
Resp
DTO.java
View file @
9c09ad30
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
AdvertiserDTO
extends
BaseDTO
{
public
class
Advertiser
Resp
DTO
extends
BaseDTO
{
/**
/**
* 广告主ID列表
* 广告主ID列表
...
...
src/main/java/io/better/toutiao/dto/account/FundFlow
CallBack
DTO.java
→
src/main/java/io/better/toutiao/dto/account/FundFlow
Resp
DTO.java
View file @
9c09ad30
...
@@ -10,10 +10,10 @@ import java.util.List;
...
@@ -10,10 +10,10 @@ import java.util.List;
* @author better create in 2019-05-07 17:21
* @author better create in 2019-05-07 17:21
*/
*/
@Data
@Data
public
class
FundFlow
CallBack
DTO
{
public
class
FundFlow
Resp
DTO
{
/**
/**
* 账号资金流水明细信息集合
* 账号资金流水明细信息集合
*/
*/
private
List
<
AccountFundFlowDetailDTO
>
list
;
private
List
<
AccountFundFlowDetail
Resp
DTO
>
list
;
}
}
src/main/resources/application.yml
View file @
9c09ad30
toutiao
:
toutiao
:
api
:
api
:
advertiser-url
:
ad.toutiao.com/open_api/2
advertiser-url
:
https://
ad.toutiao.com/open_api/2
oauth-url
:
ad.toutiao.com/open_api/2
oauth-url
:
ad.toutiao.com/open_api/2
server
:
server
:
...
...
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