add
This commit is contained in:
parent
724249bf6a
commit
3a873c13a3
|
@ -60,7 +60,7 @@ var (
|
|||
ErrVasInvalidParam = errors.New("invalid param")
|
||||
ErrVasNoEnoughWithdrawDias = errors.New("no enough withdraw dias")
|
||||
ErrVasAlipayUniTransferFail = errors.New("alipay uni transfer fail")
|
||||
ErrVasOverTodayWithdrawCnt = errors.New("over today withdraw cnt")
|
||||
ErrVasOverTodayWithdrawCnt = errors.New("今日提现次数到达上限")
|
||||
ErrVasRefundLimit = errors.New("账号已受限,解限请联系客服")
|
||||
ErrVasHvyogoSingleDistributionFail = errors.New("hvyogo single distribution fail")
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
func (c *Cron) SyncAlipayBalance() {
|
||||
logger.Info("SyncAlipayBalance Start")
|
||||
for range time.Tick(time.Second * 5) {
|
||||
for range time.Tick(time.Second * 30) {
|
||||
ctx := context.Background()
|
||||
allClients := alipaycli.GetAllAlipayClients()
|
||||
for _, client := range allClients {
|
||||
|
|
|
@ -2015,8 +2015,15 @@ func (v *Vas) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (t
|
|||
return
|
||||
}
|
||||
|
||||
// 2000元以下直接操作
|
||||
alipayCli := alipaycli.GetAlipayClientByAppId(alipaycli.AppIdXinYiDaoLe)
|
||||
// 获取能提现的支付宝
|
||||
alipayAcnt, err := v.store.GetAvailableWithdrawAlipayAccount(ctx, money)
|
||||
if err != nil {
|
||||
logger.Error("GetAvailableWithdrawAlipayAccount fail, err: %v", err)
|
||||
err = fmt.Errorf("提现维护中,请稍后再试")
|
||||
return
|
||||
}
|
||||
alipayCli := alipaycli.GetAlipayClientByAppId(alipayAcnt.AppId)
|
||||
logger.Info("Get AlipayAcnt ok, aliAcnt: %v, req: %v", util.ToJson(alipayCli), util.ToJson(req))
|
||||
|
||||
// 更改状态
|
||||
err = v.store.UpdateWithdrawOrderStatus(ctx, tx, orderId, dbstruct.VasWithdrawOrderStatusInit, dbstruct.VasWithdrawOrderStatusAuto)
|
||||
|
@ -2085,6 +2092,10 @@ func (v *Vas) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (t
|
|||
logger.Error("UniTransfer fail, param: %v, resp: %v, err: %v", util.ToJson(transferParam), util.ToJson(transferResp), err)
|
||||
return
|
||||
}
|
||||
_err := v.store.UpdateAlipayAccountWithdrawUt(ctx, alipayCli.AppId)
|
||||
if _err != nil {
|
||||
logger.Error("UpdateAlipayAccountWithdrawUt, err: %v", err)
|
||||
}
|
||||
//}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue