错误映射

This commit is contained in:
ziming 2026-03-13 16:13:09 +08:00
parent 07bacd006b
commit c6028b8c6e
1 changed files with 5 additions and 2 deletions

View File

@ -74,8 +74,11 @@ func (p *OrderRepoImpl) SpecifyFindInBatches(ctx context.Context, req *bo.FindIn
func (p *OrderRepoImpl) FinSucByStockIdInBatches(ctx context.Context, req *do.WechatQuery, fun func(ctx context.Context, rows []*bo.OrderBo) error) error { func (p *OrderRepoImpl) FinSucByStockIdInBatches(ctx context.Context, req *do.WechatQuery, fun func(ctx context.Context, rows []*bo.OrderBo) error) error {
tx := p.DB(ctx). tx := p.DB(ctx).
Where("`status` in (?)", []uint8{vo.OrderStatusSuccess.GetValue(), vo.OrderStatusUse.GetValue(), vo.OrderStatusExpired.GetValue()}). Where("`status` in (?)", []uint8{
Where("activity_id = ''") vo.OrderStatusSuccess.GetValue(),
vo.OrderStatusUse.GetValue(),
vo.OrderStatusExpired.GetValue(),
}).Where("activity_id = ''")
if req.ProductNo != "" { if req.ProductNo != "" {
tx = tx.Where("product_no = ?", req.ProductNo) tx = tx.Where("product_no = ?", req.ProductNo)