|
@@ -145,7 +145,7 @@ func handleEggFinWithdrawApplyDataConsume(msgData []byte, client *alipay.Client, |
|
|
_, err = client.FundTransUniTransfer(context.Background(), bm) |
|
|
_, err = client.FundTransUniTransfer(context.Background(), bm) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
//TODO::处理提现失败 |
|
|
//TODO::处理提现失败 |
|
|
err11 := dealFinWithdrawApplyStateForBad(apply) |
|
|
|
|
|
|
|
|
err11 := dealFinWithdrawApplyStateForBad(apply, err.Error()) |
|
|
if err11 != nil { |
|
|
if err11 != nil { |
|
|
return errors.New("处理提现失败:" + err11.Error()) |
|
|
return errors.New("处理提现失败:" + err11.Error()) |
|
|
} |
|
|
} |
|
@@ -158,14 +158,15 @@ func handleEggFinWithdrawApplyDataConsume(msgData []byte, client *alipay.Client, |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func dealFinWithdrawApplyStateForBad(finWithdrawApply *model.FinWithdrawApply) error { |
|
|
|
|
|
|
|
|
func dealFinWithdrawApplyStateForBad(finWithdrawApply *model.FinWithdrawApply, errmsg string) error { |
|
|
session := db.Db.NewSession() |
|
|
session := db.Db.NewSession() |
|
|
defer session.Close() |
|
|
defer session.Close() |
|
|
session.Begin() |
|
|
session.Begin() |
|
|
|
|
|
|
|
|
finWithdrawApplyDb := implement.NewFinWithdrawApplyDb(db.Db) |
|
|
finWithdrawApplyDb := implement.NewFinWithdrawApplyDb(db.Db) |
|
|
finWithdrawApply.State = int(enum.FinWithdrawApplyStateForBad) |
|
|
finWithdrawApply.State = int(enum.FinWithdrawApplyStateForBad) |
|
|
updateAffected, err1 := finWithdrawApplyDb.UpdateFinWithdrawApplyBySession(session, finWithdrawApply, "state") |
|
|
|
|
|
|
|
|
finWithdrawApply.ErrorMsg = errmsg |
|
|
|
|
|
updateAffected, err1 := finWithdrawApplyDb.UpdateFinWithdrawApplyBySession(session, finWithdrawApply, "state", "error_msg") |
|
|
if err1 != nil { |
|
|
if err1 != nil { |
|
|
return err1 |
|
|
return err1 |
|
|
} |
|
|
} |
|
|