diff --git a/internal/biz/do/rds_mq.go b/internal/biz/do/rds_mq.go index 6efb705..6daf51e 100644 --- a/internal/biz/do/rds_mq.go +++ b/internal/biz/do/rds_mq.go @@ -2,6 +2,7 @@ package do type WechatQuery struct { ProductNo string `json:"product_no"` + BatchNo string `json:"batch_no"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` OrderNo string `json:"order_no"` @@ -9,6 +10,7 @@ type WechatQuery struct { type RdsWechatQuery struct { ProductNo string `json:"product_no"` + BatchNo string `json:"batch_no"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` GoNum int `json:"go_num"` // 并发数 diff --git a/internal/data/repoimpl/order.go b/internal/data/repoimpl/order.go index ea74f08..ff2badd 100644 --- a/internal/data/repoimpl/order.go +++ b/internal/data/repoimpl/order.go @@ -38,6 +38,9 @@ func (p *OrderRepoImpl) FinSucByStockIdInBatches(ctx context.Context, req *do.We if req.ProductNo != "" { tx = tx.Where("product_no = ?", req.ProductNo) } + if req.BatchNo != "" { + tx = tx.Where("batch_no = ?", req.BatchNo) + } if req.StartTime != "" { tx = tx.Where("receive_success_time > ?", req.StartTime) }