by Robin at 20240628
This commit is contained in:
parent
213cc36149
commit
3a83ade89f
|
@ -1,8 +1,9 @@
|
|||
package errs
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"service/api/errcode"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func DealVasErr(err error) (errcode.ErrCode, error) {
|
||||
|
@ -61,4 +62,5 @@ var (
|
|||
ErrVasAlipayUniTransferFail = errors.New("alipay uni transfer fail")
|
||||
ErrVasOverTodayWithdrawCnt = errors.New("over today withdraw cnt")
|
||||
ErrVasRefundLimit = errors.New("账号已受限,解限请联系客服")
|
||||
ErrVasHvyogoSingleDistributionFail = errors.New("hvyogo single distribution fail")
|
||||
)
|
||||
|
|
|
@ -3487,11 +3487,6 @@ func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.A
|
|||
logger.Error("_DefaultSingleDistributeHis OpUpdate fail, err: %v", err)
|
||||
}
|
||||
|
||||
if resp.StatusCode != response.StatusCodeSuccess {
|
||||
err = fmt.Errorf("single distribution fail")
|
||||
return resp, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
|
@ -3515,6 +3510,17 @@ func (s *Service) ApiHvyogoSingleDistribute(ctx *gin.Context, req *hvyogoproto.A
|
|||
err = nil
|
||||
return
|
||||
}
|
||||
// 下发打款接口未成功调用
|
||||
if resp.StatusCode != response.StatusCodeSuccess {
|
||||
logger.Error("WithdrawApply fail, req: %v, err: %v", util.ToJson(req), resp.StatusText)
|
||||
// 恢复锁
|
||||
_, err = _DefaultSingleDistributeHis.GetAndDecLock(ctx, req.BaseRequest.Mid)
|
||||
if err != nil {
|
||||
logger.Error("_DefaultSingleDistributeHis GetAndDecLock failed : %v", err)
|
||||
ec, err = errcode.ErrCodeSingleDistributeHisSrvFail, nil
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 组装返回结果
|
||||
data = &hvyogoproto.ApiSingleDistributeData{}
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"fmt"
|
||||
"service/api/base"
|
||||
"service/api/errs"
|
||||
"service/api/message/response"
|
||||
accountproto "service/api/proto/account/proto"
|
||||
hvyogoproto "service/api/proto/hvyogo/proto"
|
||||
vasproto "service/api/proto/vas/proto"
|
||||
|
@ -3870,11 +3871,19 @@ func (v *Vas) UnilaterallyHvyogoWithdrawApply(ctx *gin.Context, req *vasproto.Un
|
|||
if err != nil {
|
||||
logger.Error("global err, req: %v, err: %v", util.ToJson(req), err)
|
||||
}
|
||||
if resp.StatusCode != response.StatusCodeSuccess {
|
||||
errTx := v.store.DealTxCR(tx, errs.ErrVasHvyogoSingleDistributionFail)
|
||||
if errTx != nil {
|
||||
logger.Error("DealTxCR fail, err: %v", errTx)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
errTx := v.store.DealTxCR(tx, err)
|
||||
if errTx != nil {
|
||||
logger.Error("DealTxCR fail, err: %v", errTx)
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// 锁定钱包
|
||||
|
|
Loading…
Reference in New Issue