修复可能产生数据库锁死的事务错误
修复菜单参数无法修改的错误
This commit is contained in:
@@ -46,7 +46,7 @@ func AutoCreateApi(api model.SysApi) (err error) {
|
||||
fxErr := tx.Where("path = ? AND method = ?", api.Path, api.Method).First(&fApi).Error
|
||||
if errors.Is(fxErr, gorm.ErrRecordNotFound) {
|
||||
txErr = tx.Create(&api).Error
|
||||
if txErr != nil{
|
||||
if txErr != nil {
|
||||
return txErr
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user