|
@@ -10,17 +10,11 @@ import (
|
|
|
"strings"
|
|
|
"time"
|
|
|
|
|
|
- "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
- . "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
-
|
|
|
- . "app.yhyue.com/moapp/jybase/api"
|
|
|
qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
+ "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jypkg/ent/chain-zhang/pinyin"
|
|
|
- . "app.yhyue.com/moapp/jypkg/ent/entity"
|
|
|
"app.yhyue.com/moapp/jypkg/ent/util"
|
|
|
- . "app.yhyue.com/moapp/jypkg/ent/util"
|
|
|
-
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
|
)
|
|
|
|
|
@@ -82,6 +76,7 @@ func (ac *Action) Distribute_list() {
|
|
|
listOne := map[string]interface{}{}
|
|
|
listOne["id"] = id
|
|
|
listOne["area"] = v["o_area"]
|
|
|
+ listOne["district"] = v["o_district"]
|
|
|
if len(*qutil.ObjToMap(v["o_area"])) == 0 {
|
|
|
listOne["area"] = M{"全国": ""}
|
|
|
}
|
|
@@ -235,6 +230,10 @@ func (ac *Action) Distribute_add() {
|
|
|
distribute_rule["o_area"] = map[string]interface{}{}
|
|
|
}
|
|
|
}
|
|
|
+ //区域处理
|
|
|
+ if distribute_ruleMap["district"] != nil {
|
|
|
+ distribute_rule["o_district"] = distribute_ruleMap["district"]
|
|
|
+ }
|
|
|
if distribute_ruleMap["buyerclass"] != nil {
|
|
|
distribute_rule["a_buyerclass"] = distribute_ruleMap["buyerclass"]
|
|
|
}
|
|
@@ -326,6 +325,9 @@ func (ac *Action) Distribute_detail() {
|
|
|
data["area"] = M{"全国": ""}
|
|
|
}
|
|
|
}
|
|
|
+ if (*res)["o_district"] != nil {
|
|
|
+ data["district"] = (*res)["o_district"]
|
|
|
+ }
|
|
|
if (*res)["a_buyerclass"] != nil {
|
|
|
data["buyerclass"] = (*res)["a_buyerclass"]
|
|
|
}
|
|
@@ -375,6 +377,9 @@ func (ac *Action) Distribute_update() {
|
|
|
distribute_rule["o_area"] = map[string]interface{}{}
|
|
|
}
|
|
|
}
|
|
|
+ if update_map[""] != nil {
|
|
|
+ distribute_rule["o_district"] = update_map["district"]
|
|
|
+ }
|
|
|
if update_map["buyerclass"] != nil {
|
|
|
distribute_rule["a_buyerclass"] = update_map["buyerclass"]
|
|
|
}
|