mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
feat: 新增统一文件模块,统一文件操作
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"mayfly-go/pkg/utils/collx"
|
||||
"mayfly-go/pkg/utils/cryptox"
|
||||
"mayfly-go/pkg/utils/stringx"
|
||||
"mayfly-go/pkg/utils/writer"
|
||||
"mayfly-go/pkg/utils/writerx"
|
||||
"mayfly-go/pkg/ws"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -196,9 +196,6 @@ func (d *Db) ExecSqlFile(rc *req.Ctx) {
|
||||
|
||||
executedStatements++
|
||||
_, err = dbConn.Exec(sql)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
@@ -258,7 +255,7 @@ func (d *Db) DumpSql(rc *req.Ctx) {
|
||||
Tables: tables,
|
||||
DumpDDL: needStruct,
|
||||
DumpData: needData,
|
||||
Writer: writer.NewGzipWriter(rc.GetWriter()),
|
||||
Writer: writerx.NewGzipWriter(rc.GetWriter()),
|
||||
}))
|
||||
|
||||
rc.ReqParam = collx.Kvs("db", dbConn.Info, "database", dbName, "tables", tablesStr, "dumpType", dumpType)
|
||||
|
||||
Reference in New Issue
Block a user