作者 yangfu

分红管理列表

... ... @@ -2,8 +2,8 @@ package query
type ListDividendOrdersQuery struct {
// 合伙人类别
PartnerName string `json:"partnerName"`
OrderNumber string `json:"orderNumber"`
PartnerId string `json:"partnerId"`
SearchText string `json:"searchText"`
PageSize int `json:"pageSize"`
PageNumber int `json:"pageNumber"`
}
... ...
... ... @@ -164,8 +164,8 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
}
}()
if count, orders, err = OrderDao.GetDividendOrders(map[string]interface{}{
"orderCode": listOrderPaymentQuery.OrderNumber,
"partnerName": listOrderPaymentQuery.PartnerName,
"orderCode": listOrderPaymentQuery.SearchText,
"partnerId": listOrderPaymentQuery.PartnerId,
"orderType": 1,
"offset": (listOrderPaymentQuery.PageNumber - 1) * listOrderPaymentQuery.PageSize,
"limit": listOrderPaymentQuery.PageSize,
... ...
... ... @@ -57,8 +57,8 @@ func (dao *OrderDao) GetDividendOrders(options map[string]interface{}) (count in
if v, ok := options["orderType"]; ok {
q.Where(`"order".order_type=?`, v)
}
if v, ok := options["partnerName"]; ok && len(v.(string)) > 0 {
q.Where(`partner_info.partner_name like ?`, "%"+v.(string)+"%")
if v, ok := options["partnerId"]; ok && len(v.(string)) > 0 {
q.Where(`"order".partner_id =?`, v)
}
if v, ok := options["offset"]; ok {
q.Offset(v.(int))
... ...