拓展参数字段
This commit is contained in:
parent
03216c1815
commit
4fadebfea0
|
|
@ -125,9 +125,6 @@ func (v *VoucherBiz) CmbProductQuery(ctx context.Context, productNo string) (rep
|
||||||
EndTime: *wechatResp.AvailableEndTime,
|
EndTime: *wechatResp.AvailableEndTime,
|
||||||
AvailableStock: "",
|
AvailableStock: "",
|
||||||
Detail: *wechatResp.Description,
|
Detail: *wechatResp.Description,
|
||||||
|
|
||||||
SaleStartTime: *wechatResp.StartTime,
|
|
||||||
SaleEndTime: *wechatResp.StopTime,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reps.Amount = fmt.Sprintf("%d", *wechatResp.StockUseRule.FixedNormalCoupon.CouponAmount)
|
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
|
availableStock := *wechatResp.StockUseRule.MaxCoupons - *wechatResp.DistributedCoupons
|
||||||
reps.AvailableStock = fmt.Sprintf("%d", availableStock)
|
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()
|
reps.AvailableType = vo.CmbAvailableTypeFixed.GetValue()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue