fix: 接口 debug 错误修改 1
This commit is contained in:
parent
77ae5fac7e
commit
1e974bc7e5
|
@ -251,7 +251,7 @@ type ZoneRefundListVo struct {
|
|||
// 空间退款详情
|
||||
type ZoneRefundInfoReq struct {
|
||||
base.BaseRequest
|
||||
Zid int64 `json:"zid"` // 空间 id
|
||||
//Zid int64 `json:"zid"` // 空间 id
|
||||
AuditId string `json:"audit_id"` // 审核 id(列表 id)
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ type ZoneRefundAuditReq struct {
|
|||
base.BaseRequest
|
||||
Zid int64 `json:"zid"` // 空间 id
|
||||
AuditId string `json:"audit_id"` // 审核 id(列表 id)
|
||||
RefundsStatus string `json:"refunds_status"` // 审核 id(列表 id)
|
||||
RefundsStatus string `json:"refunds_status"` // 退款状态
|
||||
}
|
||||
|
||||
// 更新空间价格信息
|
||||
|
|
|
@ -169,7 +169,7 @@ func ZoneRefundList(ctx *gin.Context) {
|
|||
|
||||
func ZoneRefundInfo(ctx *gin.Context) {
|
||||
req := ctx.MustGet("client_req").(*vasproto.ZoneRefundInfoReq)
|
||||
if req.Mid <= 0 || req.AuditId != "" || len(req.AuditId) != 0 {
|
||||
if req.Mid <= 0 || req.AuditId == "" || len(req.AuditId) == 0 {
|
||||
logger.Error("ZoneRefundInfo, invalid param, req: %v", util.ToJson(req))
|
||||
ReplyErrCodeMsg(ctx, errcode.ErrCodeBadParam)
|
||||
return
|
||||
|
@ -194,7 +194,7 @@ func ZoneRefundInfo(ctx *gin.Context) {
|
|||
|
||||
func ZoneRefundAudit(ctx *gin.Context) {
|
||||
req := ctx.MustGet("client_req").(*vasproto.ZoneRefundAuditReq)
|
||||
if req.Mid <= 0 || req.AuditId != "" || len(req.AuditId) != 0 {
|
||||
if req.Mid <= 0 || req.AuditId == "" || len(req.AuditId) == 0 {
|
||||
logger.Error("ZoneRefundAudit, invalid param, req: %v", util.ToJson(req))
|
||||
ReplyErrCodeMsg(ctx, errcode.ErrCodeBadParam)
|
||||
return
|
||||
|
|
|
@ -291,13 +291,15 @@ func (m *Mongo) AddWithdrawHis(ctx *gin.Context, doc *dbstruct.WithdrawHis) erro
|
|||
}
|
||||
|
||||
// 用户退款表:查询主播审核列表
|
||||
func (m *Mongo) GetZoneRefundList(ctx *gin.Context, zid int64, auditType int64) ([]*dbstruct.RefundInfo, error) {
|
||||
func (m *Mongo) GetZoneRefundList(ctx *gin.Context, zid int64, refundsStatusList []int64) ([]*dbstruct.RefundInfo, error) {
|
||||
list := make([]*dbstruct.RefundInfo, 0)
|
||||
doc := m.GetZoneRefund()
|
||||
|
||||
query := qmgo.M{
|
||||
"zid": zid,
|
||||
"audit_type": auditType,
|
||||
"zid": zid,
|
||||
"refunds_status": qmgo.M{
|
||||
"$in": refundsStatusList,
|
||||
},
|
||||
}
|
||||
err := doc.Find(ctx, query).All(&list)
|
||||
if errors.Is(err, qmgo.ErrNoSuchDocuments) {
|
||||
|
|
|
@ -1093,7 +1093,13 @@ func (v *Vas) ZoneRefundV2(ctx *gin.Context, req *vasproto.ZoneRefundReq) error
|
|||
|
||||
// 退款审核列表页
|
||||
func (v *Vas) ZoneRefundList(ctx *gin.Context, req *vasproto.ZoneRefundListReq) (list []*dbstruct.RefundInfo, err error) {
|
||||
list, err = v.store.GetZoneRefundList(ctx, req.Zid, req.AuditType)
|
||||
refundsStatusList := make([]int64, 0)
|
||||
if req.AuditType == 1 {
|
||||
refundsStatusList = append(refundsStatusList, dbstruct.Refunds_Awaiting)
|
||||
} else if req.AuditType == 2 {
|
||||
refundsStatusList = append(refundsStatusList, dbstruct.Refunds_Approved, dbstruct.Refunds_Rejected, dbstruct.Refunds_Overtime)
|
||||
}
|
||||
list, err = v.store.GetZoneRefundList(ctx, req.Zid, refundsStatusList)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue