正在显示
3 个修改的文件
包含
11 行增加
和
11 行删除
@@ -2,10 +2,10 @@ package query | @@ -2,10 +2,10 @@ package query | ||
2 | 2 | ||
3 | type ListDividendOrdersQuery struct { | 3 | type ListDividendOrdersQuery struct { |
4 | // 合伙人类别 | 4 | // 合伙人类别 |
5 | - PartnerName string `json:"partnerName"` | ||
6 | - OrderNumber string `json:"orderNumber"` | ||
7 | - PageSize int `json:"pageSize"` | ||
8 | - PageNumber int `json:"pageNumber"` | 5 | + PartnerId string `json:"partnerId"` |
6 | + SearchText string `json:"searchText"` | ||
7 | + PageSize int `json:"pageSize"` | ||
8 | + PageNumber int `json:"pageNumber"` | ||
9 | } | 9 | } |
10 | 10 | ||
11 | func (q *ListDividendOrdersQuery) ValidateQuery() error { | 11 | func (q *ListDividendOrdersQuery) ValidateQuery() error { |
@@ -164,11 +164,11 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym | @@ -164,11 +164,11 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym | ||
164 | } | 164 | } |
165 | }() | 165 | }() |
166 | if count, orders, err = OrderDao.GetDividendOrders(map[string]interface{}{ | 166 | if count, orders, err = OrderDao.GetDividendOrders(map[string]interface{}{ |
167 | - "orderCode": listOrderPaymentQuery.OrderNumber, | ||
168 | - "partnerName": listOrderPaymentQuery.PartnerName, | ||
169 | - "orderType": 1, | ||
170 | - "offset": (listOrderPaymentQuery.PageNumber - 1) * listOrderPaymentQuery.PageSize, | ||
171 | - "limit": listOrderPaymentQuery.PageSize, | 167 | + "orderCode": listOrderPaymentQuery.SearchText, |
168 | + "partnerId": listOrderPaymentQuery.PartnerId, | ||
169 | + "orderType": 1, | ||
170 | + "offset": (listOrderPaymentQuery.PageNumber - 1) * listOrderPaymentQuery.PageSize, | ||
171 | + "limit": listOrderPaymentQuery.PageSize, | ||
172 | }); err != nil { | 172 | }); err != nil { |
173 | return 0, nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) | 173 | return 0, nil, lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) |
174 | } | 174 | } |
@@ -57,8 +57,8 @@ func (dao *OrderDao) GetDividendOrders(options map[string]interface{}) (count in | @@ -57,8 +57,8 @@ func (dao *OrderDao) GetDividendOrders(options map[string]interface{}) (count in | ||
57 | if v, ok := options["orderType"]; ok { | 57 | if v, ok := options["orderType"]; ok { |
58 | q.Where(`"order".order_type=?`, v) | 58 | q.Where(`"order".order_type=?`, v) |
59 | } | 59 | } |
60 | - if v, ok := options["partnerName"]; ok && len(v.(string)) > 0 { | ||
61 | - q.Where(`partner_info.partner_name like ?`, "%"+v.(string)+"%") | 60 | + if v, ok := options["partnerId"]; ok && len(v.(string)) > 0 { |
61 | + q.Where(`"order".partner_id =?`, v) | ||
62 | } | 62 | } |
63 | if v, ok := options["offset"]; ok { | 63 | if v, ok := options["offset"]; ok { |
64 | q.Offset(v.(int)) | 64 | q.Offset(v.(int)) |
-
请 注册 或 登录 后发表评论