|
|
@@ -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() |
|
|
|