From 4c91c0065ede8b0a333dba147b6197c5eb87136d Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 24 Mar 2023 11:36:44 +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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rule/regional_sub_agent.go b/rule/regional_sub_agent.go index 576c254..5b733cc 100644 --- a/rule/regional_sub_agent.go +++ b/rule/regional_sub_agent.go @@ -103,7 +103,7 @@ func HandleSubCommissionDistributionSystem(engine *xorm.Engine, args *md.Regiona // parents = tempParents //} - tempParents, amount, _, err = makeSubSystemData(engine, args, regionalAgentRegion, &coinSet, virtualCoinMap, parents, amount, md.CITY) + tempParents, amount, _, err = makeSubSystemData(engine, args, regionalAgentRegion, &coinSet, virtualCoinMap, parents, amount, md.COUNTRY) if err != nil { return nil, false } @@ -159,23 +159,23 @@ func HandleSubCommissionDistributionSystem(engine *xorm.Engine, args *md.Regiona func makeSubSystemData(engine *xorm.Engine, args *md.RegionalAgentSystemArgs, regionalAgentRegion *model.RegionalAgentRegion, coinSet *md.CoinSet, virtualCoin map[int]string, parents []map[string]interface{}, amount float64, level string) ([]map[string]interface{}, float64, float64, error) { var value string coinSetDetail := coinSet.SiteAgent - if regionalAgentRegion.Level == md.CityKey { + if regionalAgentRegion.Level == md.CountryKey { switch level { case md.PROVINCE: value = zhios_order_relate_utils.AnyToString(regionalAgentRegion.ProvinceId) break case md.CITY: - value = zhios_order_relate_utils.AnyToString(regionalAgentRegion.Id) + value = zhios_order_relate_utils.AnyToString(regionalAgentRegion.CityId) break case md.COUNTRY: - value = zhios_order_relate_utils.AnyToString(0) + value = zhios_order_relate_utils.AnyToString(regionalAgentRegion.Id) break case md.SITE: value = zhios_order_relate_utils.AnyToString(0) break } //获得虚拟币的比例 - coinSetDetail = coinSet.CityAgent + coinSetDetail = coinSet.DistrictAgent } fmt.Println("地区ID:", value) fmt.Println("余额:", amount)