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) {
|
||||
|
||||
+7
-6
@@ -97,18 +97,19 @@ var (
|
||||
ErrorAuthority = Status{Code: 10007, Msg: "没有权限"}
|
||||
ErrorNoLoginInfo = Status{Code: 10008, Msg: "没有获取到登录信息"}
|
||||
ErrorAuthorityChange = Status{Code: 10009, Msg: "该权限下有其它权限"}
|
||||
ErrorJsonDataError = Status{Code: 11000, Msg: "json数据错误"}
|
||||
|
||||
ErrorJsonDataError = Status{Code: 10010, Msg: "json数据错误"}
|
||||
ErrorVerifyReview = Status{Code: 10011, Msg: "不能重复审核"}
|
||||
ErrorOrderOver = Status{Code: 11012, Msg: "订单已完结"}
|
||||
// 数据类
|
||||
ErrorDataIsExist = Status{Code: 11004, Msg: "数据已存在"}
|
||||
|
||||
// 参数类
|
||||
ErrorReasonParams = Status{Code: 10001, Msg: "原因不能为空"}
|
||||
ErrorMobileError = Status{Code: 10009, Msg: "手机号格式错误"}
|
||||
ErrorReasonParams = Status{Code: 10012, Msg: "原因不能为空"}
|
||||
ErrorMobileError = Status{Code: 10013, Msg: "手机号格式错误"}
|
||||
|
||||
// ErrorNotFund 数据类
|
||||
ErrorFormatDataError = Status{Code: 11010, Msg: "格式化数据出错"}
|
||||
ErrorStockNotEnough = Status{Code: 11014, Msg: "库存不足"}
|
||||
ErrorFormatDataError = Status{Code: 11014, Msg: "格式化数据出错"}
|
||||
ErrorStockNotEnough = Status{Code: 11015, Msg: "库存不足"}
|
||||
|
||||
// ——————————————————————————————————————————————————————————————————————————————————————
|
||||
|
||||
|
||||
Reference in New Issue
Block a user