正在显示
5 个修改的文件
包含
10 行增加
和
3 行删除
@@ -87,6 +87,7 @@ func SmsCode(request *protocol.SmsCodeRequest) (rsp *protocol.SmsCodeResponse, e | @@ -87,6 +87,7 @@ func SmsCode(request *protocol.SmsCodeRequest) (rsp *protocol.SmsCodeResponse, e | ||
87 | log.Error(err, data, request.Phone) | 87 | log.Error(err, data, request.Phone) |
88 | return | 88 | return |
89 | } | 89 | } |
90 | + err = protocol.NewSuccessWithMessage("发送验证码成功") | ||
90 | return | 91 | return |
91 | } | 92 | } |
92 | 93 |
@@ -75,7 +75,7 @@ func QuartersBonusStatics(orders []*domain.Order, action int) (bonus []protocol. | @@ -75,7 +75,7 @@ func QuartersBonusStatics(orders []*domain.Order, action int) (bonus []protocol. | ||
75 | bonus[quarter].Outstanding += o.OrderBonusWait() | 75 | bonus[quarter].Outstanding += o.OrderBonusWait() |
76 | } | 76 | } |
77 | if action == protocol.BonusOutstanding { | 77 | if action == protocol.BonusOutstanding { |
78 | - bonus[quarter].Outstanding += o.OrderBonusOutstanding() | 78 | + bonus[quarter].Expend += o.OrderBonusOutstanding() |
79 | } | 79 | } |
80 | } | 80 | } |
81 | return | 81 | return |
@@ -100,6 +100,7 @@ func DividendOrders(header *protocol.RequestHeader, request *protocol.DividendOr | @@ -100,6 +100,7 @@ func DividendOrders(header *protocol.RequestHeader, request *protocol.DividendOr | ||
100 | rsp = &protocol.DividendOrdersResponse{List: make([]*protocol.DividendOrderListItem, 0)} | 100 | rsp = &protocol.DividendOrdersResponse{List: make([]*protocol.DividendOrderListItem, 0)} |
101 | 101 | ||
102 | count, orders, err = OrderDao.DividendOrders(&domain.DividendOrdersQueryOption{ | 102 | count, orders, err = OrderDao.DividendOrders(&domain.DividendOrdersQueryOption{ |
103 | + PartnerId: header.UserId, | ||
103 | DetailAction: request.DetailAction, | 104 | DetailAction: request.DetailAction, |
104 | DividendAction: request.DividendAction, | 105 | DividendAction: request.DividendAction, |
105 | StartTime: request.StartTime, | 106 | StartTime: request.StartTime, |
@@ -144,6 +144,7 @@ type OrderQueryOption struct { | @@ -144,6 +144,7 @@ type OrderQueryOption struct { | ||
144 | } | 144 | } |
145 | 145 | ||
146 | type DividendOrdersQueryOption struct { | 146 | type DividendOrdersQueryOption struct { |
147 | + PartnerId int64 `json:"partnerId"` | ||
147 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) | 148 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) |
148 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) | 149 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) |
149 | StartTime int64 `json:"startTime" ` | 150 | StartTime int64 `json:"startTime" ` |
@@ -44,6 +44,9 @@ func (dao *OrderDao) DividendOrders(option *domain.DividendOrdersQueryOption) (c | @@ -44,6 +44,9 @@ func (dao *OrderDao) DividendOrders(option *domain.DividendOrdersQueryOption) (c | ||
44 | q := tx.Model(&orders) | 44 | q := tx.Model(&orders) |
45 | q.Column(`order.id`, `order.order_code`, `order.order_actual_amount`, `order.partner_bonus_percent`) | 45 | q.Column(`order.id`, `order.order_code`, `order.order_actual_amount`, `order.partner_bonus_percent`) |
46 | q.Where(`"order".order_status >=?`, domain.OrderStatusDeliverSome) //已经发货 | 46 | q.Where(`"order".order_status >=?`, domain.OrderStatusDeliverSome) //已经发货 |
47 | + if option.PartnerId > 0 { | ||
48 | + q.Where(`"order".partner_id=?`, option.PartnerId) | ||
49 | + } | ||
47 | if option.StartTime > 0 { | 50 | if option.StartTime > 0 { |
48 | q.Where(`"order".create_at >=?`, time.Unix(option.StartTime/1000, 0)) | 51 | q.Where(`"order".create_at >=?`, time.Unix(option.StartTime/1000, 0)) |
49 | } | 52 | } |
@@ -24,14 +24,15 @@ type DividendStatistics struct { | @@ -24,14 +24,15 @@ type DividendStatistics struct { | ||
24 | 24 | ||
25 | type Bonus struct { | 25 | type Bonus struct { |
26 | Received float64 `json:"received"` //已收分红 | 26 | Received float64 `json:"received"` //已收分红 |
27 | - Outstanding float64 `json:"outstanding"` //未收分红/分红支出 | 27 | + Outstanding float64 `json:"outstanding"` //未收分红 |
28 | + Expend float64 `json:"expend"` //季度分红支出 | ||
28 | } | 29 | } |
29 | 30 | ||
30 | /*DividendOrders 分红订单*/ | 31 | /*DividendOrders 分红订单*/ |
31 | type DividendOrdersRequest struct { | 32 | type DividendOrdersRequest struct { |
32 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) | 33 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) |
33 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) | 34 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) |
34 | - StartTime int64 `json:"startTime" valid:"Required"` | 35 | + StartTime int64 `json:"startTime"` |
35 | EndTime int64 `json:"endTime" valid:"Required"` | 36 | EndTime int64 `json:"endTime" valid:"Required"` |
36 | 37 | ||
37 | PageIndex int `json:"pageIndex,omitempty"` | 38 | PageIndex int `json:"pageIndex,omitempty"` |
-
请 注册 或 登录 后发表评论