diff --git a/api/v1/cmb_cpn.proto b/api/v1/cmb_cpn.proto index db0e675..444411f 100644 --- a/api/v1/cmb_cpn.proto +++ b/api/v1/cmb_cpn.proto @@ -229,6 +229,8 @@ message CmbMultiNotifyRequest { string acquiredDate = 4 [json_name = "acquiredDate"]; // 券状态0:可使用,1:已使用 string status = 5 [json_name = "status"]; + // String|M 整张券总状态0:可使用,1:已使用 + string couponStatus = 13 [json_name = "couponStatus"]; // 券核销时间 格式:yyyy-MM-dd HH:mm:ss.sss string transDate = 6 [json_name = "transDate"]; // 券核销金额,单位-分 diff --git a/internal/biz/multi.go b/internal/biz/multi.go index 0189837..3772de2 100644 --- a/internal/biz/multi.go +++ b/internal/biz/multi.go @@ -282,6 +282,7 @@ func (biz *MultiBiz) bizContent(nl *bo.MultiNotifyLogBo, order *bo.OrderBo) (str CouponId: nl.CouponID, // 微信券券号 AcquiredDate: order.ReceiveSuccessTime.Format("2006-01-02 15:04:05.000"), // 券领取时间 Status: "1", // 券状态 0:可使用,1:已使用 + CouponStatus: "0", // 0:可使用,1:已使用 TransDate: nl.ConsumeTime.Format("2006-01-02 15:04:05.000"), // 核销时间,验券时间,格式yyyy-mm-dd hh:mm:ss.sss TransAmount: fmt.Sprintf("%d", nl.ConsumeAmount), OrderId: nl.TransactionID, // 券核销支付单号 @@ -291,9 +292,9 @@ func (biz *MultiBiz) bizContent(nl *bo.MultiNotifyLogBo, order *bo.OrderBo) (str Ext: "", } - //if nl.Status.IsUsed() { - // req.Status = "1" - //} + if nl.Status.IsUsed() { + req.CouponStatus = "1" + } bizJsonBytes, err := json.Marshal(req) if err != nil {