mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-08 18:30:25 +08:00
refactor: code review
This commit is contained in:
@@ -3,6 +3,7 @@ package application
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"mayfly-go/internal/devops/domain/entity"
|
||||
"mayfly-go/internal/devops/domain/repository"
|
||||
"mayfly-go/internal/devops/infrastructure/persistence"
|
||||
@@ -89,7 +90,7 @@ func doUpdate(update *sqlparser.Update, dbInstance *DbInstance, dbSqlExec *entit
|
||||
}
|
||||
|
||||
// 获取表主键列名,排除使用别名
|
||||
primaryKey := dbInstance.GetPrimaryKey(tableName)
|
||||
primaryKey := dbInstance.GetMeta().GetPrimaryKey(tableName)
|
||||
|
||||
updateColumnsAndPrimaryKey := strings.Join(updateColumns, ",") + "," + primaryKey
|
||||
// 查询要更新字段数据的旧值,以及主键值
|
||||
|
||||
Reference in New Issue
Block a user