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