|
|
@@ -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) |
|
|
|