mock use
This commit is contained in:
parent
de9f99e62b
commit
2f7194c945
|
|
@ -71,11 +71,11 @@ func (v *VoucherBiz) wxToBBUse(ctx context.Context, order *bo.OrderBo, wxReq *bo
|
|||
GmtVoucherCreate: fmt.Sprintf("%d", order.ReceiveSuccessTime.Unix()),
|
||||
}
|
||||
|
||||
inputFormat := time.RFC3339
|
||||
|
||||
if wxReq.PlainText.ConsumeInformation.ConsumeTime != "" {
|
||||
inputFormat := time.RFC3339
|
||||
useTime, _ := time.Parse(inputFormat, wxReq.PlainText.ConsumeInformation.ConsumeTime)
|
||||
req.UseTime = fmt.Sprintf("%d", useTime.Unix())
|
||||
timestampMs := useTime.UnixNano() / int64(time.Millisecond)
|
||||
req.UseTime = fmt.Sprintf("%d", timestampMs)
|
||||
}
|
||||
|
||||
return v.KxMixRepo.Request(ctx, req.GetNotice())
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ func Test_WechatNotifyProducer(t *testing.T) {
|
|||
"original_type":"coupon",
|
||||
"associated_data":"coupon",
|
||||
"plain_text":{
|
||||
"stock_creator_mchid":"1676203838",
|
||||
"stock_id":"20215869",
|
||||
"coupon_id":"754343650536853505",
|
||||
"stock_creator_mchid":"1652465541",
|
||||
"stock_id":"10000000",
|
||||
"coupon_id":"192720602126930329826",
|
||||
"coupon_name":"萧山农商新客激活礼",
|
||||
"description":"","status":"USED",
|
||||
"create_time":"2025-03-07T15:49:31+08:00",
|
||||
|
|
|
|||
Loading…
Reference in New Issue