Compare commits
No commits in common. "91b8ac78e8c8cf61dd058bf1939d7765ca9c6577" and "8dbbe69e74a5bcdf2694ee456dd802b56bc6e770" have entirely different histories.
91b8ac78e8
...
8dbbe69e74
@ -183,10 +183,10 @@ func ExportRegister(c *gin.Context) {
|
|||||||
temp = append(temp, v.UpdatedAt)
|
temp = append(temp, v.UpdatedAt)
|
||||||
data = append(data, &temp)
|
data = append(data, &temp)
|
||||||
}
|
}
|
||||||
_, err = utils.ToExcelByType(columns, data, "slice", filePath)
|
_, _ = utils.ToExcelByType(columns, data, "slice", filePath)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
// response.ResponseQuickMsg(c, msg.Fail, err.Error(), nil)
|
||||||
}
|
// }
|
||||||
//处理图片
|
//处理图片
|
||||||
// err = logic.DealExcelImg(filePath)
|
// err = logic.DealExcelImg(filePath)
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -84,12 +83,6 @@ func ToExcelByType(titleList []string, dataList []interface{}, dataType string,
|
|||||||
_ = file.Write(&buffer)
|
_ = file.Write(&buffer)
|
||||||
fmt.Println("=======================Save============================")
|
fmt.Println("=======================Save============================")
|
||||||
if filePath != "" {
|
if filePath != "" {
|
||||||
dir := filepath.Dir(filePath)
|
|
||||||
if err = CreateDirPath(dir); err != nil {
|
|
||||||
// 新增错误日志记录
|
|
||||||
logger.Errorf("目录创建失败: %v", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err = file.Save(filePath); err != nil {
|
if err = file.Save(filePath); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user