new create admin order,express add company
This commit is contained in:
+10
-3
@@ -91,7 +91,11 @@ func SetActionLog(adminInfo UserInfo, info ActionAdd) {
|
||||
"old_content": info.OldContent,
|
||||
"new_content": info.NewContent,
|
||||
}
|
||||
jsonData, _ := jsoniter.Marshal(content)
|
||||
jsonData, jerr := jsoniter.Marshal(content)
|
||||
if jerr != nil {
|
||||
logx.Errorf("marshal content failed: %v", jerr)
|
||||
return
|
||||
}
|
||||
log := ActionLog{
|
||||
Content: string(jsonData),
|
||||
AdminId: adminInfo.ID,
|
||||
@@ -111,8 +115,11 @@ func SetActionLog(adminInfo UserInfo, info ActionAdd) {
|
||||
logx.Errorf("marshal ActionLog failed: %v", err)
|
||||
return
|
||||
}
|
||||
logRedis.LogRedisClient.LPush(context.Background(), LogActionQueueKey, string(logJson)).Result()
|
||||
|
||||
_, rerr := logRedis.LogRedisClient.LPush(context.Background(), LogActionQueueKey, string(logJson)).Result()
|
||||
if rerr != nil {
|
||||
logx.Errorf("push ActionLog failed: %v", rerr)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func SetLoginLog(adminInfo UserInfo, status bool, reason string) {
|
||||
|
||||
Reference in New Issue
Block a user