Blame view

Lib/OperatorLog/operatorLog.go 447 Bytes
f56bf95d   aarongao   ..
1
2
3
4
package OperatorLog

import (
	"github.com/aarongao/tools"
483ade81   aarongao   v1.1
5
	"go.mongodb.org/mongo-driver/bson/primitive"
f56bf95d   aarongao   ..
6
7
8
9
10
	"letu/DB"
	"time"
)

func CreateOperatorLog(ScenicId string, user *DB.SMember, model *DB.SModel, api string, parames interface{}) {
483ade81   aarongao   v1.1
11
	id := primitive.NewObjectID()
f56bf95d   aarongao   ..
12
	DB.COperatorLog.InsertOne(tools.GetContext(), DB.SOperatorLog{
483ade81   aarongao   v1.1
13
		&id,
f56bf95d   aarongao   ..
14
15
16
17
18
19
20
21
22
23
		ScenicId,
		user.Id.Hex(),
		user.Username,
		time.Now().Unix(),
		"",
		*model,
		api,
		parames,
	})
}