diff --git a/internal/dao/orderRecordsDao.go b/internal/dao/orderRecordsDao.go index 871636c..f64e506 100644 --- a/internal/dao/orderRecordsDao.go +++ b/internal/dao/orderRecordsDao.go @@ -55,6 +55,10 @@ func OrderRecordsList(req *bundle.OrderRecordsRequest) (res *bundle.OrderRecords query := app.ModuleClients.BundleDB.Model(&model.BundleOrderRecords{}) + if req.CustomerID != "" { + query = query.Where("customer_id = ?", req.CustomerID) + } + if req.CustomerNum != "" { query = query.Where("customer_num like ?", "%"+req.CustomerNum+"%") }