修改
This commit is contained in:
parent
6d6bee6c03
commit
e2ed03be90
@ -72,7 +72,7 @@ func OrderRecordsList(req *bundle.OrderRecordsRequest) (res *bundle.OrderRecords
|
|||||||
|
|
||||||
query := app.ModuleClients.BundleDB.Model(&model.BundleOrderRecords{})
|
query := app.ModuleClients.BundleDB.Model(&model.BundleOrderRecords{})
|
||||||
|
|
||||||
query.Joins("left join micro-account.user on micro-account.user.id = bundle_order_records.customer_id")
|
query.Joins("left join ``micro-account``.``user`` on ``micro-account``.``user``.id = ``bundle_order_records``.customer_id")
|
||||||
|
|
||||||
if req.CustomerID != "" {
|
if req.CustomerID != "" {
|
||||||
query = query.Where("customer_id = ?", req.CustomerID)
|
query = query.Where("customer_id = ?", req.CustomerID)
|
||||||
@ -129,7 +129,7 @@ func OrderRecordsList(req *bundle.OrderRecordsRequest) (res *bundle.OrderRecords
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.TelNum != "" {
|
if req.TelNum != "" {
|
||||||
query = query.Where("micro-account.user.tel_num like ?", "%"+req.TelNum+"%")
|
query = query.Where("``micro-account``.``user``.``tel_num`` like ?", "%"+req.TelNum+"%")
|
||||||
}
|
}
|
||||||
|
|
||||||
count := *query
|
count := *query
|
||||||
|
Loading…
Reference in New Issue
Block a user