作者 tangxvhui

调整订单统计

... ... @@ -229,5 +229,5 @@ func StatisticsV2(header *protocol.RequestHeader, request *protocol.DividendStat
}
rsp.Timestamp = time.Now().Unix() * 1000
return
return rsp, nil
}
... ...
... ... @@ -62,5 +62,11 @@ func StatisticsV2(header *protocol.RequestHeader, request *protocol.OrderStatist
)
err = transactionContext.CommitTransaction()
// 合并全部的
rsp.All.CumulativeMoney = rsp.Career.CumulativeMoney + rsp.Business.CumulativeMoney + rsp.Develop.CumulativeMoney + rsp.App.CumulativeMoney
rsp.All.CumulativeQuantity = rsp.Career.CumulativeQuantity + rsp.Business.CumulativeQuantity + rsp.Develop.CumulativeQuantity + rsp.App.CumulativeQuantity
rsp.All.Percent = 100
rsp.All.TodayRealMoney = rsp.Career.TodayRealMoney + rsp.Business.TodayRealMoney + rsp.Develop.TodayRealMoney + rsp.App.TodayRealMoney
rsp.All.TodayRealQuantity = rsp.Career.TodayRealQuantity + rsp.Business.TodayRealQuantity + rsp.Develop.TodayRealQuantity + rsp.App.TodayRealQuantity
return
}
... ...
... ... @@ -31,11 +31,11 @@ type LoginResponse struct {
type LoginRequestV2 struct {
Cid int `json:"cid"`
IdType int `json:"idType"` // 用户类型 1:合伙人 2:高管
Credentials string `json:"credentials"` // 登录类型 1:密码 2:验证码
Credentials string `json:"credentials"` // 凭证
ClientId string `json:"clientId"`
}
//JWT用户信息
// JWT用户信息
type JWTUserInfo struct {
UserId string `json:"id"` //用户id
PassWord string `json:"passWord"` //密码
... ...
... ... @@ -50,6 +50,7 @@ type OrderStatisticsRequest struct {
}
type OrderStatisticsResponse struct {
Statistics *OrderStatics `json:"statistics,omitempty"`
All OrderStatic `json:"all"` //全部
Career OrderStatic `json:"career,omitempty"` //事业
Business OrderStatic `json:"business,omitempty"` //业务
Develop OrderStatic `json:"develop,omitempty"` //开发
... ... @@ -72,7 +73,7 @@ type OrderStatics struct {
}
type OrderStatic struct {
Percent float64 `json:"percent"` // 事业占比
Percent float64 `json:"percent"` //事业占比
TodayRealQuantity int `json:"todayRealQuantity"` //今日新增实发订单
TodayRealMoney float64 `json:"todayRealMoney"` //今日新增实发订单金额
CumulativeQuantity int `json:"cumulativeQuantity"` //累计实发订单
... ...