From 2962d617951140dee7ade06f2fe26703241c403b Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 24 Dec 2024 17:14:03 +0800 Subject: [PATCH] 2 --- app/hdl/financial_center/hdl_withdraw.go | 30 +++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/app/hdl/financial_center/hdl_withdraw.go b/app/hdl/financial_center/hdl_withdraw.go index 866a410..a74c309 100644 --- a/app/hdl/financial_center/hdl_withdraw.go +++ b/app/hdl/financial_center/hdl_withdraw.go @@ -12,8 +12,10 @@ import ( md3 "code.fnuoos.com/EggPlanet/egg_system_rules.git/md" "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule" md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" + "code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" "errors" "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" "strings" "time" ) @@ -479,20 +481,20 @@ func WithdrawApplyAudit(c *gin.Context) { return } - //ch, err1 := rabbit.Cfg.Pool.GetChannel() - //if err1 != nil { - // e.OutErr(c, e.ERR_INIT_RABBITMQ, err1.Error()) - // return - //} - //defer ch.Release() - //var data md2.EggFinWithdrawApplyData - //err = copier.Copy(&data, &finWithdrawApply) - //if err != nil { - // e.OutErr(c, e.ERR, err.Error()) - // return - //} - // - //ch.Publish(md2.EggAppExchange, utils.SerializeStr(data), md2.EggFinWithdrawApply) + ch, err1 := rabbit.Cfg.Pool.GetChannel() + if err1 != nil { + e.OutErr(c, e.ERR_INIT_RABBITMQ, err1.Error()) + return + } + defer ch.Release() + var data md2.EggFinWithdrawApplyData + err = copier.Copy(&data, &finWithdrawApply) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + ch.Publish(md2.EggAppExchange, utils.SerializeStr(data), md2.EggFinWithdrawApply) } else { //拒绝(退余额、修改提现单失败) session := db.Db.NewSession()