|
|
@@ -12,10 +12,8 @@ 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" |
|
|
|
) |
|
|
@@ -326,7 +324,7 @@ func GetWithdrawApplyList(c *gin.Context) { |
|
|
|
|
|
|
|
for i, apply := range *applies { |
|
|
|
list[i] = md.GetWithdrawApplyListNode{ |
|
|
|
WithdrawApplyId: apply.Id, |
|
|
|
WithdrawApplyId: utils.Int64ToStr(apply.Id), |
|
|
|
UserID: apply.Uid, |
|
|
|
Nickname: apply.Nickname, |
|
|
|
ParentID: apply.ParentID, |
|
|
@@ -457,7 +455,7 @@ func WithdrawApplyAudit(c *gin.Context) { |
|
|
|
|
|
|
|
//1、查找对应提现申请单 |
|
|
|
finWithdrawApplyDb := implement.NewFinWithdrawApplyDb(db.Db) |
|
|
|
finWithdrawApply, err := finWithdrawApplyDb.FinWithdrawApplyGet(req.WithdrawApplyId) |
|
|
|
finWithdrawApply, err := finWithdrawApplyDb.FinWithdrawApplyGet(utils.StrToInt64(req.WithdrawApplyId)) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
return |
|
|
@@ -481,20 +479,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() |
|
|
|