From aa86094b8cec68371546de5a8ec666ae07901b8f Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 23 Sep 2023 08:59:36 +0800 Subject: [PATCH] test --- app/svc/platform/svc_withdrawal.go | 7 +++++-- go.mod | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/svc/platform/svc_withdrawal.go b/app/svc/platform/svc_withdrawal.go index 8e7b987..250cfe5 100644 --- a/app/svc/platform/svc_withdrawal.go +++ b/app/svc/platform/svc_withdrawal.go @@ -34,12 +34,12 @@ func WithdrawalIncome(c *gin.Context) { if amountMap["is_show_official_amount"] == "1" { var tmp = map[string]string{"name": "账户一余额", "value": amountMap["amount"], "type": "amount", "tip": "", "alipay": amountMap["alipay"], "alipay_name": amountMap["alipay_name"], "is_need_bing_alipay": isNeedBingAlipay, "is_show_withdrawal": "1"} res = append(res, tmp) - if utils.StrToInt(amountMap["puid"]) > 0 { + if amountMap["is_show_agent_amount"] == "1" { var tmpAgent = map[string]string{"name": "账户二余额", "value": amountMap["agent_amount"], "type": "agent_amount", "tip": "", "alipay": amountMap["alipay"], "alipay_name": amountMap["alipay_name"], "is_need_bing_alipay": isNeedBingAlipay, "is_show_withdrawal": "1"} res = append(res, tmpAgent) } } else { - var tmpAgent = map[string]string{"name": "账户余额", "value": amountMap["agent_amount"], "type": "agent_amount", "tip": "", "alipay": amountMap["alipay"], "alipay_name": amountMap["alipay_name"], "is_need_bing_alipay": isNeedBingAlipay, "is_show_withdrawal": "1"} + var tmpAgent = map[string]string{"name": "账户二余额", "value": amountMap["agent_amount"], "type": "agent_amount", "tip": "", "alipay": amountMap["alipay"], "alipay_name": amountMap["alipay_name"], "is_need_bing_alipay": isNeedBingAlipay, "is_show_withdrawal": "1"} res = append(res, tmpAgent) } res = append(res, map[string]string{"name": "上月预估收益", "value": monthAmountMap["last_month_amount"], "type": "last_month_amount", "tip": "", "is_need_bing_alipay": "0", "is_show_withdrawal": "0"}) @@ -382,7 +382,10 @@ func masterAmount(mid, types string) map[string]string { res["agent_amount"] = "0" res["is_show_official_amount"] = "1" res["puid"] = puid + res["is_show_agent_amount"] = "0" if utils.StrToInt(puid) > 0 && hwOwnOpen == "1" { + res["is_show_agent_amount"] = "1" + agentMasterAmounts := masterAmountDb.GetMasterAmountByExtendUid(masterInfos["id"], puid, types) if agentMasterAmounts != nil { if agentMasterAmounts.Amount != "" { diff --git a/go.mod b/go.mod index 3985025..eb3dbb1 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sony/sonyflake v1.1.0 github.com/syyongx/php2go v0.9.7 + github.com/tealeg/xlsx v1.0.5 // indirect github.com/tidwall/gjson v1.14.1 go.uber.org/zap v1.16.0 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f // indirect