|
@@ -112,7 +112,7 @@ func export(table string, tableColumn []string, key []interface{}, timeStr strin
|
|
fileCounter++
|
|
fileCounter++
|
|
pathArr = append(pathArr, path)
|
|
pathArr = append(pathArr, path)
|
|
}
|
|
}
|
|
- dataHandle(writer, l, a, tableColumn)
|
|
|
|
|
|
+ dataHandle(writer, l, a+1, tableColumn)
|
|
a++
|
|
a++
|
|
return true
|
|
return true
|
|
}, sqlStr)
|
|
}, sqlStr)
|
|
@@ -137,7 +137,7 @@ func dataHandle(writer *excelize.StreamWriter, l *[]map[string]interface{}, a in
|
|
|
|
|
|
// 入excel
|
|
// 入excel
|
|
func Warehousing(writer *excelize.StreamWriter, file *excelize.File, fileCounter int, key []interface{}, path, timeStr string) (*excelize.StreamWriter, *excelize.File, string) {
|
|
func Warehousing(writer *excelize.StreamWriter, file *excelize.File, fileCounter int, key []interface{}, path, timeStr string) (*excelize.StreamWriter, *excelize.File, string) {
|
|
- log.Println(fmt.Sprintf("开始第%d数据", fileCounter))
|
|
|
|
|
|
+ log.Println(fmt.Sprintf("开始第%d个文件数据", fileCounter))
|
|
writer.Flush()
|
|
writer.Flush()
|
|
folderPath := fmt.Sprintf("%s/%s", path, timeStr)
|
|
folderPath := fmt.Sprintf("%s/%s", path, timeStr)
|
|
_, err := os.Stat(folderPath)
|
|
_, err := os.Stat(folderPath)
|
|
@@ -312,7 +312,7 @@ func exportA(sql, path, timeStr string, key []interface{}) []string {
|
|
fileCounter++
|
|
fileCounter++
|
|
pathArr = append(pathArr, fpath)
|
|
pathArr = append(pathArr, fpath)
|
|
}
|
|
}
|
|
- dataHandle(writer, l, a, common.ObjArrToStringArr(key))
|
|
|
|
|
|
+ dataHandle(writer, l, a+1, common.ObjArrToStringArr(key))
|
|
a++
|
|
a++
|
|
return true
|
|
return true
|
|
}, sql)
|
|
}, sql)
|