From 275fe4e1e16afe260cab8a526a2a6986740e2e1e Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 27 Mar 2023 11:38:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/regional_sub_agent.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rule/regional_sub_agent.go b/rule/regional_sub_agent.go index 5b733cc..19c8ac3 100644 --- a/rule/regional_sub_agent.go +++ b/rule/regional_sub_agent.go @@ -188,9 +188,12 @@ func makeSubSystemData(engine *xorm.Engine, args *md.RegionalAgentSystemArgs, re "key": "id", "value": value, }) + if regionalAgentRegionData == nil { + return nil, amount, 0, nil + } //查询代理地区用户 agentUser, err := db.RegionalSubAgentUserFindByValid(engine, value) - if err != nil { + if err != nil || agentUser == nil { return nil, amount, 0, err } var divideAmount float64 = 0