正在显示
5 个修改的文件
包含
8 行增加
和
3 行删除
@@ -87,6 +87,7 @@ func DividendOrders(header *protocol.RequestHeader, request *protocol.DividendOr | @@ -87,6 +87,7 @@ func DividendOrders(header *protocol.RequestHeader, request *protocol.DividendOr | ||
87 | rsp = &protocol.DividendOrdersResponse{List: make([]*protocol.DividendOrderListItem, 0)} | 87 | rsp = &protocol.DividendOrdersResponse{List: make([]*protocol.DividendOrderListItem, 0)} |
88 | 88 | ||
89 | count, orders, err = OrderDao.DividendOrders(&domain.DividendOrdersQueryOption{ | 89 | count, orders, err = OrderDao.DividendOrders(&domain.DividendOrdersQueryOption{ |
90 | + OrderType: domain.OrderReal, | ||
90 | PartnerId: header.UserId, | 91 | PartnerId: header.UserId, |
91 | DetailAction: request.DetailAction, | 92 | DetailAction: request.DetailAction, |
92 | DividendAction: request.DividendAction, | 93 | DividendAction: request.DividendAction, |
@@ -127,7 +127,7 @@ func (m *Order) OrderAmountCancel() float64 { | @@ -127,7 +127,7 @@ func (m *Order) OrderAmountCancel() float64 { | ||
127 | if m.OrderAmount <= m.OrderActualAmount { | 127 | if m.OrderAmount <= m.OrderActualAmount { |
128 | return 0 | 128 | return 0 |
129 | } | 129 | } |
130 | - return utils.Decimal((m.OrderAmount - m.OrderActualAmount)) | 130 | + return utils.Decimal(m.OrderAmount - m.OrderActualAmount) |
131 | } | 131 | } |
132 | 132 | ||
133 | //订单是否已读 | 133 | //订单是否已读 |
@@ -152,6 +152,7 @@ type OrderQueryOption struct { | @@ -152,6 +152,7 @@ type OrderQueryOption struct { | ||
152 | 152 | ||
153 | type DividendOrdersQueryOption struct { | 153 | type DividendOrdersQueryOption struct { |
154 | PartnerId int64 `json:"partnerId"` | 154 | PartnerId int64 `json:"partnerId"` |
155 | + OrderType int `json:"orderType"` //订单类型 | ||
155 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) | 156 | DetailAction int `json:"detailAction"` //明细类型(0已收明细、1未收明细) |
156 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) | 157 | DividendAction int `json:"dividendAction"` //分红类型(0累计分红、1分红支出) |
157 | StartTime int64 `json:"startTime" ` | 158 | StartTime int64 `json:"startTime" ` |
@@ -49,6 +49,9 @@ func (dao *OrderDao) DividendOrders(option *domain.DividendOrdersQueryOption) (c | @@ -49,6 +49,9 @@ func (dao *OrderDao) DividendOrders(option *domain.DividendOrdersQueryOption) (c | ||
49 | q := tx.Model(&orders) | 49 | q := tx.Model(&orders) |
50 | q.Column(`order.id`, `order.order_code`, `order.order_actual_amount`, `order.partner_bonus_percent`) | 50 | q.Column(`order.id`, `order.order_code`, `order.order_actual_amount`, `order.partner_bonus_percent`) |
51 | //q.Where(`"order".order_status >=?`, domain.OrderStatusDeliverSome) //已经发货 | 51 | //q.Where(`"order".order_status >=?`, domain.OrderStatusDeliverSome) //已经发货 |
52 | + if option.OrderType > 0 { | ||
53 | + q.Where(`"order".order_type=?`, option.OrderType) | ||
54 | + } | ||
52 | if option.PartnerId > 0 { | 55 | if option.PartnerId > 0 { |
53 | q.Where(`"order".partner_id=?`, option.PartnerId) | 56 | q.Where(`"order".partner_id=?`, option.PartnerId) |
54 | } | 57 | } |
@@ -26,7 +26,7 @@ type Order struct { | @@ -26,7 +26,7 @@ type Order struct { | ||
26 | //订单实际金额 | 26 | //订单实际金额 |
27 | OrderActualAmount float64 | 27 | OrderActualAmount float64 |
28 | //订单已支付金额(货款) | 28 | //订单已支付金额(货款) |
29 | - OrderPaymentAmount float64 | 29 | + OrderPaymentAmount float64 `pg:",notnull,default:0"` |
30 | //订单区域信息 | 30 | //订单区域信息 |
31 | OrderRegionInfo *domain.RegionInfo | 31 | OrderRegionInfo *domain.RegionInfo |
32 | 32 |
@@ -13,7 +13,7 @@ var errmessge ErrorMap = map[int]string{ | @@ -13,7 +13,7 @@ var errmessge ErrorMap = map[int]string{ | ||
13 | 1012: "请输入正确的验证码", | 13 | 1012: "请输入正确的验证码", |
14 | 1013: "凭证已失效,请重新操作", | 14 | 1013: "凭证已失效,请重新操作", |
15 | 15 | ||
16 | - 2002: "您还不是正式用户,请联系管理员", | 16 | + 2002: "当前账号已被禁用", |
17 | 2021: "登录失败,手机号或密码错误", | 17 | 2021: "登录失败,手机号或密码错误", |
18 | 2025: "短信验证码验证失败", | 18 | 2025: "短信验证码验证失败", |
19 | 2026: "新密码与确认密码不一致", | 19 | 2026: "新密码与确认密码不一致", |
-
请 注册 或 登录 后发表评论