From 95ef64760d890a29bfc211b9bf95aab8c6d617bd Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Fri, 10 May 2024 23:51:35 +0800 Subject: [PATCH 1/2] isWithdrawAnyDiasEnable --- api/proto/vas/proto/vas.go | 20 ++++++++++++++++++++ app/mix/controller/vas.go | 11 ++++++++++- dbstruct/vas.sql | 3 +++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/api/proto/vas/proto/vas.go b/api/proto/vas/proto/vas.go index c659122d..21cfc098 100644 --- a/api/proto/vas/proto/vas.go +++ b/api/proto/vas/proto/vas.go @@ -265,3 +265,23 @@ type ZoneExitResp struct { base.BaseResponse Data *ZoneFreeJoinData `json:"data"` } + +// 动态购买列表 +type ZoneMomentOrderListReq struct { + base.BaseRequest + MomentId int64 `json:"moment_id"` + Offset int `json:"offset"` + Limit int `json:"limit"` +} + +type ZoneMomentOrderVO struct { + Account *dbstruct.Account `json:"account"` + BuyTime int64 `json:"buy_time"` // 购买时间 + OrderId string `json:"order_id"` // 订单id +} + +type ZoneMomentOrderListData struct { + List []*ZoneMomentOrderVO `json:"list"` + Offset int `json:"offset"` + More int `json:"more"` +} diff --git a/app/mix/controller/vas.go b/app/mix/controller/vas.go index 8a386546..6cfed17f 100644 --- a/app/mix/controller/vas.go +++ b/app/mix/controller/vas.go @@ -241,6 +241,15 @@ func isWithdrawFreeze(mid int64) bool { return WithdrawFreezeMidMap[mid] } +// 任意额度提现 +var WithdrawAnyDiasMap = map[int64]bool{ + 74: true, +} + +func isWithdrawAnyDiasEnable(mid int64) bool { + return WithdrawAnyDiasMap[mid] +} + // 提现发送验证码 func WithdrawSendVerifycode(ctx *gin.Context) { req := ctx.MustGet("client_req").(*vasproto.WithdrawSendVerifycodeReq) @@ -270,7 +279,7 @@ func WithdrawApply(ctx *gin.Context) { ReplyErrorMsg(ctx, "最低提现金额不能小于200元") return } - if req.Diamonds > 20000 { + if !isWithdrawAnyDiasEnable(req.Mid) && req.Diamonds > 20000 { ReplyErrorMsg(ctx, "最大提现金额不能大于2000元") return } diff --git a/dbstruct/vas.sql b/dbstruct/vas.sql index 6bcc241c..954c0f10 100644 --- a/dbstruct/vas.sql +++ b/dbstruct/vas.sql @@ -31,6 +31,9 @@ CREATE TABLE `vas_order` CREATE INDEX out_order_id ON vas_order (out_order_id); CREATE INDEX ct_status ON vas_order (ct, order_status); CREATE INDEX ix_ct_productid ON vas_order (ct, product_id); +CREATE INDEX ix_oid1 ON vas_order (oid1); +CREATE INDEX ix_oid2 ON vas_order (oid2); +CREATE INDEX ix_oid3 ON vas_order (oid3); CREATE TABLE `vas_wallet` ( From 22b28535a89d43cce97a68316f9f270334d7a1f4 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Sat, 11 May 2024 00:04:06 +0800 Subject: [PATCH 2/2] w --- api/proto/vas/proto/vas.go | 9 +++++++++ app/mix/controller/vas.go | 11 +---------- app/mix/service/logic/vas.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api/proto/vas/proto/vas.go b/api/proto/vas/proto/vas.go index 21cfc098..f282d539 100644 --- a/api/proto/vas/proto/vas.go +++ b/api/proto/vas/proto/vas.go @@ -120,6 +120,15 @@ type WithdrawApplyData struct { TransferResp *alipay.FundTransUniTransferResponse `json:"transfer_resp"` } +// 任意额度提现 +var WithdrawAnyDiasMap = map[int64]bool{ + 74: true, +} + +func IsWithdrawAnyDiasEnable(mid int64) bool { + return WithdrawAnyDiasMap[mid] +} + // 空间收银台 type ZoneGetCashierReq struct { base.BaseRequest diff --git a/app/mix/controller/vas.go b/app/mix/controller/vas.go index 6cfed17f..dd20e1f8 100644 --- a/app/mix/controller/vas.go +++ b/app/mix/controller/vas.go @@ -241,15 +241,6 @@ func isWithdrawFreeze(mid int64) bool { return WithdrawFreezeMidMap[mid] } -// 任意额度提现 -var WithdrawAnyDiasMap = map[int64]bool{ - 74: true, -} - -func isWithdrawAnyDiasEnable(mid int64) bool { - return WithdrawAnyDiasMap[mid] -} - // 提现发送验证码 func WithdrawSendVerifycode(ctx *gin.Context) { req := ctx.MustGet("client_req").(*vasproto.WithdrawSendVerifycodeReq) @@ -279,7 +270,7 @@ func WithdrawApply(ctx *gin.Context) { ReplyErrorMsg(ctx, "最低提现金额不能小于200元") return } - if !isWithdrawAnyDiasEnable(req.Mid) && req.Diamonds > 20000 { + if !vasproto.IsWithdrawAnyDiasEnable(req.Mid) && req.Diamonds > 20000 { ReplyErrorMsg(ctx, "最大提现金额不能大于2000元") return } diff --git a/app/mix/service/logic/vas.go b/app/mix/service/logic/vas.go index 9d9fa2a6..b161e623 100644 --- a/app/mix/service/logic/vas.go +++ b/app/mix/service/logic/vas.go @@ -1564,7 +1564,7 @@ func (v *Vas) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (t } // 2000元以下直接操作 - if money <= 200000 { + if money <= 200000 || vasproto.IsWithdrawAnyDiasEnable(req.Mid) { alipayCli := alipaycli.GetAlipayClientByAppId(alipaycli.AppIdXinYiDaoLe) // 更改状态