作者 yangfu

返回头部数据

@@ -270,14 +270,12 @@ func (srv ExcelDataService) importResultWithHeader(headers []excel.DataField, fa @@ -270,14 +270,12 @@ func (srv ExcelDataService) importResultWithHeader(headers []excel.DataField, fa
270 fail := map[string]interface{}{ 270 fail := map[string]interface{}{
271 "body": failRows, 271 "body": failRows,
272 } 272 }
273 - var header = make([]map[string]string, 0) 273 + var header = make(map[string]string)
274 for i := 0; i < len(headers); i++ { 274 for i := 0; i < len(headers); i++ {
275 item := headers[i] 275 item := headers[i]
276 - header = append(header, map[string]string{  
277 - item.EnName: item.CnName,  
278 - }) 276 + header[item.EnName] = item.CnName
279 } 277 }
280 - //fail["header"] = header 278 + fail["header"] = header
281 result["fail"] = fail 279 result["fail"] = fail
282 } 280 }
283 return result 281 return result