cmb
This commit is contained in:
parent
6fbd79f3a1
commit
26f3d17ec6
|
|
@ -14,6 +14,7 @@ type Cmb struct {
|
|||
ProductRepo repo.ProductRepo
|
||||
WechatCpnRepo wechatrepo.WechatCpnRepo
|
||||
GenerateMixRepo mixrepos.GenerateMixRepo
|
||||
CmbMixRepo mixrepos.CmbMixRepo
|
||||
}
|
||||
|
||||
func NewCmb(
|
||||
|
|
@ -23,6 +24,7 @@ func NewCmb(
|
|||
ProductRepo repo.ProductRepo,
|
||||
WechatCpnRepo wechatrepo.WechatCpnRepo,
|
||||
GenerateMixRepo mixrepos.GenerateMixRepo,
|
||||
CmbMixRepo mixrepos.CmbMixRepo,
|
||||
) *Cmb {
|
||||
return &Cmb{
|
||||
bc: bc,
|
||||
|
|
@ -31,5 +33,6 @@ func NewCmb(
|
|||
ProductRepo: ProductRepo,
|
||||
WechatCpnRepo: WechatCpnRepo,
|
||||
GenerateMixRepo: GenerateMixRepo,
|
||||
CmbMixRepo: CmbMixRepo,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package cmb
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
v1 "voucher/api/v1"
|
||||
"voucher/internal/biz/bo"
|
||||
|
|
@ -94,14 +95,26 @@ func (v *Cmb) NotifyConsume(ctx context.Context, order *bo.OrderBo, orderOutRequ
|
|||
return fmt.Errorf("微信订单状态错误,不能通知:%s", order.Status.GetText())
|
||||
}
|
||||
|
||||
request := &v1.CmbNotifyRequest{
|
||||
req := &v1.CmbNotifyRequest{
|
||||
Ticket: orderWechat.OrderNo,
|
||||
Status: "",
|
||||
TransDate: "",
|
||||
OrgNo: "",
|
||||
Ext: "",
|
||||
}
|
||||
fmt.Printf("request:%+v", request)
|
||||
bizJsonBytes, err := json.Marshal(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
bizJsonStr := string(bizJsonBytes)
|
||||
|
||||
request, err := v.CmbMixRepo.BuildRequest(ctx, "updateCodeStatus.json", bizJsonStr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// todo
|
||||
fmt.Print(request)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue