脚本增加批次号查询

This commit is contained in:
ziming 2025-06-18 10:47:33 +08:00
parent 01b599cc0c
commit 8f3ca4b199
2 changed files with 5 additions and 0 deletions

View File

@ -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"` // 并发数

View File

@ -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)
}