feat: 去掉 model.database
This commit is contained in:

committed by
zhengkunwang223

parent
5f9f728d13
commit
24f61b0a4e
@@ -3,6 +3,7 @@ package service
|
||||
import (
|
||||
"bufio"
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -272,7 +273,7 @@ func (u *MysqlService) Create(mysqlDto dto.MysqlDBCreate) error {
|
||||
if err := excuteSql(app.ContainerName, app.Password, grantStr); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := mysqlRepo.Create(&mysql); err != nil {
|
||||
if err := mysqlRepo.Create(context.TODO(), &mysql); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@@ -336,7 +337,7 @@ func (u *MysqlService) Delete(name string, ids []uint) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
_ = mysqlRepo.Delete(commonRepo.WithByID(db.ID))
|
||||
_ = mysqlRepo.Delete(context.Background(), commonRepo.WithByID(db.ID))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user