更新oa的数据统计
This commit is contained in:
@@ -129,6 +129,7 @@ func (c *PlatformAuthController) LoginPlatform() {
|
||||
// 控制器只做 HTTP 解析与响应编排,业务逻辑放 services 层
|
||||
token, loginUser, err := services.PlatformAdminLogin(req.Account, req.Password)
|
||||
if err != nil {
|
||||
RecordLoginLog(nil, 0, req.Account, "", "", "password", 0, err.Error(), c.Ctx.Input.IP(), c.Ctx.Request.UserAgent())
|
||||
c.Data["json"] = map[string]interface{}{
|
||||
"code": 401,
|
||||
"msg": err.Error(),
|
||||
@@ -137,6 +138,8 @@ func (c *PlatformAuthController) LoginPlatform() {
|
||||
return
|
||||
}
|
||||
|
||||
RecordLoginLog(nil, loginUser.ID, loginUser.Account, loginUser.Name, "", "password", 1, "登录成功", c.Ctx.Input.IP(), c.Ctx.Request.UserAgent())
|
||||
|
||||
c.Data["json"] = map[string]interface{}{
|
||||
"code": 200,
|
||||
"msg": "登录成功",
|
||||
@@ -422,4 +425,3 @@ func (c *PlatformAuthController) SendResetCode() {
|
||||
}
|
||||
_ = c.ServeJSON()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user