|
@@ -860,3 +860,31 @@ func ResourceCenterPowers(msl *Mysql, positionId int64) map[string]bool {
|
|
}
|
|
}
|
|
return powers
|
|
return powers
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+//
|
|
|
|
+func MergeDiffIndustry(wuye, other *[]map[string]interface{}) *[]map[string]interface{} {
|
|
|
|
+ m := map[string]map[string]interface{}{}
|
|
|
|
+ for _, v := range *wuye {
|
|
|
|
+ _id := BsonIdToSId(v["_id"])
|
|
|
|
+ tag_topinformation, _ := v["tag_topinformation"].([]interface{})
|
|
|
|
+ for _, vv := range tag_topinformation {
|
|
|
|
+ if vv != "情报_物业" {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ m[_id] = v
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for _, v := range *other {
|
|
|
|
+ _id := BsonIdToSId(v["_id"])
|
|
|
|
+ tag_topinformation, _ := v["tag_topinformation"].([]interface{})
|
|
|
|
+ if len(tag_topinformation) == 1 && tag_topinformation[0] == "情报_物业" {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ m[_id] = v
|
|
|
|
+ }
|
|
|
|
+ datas := []map[string]interface{}{}
|
|
|
|
+ for _, v := range m {
|
|
|
|
+ datas = append(datas, v)
|
|
|
|
+ }
|
|
|
|
+ return &datas
|
|
|
|
+}
|