dengbiao há 1 dia
ascendente
cometimento
27fd401f84
2 ficheiros alterados com 20 adições e 22 eliminações
  1. +16
    -18
      app/hdl/financial_center/hdl_withdraw.go
  2. +4
    -4
      app/md/financial_center/md_withdraw.go

+ 16
- 18
app/hdl/financial_center/hdl_withdraw.go Ver ficheiro

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


+ 4
- 4
app/md/financial_center/md_withdraw.go Ver ficheiro

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


Carregando…
Cancelar
Guardar