|
@@ -213,21 +213,22 @@ func formatData(list *[]map[string]interface{}) *[]map[string]interface{} {
|
|
|
if list != nil {
|
|
|
for index, _ := range *list {
|
|
|
(*list)[index]["id"] = qutil.EncodeArticleId2ByCheck(qutil.ObjToString((*list)[index]["_id"]))
|
|
|
- //if shortname, ok := ((*list)[index]["company_shortname"]).(string); !ok || shortname == "" {
|
|
|
- // (*list)[index]["company_shortname"] = getCompanyShortName(qutil.ObjToString((*list)[index]["company_name"]))
|
|
|
- //}
|
|
|
+ if shortname, ok := ((*list)[index]["company_shortname"]).(string); !ok || shortname == "" {
|
|
|
+ (*list)[index]["company_shortname"] = getCompanyShortName(qutil.ObjToString((*list)[index]["company_name"]))
|
|
|
+ }
|
|
|
delete((*list)[index], "_id")
|
|
|
}
|
|
|
}
|
|
|
return list
|
|
|
}
|
|
|
|
|
|
-//func getCompanyShortName(entName string) string {
|
|
|
-// if entName == "" {
|
|
|
-// return ""
|
|
|
-// }
|
|
|
-// //去掉省、市、县、区、路
|
|
|
-//
|
|
|
-// //截取四个字符
|
|
|
-// return "shortName"
|
|
|
-//}
|
|
|
+//暂不处理前端处理
|
|
|
+func getCompanyShortName(entName string) string {
|
|
|
+ if entName == "" {
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ //去掉省、市、县、区、路
|
|
|
+
|
|
|
+ //截取四个字符
|
|
|
+ return ""
|
|
|
+}
|