Browse Source

提现

master
huangjiajun 1 day ago
parent
commit
13f54c751d
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      consume/egg_fin_withdraw_apply_consume.go
  2. +1
    -1
      go.mod

+ 4
- 3
consume/egg_fin_withdraw_apply_consume.go View File

@@ -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
} }


+ 1
- 1
go.mod View File

@@ -7,7 +7,7 @@ go 1.19
// replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules // replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules


require ( require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20250106115148-27e932d9ac3d
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20250109083235-1c6d2d06b622
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20250104230219-410c5822c551 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20250104230219-410c5822c551
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5


Loading…
Cancel
Save