Browse Source

feat:地区

wangshan 2 years ago
parent
commit
0352d05403
1 changed files with 8 additions and 2 deletions
  1. 8 2
      service/service.go

+ 8 - 2
service/service.go

@@ -386,13 +386,19 @@ func memberSetMap(userId int64, orderData map[string]interface{}) (set map[strin
 	if startdate.Unix() > time.Now().Unix() {
 		dataType = 2
 	}
+	var (
+		areaCount = common.IntAllDef((*filterMap)["areaCount"], -1)
+		area      = common.If(areaCount > 0, map[string]interface{}{"北京": []string{}}, map[string]interface{}{}).(map[string]interface{})
+	)
+
+	areaCount = common.IntAllDef((*filterMap)["areaCount"], -1)
 	set = map[string]interface{}{
 		"i_type": 1,
 		"o_member_jy": map[string]interface{}{
 			"i_wxpush": 1,
 		},
-		"o_entniche.i_areacount": common.IntAllDef((*filterMap)["areaCount"], -1),
-		"o_entniche.o_area":      map[string]interface{}{"北京": []string{}}, //默认北京
+		"o_entniche.i_areacount": areaCount,
+		"o_entniche.o_area":      area, //默认北京
 	}
 	setEntUser = map[string]interface{}{
 		"i_member_status":    common.If(dataType == 1, level, -level),