fix
This commit is contained in:
parent
f6018b19d6
commit
8e4e6087b6
|
@ -80,6 +80,8 @@ func ZoneRefund(ctx *gin.Context) {
|
|||
ReplyErrCodeMsg(ctx, errcode.ErrCodeBadParam)
|
||||
return
|
||||
}
|
||||
ReplyOk(ctx, nil)
|
||||
|
||||
ec, err := service.DefaultService.ZoneRefund(ctx, req)
|
||||
if ec != errcode.ErrCodeVasSrvOk {
|
||||
logger.Error("ZoneRefund fail, req: %v, ec: %v", util.ToJson(req), ec)
|
||||
|
@ -90,7 +92,6 @@ func ZoneRefund(ctx *gin.Context) {
|
|||
ReplyErrCodeMsg(ctx, ec)
|
||||
return
|
||||
}
|
||||
ReplyOk(ctx, nil)
|
||||
}
|
||||
|
||||
func ZoneMemberList(ctx *gin.Context) {
|
||||
|
|
|
@ -2204,6 +2204,10 @@ func (v *Vas) UnlockMembership(ctx *gin.Context, tx *sqlx.Tx, mid int64, product
|
|||
return
|
||||
}
|
||||
|
||||
func getRefundLockKey(orderId string) string {
|
||||
return fmt.Sprintf("refund_%s", orderId)
|
||||
}
|
||||
|
||||
// 订单退款,只退充值
|
||||
func (v *Vas) RefundOrder(ctx *gin.Context, req *vasproto.RefundOrderReq, opt *vasproto.RefundOrderOpt) error {
|
||||
// 获取订单
|
||||
|
|
|
@ -921,6 +921,8 @@ func (v *Vas) ZoneRefund(ctx *gin.Context, req *vasproto.ZoneRefundReq) error {
|
|||
if time.Now().Unix()-t < 3600*12 {
|
||||
return fmt.Errorf("12小时内您最多只能进行1次退款")
|
||||
}
|
||||
// redis记录退款时间
|
||||
_ = redisCli.Set(redisKey, time.Now().Unix(), 86400)
|
||||
|
||||
// 获取解锁信息
|
||||
zv, err := v.store.GetZoneUnlock(ctx, nil, req.Mid, req.Zid)
|
||||
|
@ -961,9 +963,6 @@ func (v *Vas) ZoneRefund(ctx *gin.Context, req *vasproto.ZoneRefundReq) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// redis记录退款时间
|
||||
_ = redisCli.Set(redisKey, time.Now().Unix(), 86400)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue