tmp
This commit is contained in:
parent
2634ad7c17
commit
157eed2d28
|
@ -118,6 +118,12 @@ type H5DirectUnlockWechatReq struct {
|
|||
base.BaseRequest
|
||||
Uid int64 `json:"uid"` // 主播id
|
||||
PayType string `json:"pay_type"` // 支付类型
|
||||
InviterMid int64
|
||||
}
|
||||
|
||||
type H5DirectUnlockWechatData CreateOrderData
|
||||
type H5DirectUnlockWechatData struct {
|
||||
CoinEnough int `json:"coin_enough"` // 0:不够(用下面的支付宝参数),1:够
|
||||
OrderId string `json:"order_id"` // 订单id
|
||||
AlipayParamStr string `json:"alipay_param_str"` // 支付宝 app支付参数
|
||||
AlipayH5ParamStr string `json:"alipay_h5_param_str"` // 支付宝 h5支付参数
|
||||
}
|
||||
|
|
|
@ -1349,6 +1349,20 @@ func (v *Vas) H5DirectUnlockWechat(ctx *gin.Context, req *vasproto.H5DirectUnloc
|
|||
return
|
||||
}
|
||||
|
||||
// 检查钱包
|
||||
wallet, _ := v.CheckWalletExist(ctx, req.Mid)
|
||||
|
||||
// 金币够不够
|
||||
if wallet.GetCoins() >= uVas.GetH5WechatCoinPrice() {
|
||||
v.OneStepUnlockContact(ctx, &vasproto.OneStepUnlockContactReq{
|
||||
BaseRequest: req.BaseRequest,
|
||||
ContactProductId: dbstruct.ProductIdH5ContactWechat,
|
||||
Uid: req.Uid,
|
||||
InviterMid: req.InviterMid,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 创建订单
|
||||
cData, err := v.CreateOrder(ctx, &vasproto.CreateOrderReq{
|
||||
BaseRequest: req.BaseRequest,
|
||||
|
|
Loading…
Reference in New Issue