|
|
@@ -28,7 +28,7 @@ func WriteLog(dbExecutor database.Executor, dbSchema string, operate string, obj
|
|
|
|
|
|
now := time.Now().Local()
|
|
|
|
|
|
- for _, object := range objects {
|
|
|
+ for i, object := range objects {
|
|
|
objectInfo := object.ObjectInfo()
|
|
|
operatorInfo := object.OperatorInfo()
|
|
|
content := object.LogContent()
|
|
|
@@ -38,7 +38,7 @@ func WriteLog(dbExecutor database.Executor, dbSchema string, operate string, obj
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
- vs = append(vs, ValueObject{
|
|
|
+ vs[i] = ValueObject{
|
|
|
Resource: objectInfo.Resource,
|
|
|
ResourceID: objectInfo.ResourceID,
|
|
|
Operate: operate,
|
|
|
@@ -46,7 +46,7 @@ func WriteLog(dbExecutor database.Executor, dbSchema string, operate string, obj
|
|
|
OperatorName: operatorInfo.OperatorName,
|
|
|
OperateTime: now,
|
|
|
Content: string(jsonContent),
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
err := database.InsertEntity(dbExecutor, domain.TableName(dbSchema, &ValueObject{}), vs)
|