From 27fd401f84a1c508373a0296855bb2d232d5779c Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 24 Dec 2024 17:12:39 +0800 Subject: [PATCH] 1 --- app/hdl/financial_center/hdl_withdraw.go | 34 +++++++++++------------- app/md/financial_center/md_withdraw.go | 8 +++--- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/app/hdl/financial_center/hdl_withdraw.go b/app/hdl/financial_center/hdl_withdraw.go index d700c8d..866a410 100644 --- a/app/hdl/financial_center/hdl_withdraw.go +++ b/app/hdl/financial_center/hdl_withdraw.go @@ -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() diff --git a/app/md/financial_center/md_withdraw.go b/app/md/financial_center/md_withdraw.go index 73ae562..4edf556 100644 --- a/app/md/financial_center/md_withdraw.go +++ b/app/md/financial_center/md_withdraw.go @@ -73,9 +73,9 @@ type GetWithdrawApplyListReq struct { Limit int `json:"limit"` //页面大小 } type WithdrawApplyAuditReq struct { - WithdrawApplyId int64 `json:"withdraw_apply_id" binding:"required"` // 提现申请id - AuditState int `json:"audit_state" binding:"required"` // 审核状态(1:同意 2:拒绝) - Reason int `json:"reason"` // 审核失败(驳回理由) + WithdrawApplyId string `json:"withdraw_apply_id" binding:"required"` // 提现申请id + AuditState int `json:"audit_state" binding:"required"` // 审核状态(1:同意 2:拒绝) + Reason int `json:"reason"` // 审核失败(驳回理由) } type WithdrawApplyInfo struct { @@ -104,7 +104,7 @@ type GetWithdrawApplyListResp struct { } type GetWithdrawApplyListNode struct { - WithdrawApplyId int64 `json:"withdraw_apply_id"` // 提现申请id + WithdrawApplyId string `json:"withdraw_apply_id"` // 提现申请id UserID int64 `json:"user_id"` // 会员 ID Nickname string `json:"nickname"` // 用户名称 ParentID int64 `xorm:"parent_id"` // 推荐人ID