作者 tangxvhui

新增接口。

@@ -9,7 +9,7 @@ type DividendController struct { @@ -9,7 +9,7 @@ type DividendController struct {
9 BaseController 9 BaseController
10 } 10 }
11 11
12 -//DividendStatistics 12 +// DividendStatistics
13 func (this *DividendController) DividendStatistics() { 13 func (this *DividendController) DividendStatistics() {
14 var msg *protocol.ResponseMessage 14 var msg *protocol.ResponseMessage
15 defer func() { 15 defer func() {
@@ -31,7 +31,29 @@ func (this *DividendController) DividendStatistics() { @@ -31,7 +31,29 @@ func (this *DividendController) DividendStatistics() {
31 msg = protocol.NewReturnResponse(dividend.Statistics(header, request)) 31 msg = protocol.NewReturnResponse(dividend.Statistics(header, request))
32 } 32 }
33 33
34 -//DividendOrders 分红订单 34 +// DividendStatisticsV2 分红统计
  35 +func (this *DividendController) DividendStatisticsV2() {
  36 + var msg *protocol.ResponseMessage
  37 + defer func() {
  38 + this.Resp(msg)
  39 + }()
  40 + var request *protocol.DividendStatisticsRequest
  41 + if err := this.JsonUnmarshal(&request); err != nil {
  42 + msg = protocol.BadRequestParam(1)
  43 + return
  44 + }
  45 + if b, m := this.Valid(request); !b {
  46 + msg = m
  47 + return
  48 + }
  49 + header := this.GetRequestHeader(this.Ctx)
  50 + if request.PartnerId == 0 {
  51 + request.PartnerId = header.UserId
  52 + }
  53 + msg = protocol.NewReturnResponse(dividend.StatisticsV2(header, request))
  54 +}
  55 +
  56 +// DividendOrders 分红订单
35 func (this *DividendController) DividendOrders() { 57 func (this *DividendController) DividendOrders() {
36 var msg *protocol.ResponseMessage 58 var msg *protocol.ResponseMessage
37 defer func() { 59 defer func() {
@@ -47,7 +47,7 @@ func InitV2() { @@ -47,7 +47,7 @@ func InitV2() {
47 nsV2.Router("/auth/login", &controllers.AuthController{}, "Post:LoginV2") 47 nsV2.Router("/auth/login", &controllers.AuthController{}, "Post:LoginV2")
48 nsV2.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfoV2") 48 nsV2.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfoV2")
49 nsV2.Router("/company/partners", &controllers.CompanyController{}, "post:PartnersV2") 49 nsV2.Router("/company/partners", &controllers.CompanyController{}, "post:PartnersV2")
50 - 50 + nsV2.Router("/dividend/statistics", &controllers.DividendController{}, "Post:DividendStatisticsV2")
51 nsV2.Router("/order/statistics", &controllers.OrderController{}, "Post:StatisticsV2") 51 nsV2.Router("/order/statistics", &controllers.OrderController{}, "Post:StatisticsV2")
52 beego.AddNamespace(nsV2) 52 beego.AddNamespace(nsV2)
53 } 53 }