拓展参数字段

This commit is contained in:
李子铭 2025-03-17 09:49:08 +08:00
parent 03216c1815
commit 4fadebfea0
1 changed files with 7 additions and 3 deletions

View File

@ -125,9 +125,6 @@ func (v *VoucherBiz) CmbProductQuery(ctx context.Context, productNo string) (rep
EndTime: *wechatResp.AvailableEndTime,
AvailableStock: "",
Detail: *wechatResp.Description,
SaleStartTime: *wechatResp.StartTime,
SaleEndTime: *wechatResp.StopTime,
}
reps.Amount = fmt.Sprintf("%d", *wechatResp.StockUseRule.FixedNormalCoupon.CouponAmount)
@ -136,6 +133,13 @@ func (v *VoucherBiz) CmbProductQuery(ctx context.Context, productNo string) (rep
availableStock := *wechatResp.StockUseRule.MaxCoupons - *wechatResp.DistributedCoupons
reps.AvailableStock = fmt.Sprintf("%d", availableStock)
if wechatResp.StartTime != nil {
reps.SaleStartTime = *wechatResp.StartTime
}
if wechatResp.StopTime != nil {
reps.SaleEndTime = *wechatResp.StopTime
}
reps.AvailableType = vo.CmbAvailableTypeFixed.GetValue()
return nil