浏览代码

省份代码处理

WH01243 1 年之前
父节点
当前提交
05c15a83e4
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      api/common/initconfig.go
  2. 2 2
      api/internal/service/employService.go

+ 1 - 1
api/common/initconfig.go

@@ -37,7 +37,7 @@ var DB config.Db
 
 
 var pushFile = flag.String("pf", "etc/push.yaml", "the push file")
 var pushFile = flag.String("pf", "etc/push.yaml", "the push file")
 var Push config.Push
 var Push config.Push
-var AreaCodeMap map[string]interface{}
+var AreaCodeMap map[string]string
 
 
 var (
 var (
 	MgoBidding        mongodb.MongodbSim
 	MgoBidding        mongodb.MongodbSim

+ 2 - 2
api/internal/service/employService.go

@@ -280,9 +280,9 @@ func infoFind(id string, v1 string) map[string]interface{} {
 		//省份代码处理
 		//省份代码处理
 		areaCode := ""
 		areaCode := ""
 		if MC.AreaCodeMap[city] != "" {
 		if MC.AreaCodeMap[city] != "" {
-			areaCode = gconv.String(MC.AreaCodeMap[city])
+			areaCode = MC.AreaCodeMap[city]
 		} else {
 		} else {
-			areaCode = gconv.String(MC.AreaCodeMap[area])
+			areaCode = MC.AreaCodeMap[area]
 		}
 		}
 		data["area_code"] = areaCode
 		data["area_code"] = areaCode
 		data["subtype"] = obj["subtype"]
 		data["subtype"] = obj["subtype"]