func transList(oItemDef itemDef.ItemDef, resultMaps []map[string]interface{}) []map[string]interface{} { if len(resultMaps) < 0 { return resultMaps } retList := make([]map[string]interface{}, len(resultMaps)) neetTransMap := oItemDef.GetNeedTrans() for idx, oldMap := range resultMaps { var retMap = make(map[string]interface{}, len(oldMap)) for key, value := range oldMap { if _, ok := neetTransMap[key]; ok { retMap[key] = lang.GetLabel(value.(string)) } else { retMap[key] = value } } retList[idx] = retMap } return retList }