作者 tangxvhui

新增接口。

... ... @@ -9,7 +9,7 @@ type DividendController struct {
BaseController
}
//DividendStatistics
// DividendStatistics
func (this *DividendController) DividendStatistics() {
var msg *protocol.ResponseMessage
defer func() {
... ... @@ -31,7 +31,29 @@ func (this *DividendController) DividendStatistics() {
msg = protocol.NewReturnResponse(dividend.Statistics(header, request))
}
//DividendOrders 分红订单
// DividendStatisticsV2 分红统计
func (this *DividendController) DividendStatisticsV2() {
var msg *protocol.ResponseMessage
defer func() {
this.Resp(msg)
}()
var request *protocol.DividendStatisticsRequest
if err := this.JsonUnmarshal(&request); err != nil {
msg = protocol.BadRequestParam(1)
return
}
if b, m := this.Valid(request); !b {
msg = m
return
}
header := this.GetRequestHeader(this.Ctx)
if request.PartnerId == 0 {
request.PartnerId = header.UserId
}
msg = protocol.NewReturnResponse(dividend.StatisticsV2(header, request))
}
// DividendOrders 分红订单
func (this *DividendController) DividendOrders() {
var msg *protocol.ResponseMessage
defer func() {
... ...
... ... @@ -47,7 +47,7 @@ func InitV2() {
nsV2.Router("/auth/login", &controllers.AuthController{}, "Post:LoginV2")
nsV2.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfoV2")
nsV2.Router("/company/partners", &controllers.CompanyController{}, "post:PartnersV2")
nsV2.Router("/dividend/statistics", &controllers.DividendController{}, "Post:DividendStatisticsV2")
nsV2.Router("/order/statistics", &controllers.OrderController{}, "Post:StatisticsV2")
beego.AddNamespace(nsV2)
}
... ...