This commit is contained in:
xiangheng
2024-05-19 01:29:52 +08:00
parent 852cc87152
commit 79011609ba
32 changed files with 264 additions and 319 deletions

View File

@@ -19,18 +19,18 @@ export function {{{.ModuleName}}}_detail(params: Record<string, any>) {
}
// {{{.FunctionName}}}新增
export function {{{.ModuleName}}}_add(params: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/add', params })
export function {{{.ModuleName}}}_add(data: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/add', data })
}
// {{{.FunctionName}}}编辑
export function {{{.ModuleName}}}_edit(params: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/edit', params })
export function {{{.ModuleName}}}_edit(data: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/edit', data })
}
// {{{.FunctionName}}}删除
export function {{{.ModuleName}}}_delete(params: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/del', params })
export function {{{.ModuleName}}}_delete(data: Record<string, any>) {
return request.post({ url: '/{{{.ModuleName}}}/del', data })
}
// {{{.FunctionName}}}导入

View File

@@ -23,25 +23,25 @@ type MonitorWebDetailReq struct {
//MonitorWebAddReq 错误收集error新增参数
type MonitorWebAddReq struct {
ProjectKey string `form:"projectKey"` // 项目key
ClientId string `form:"clientId"` // sdk生成的客户端id
EventType string `form:"eventType"` // 事件类型
Page string `form:"page"` // URL地址
Message string `form:"message"` // 错误消息
Stack string `form:"stack"` // 错误堆栈
ClientTime string `form:"clientTime"` // 客户端时间
ProjectKey string `form:"projectKey"` // 项目key
ClientId string `form:"clientId"` // sdk生成的客户端id
EventType string `form:"eventType"` // 事件类型
Page string `form:"page"` // URL地址
Message string `form:"message"` // 错误消息
Stack string `form:"stack"` // 错误堆栈
ClientTime core.TsTime `form:"clientTime"` // 客户端时间
}
//MonitorWebEditReq 错误收集error编辑参数
type MonitorWebEditReq struct {
Id int `form:"id"` // uuid
ProjectKey string `form:"projectKey"` // 项目key
ClientId string `form:"clientId"` // sdk生成的客户端id
EventType string `form:"eventType"` // 事件类型
Page string `form:"page"` // URL地址
Message string `form:"message"` // 错误消息
Stack string `form:"stack"` // 错误堆栈
ClientTime string `form:"clientTime"` // 客户端时间
Id int `form:"id"` // uuid
ProjectKey string `form:"projectKey"` // 项目key
ClientId string `form:"clientId"` // sdk生成的客户端id
EventType string `form:"eventType"` // 事件类型
Page string `form:"page"` // URL地址
Message string `form:"message"` // 错误消息
Stack string `form:"stack"` // 错误堆栈
ClientTime core.TsTime `form:"clientTime"` // 客户端时间
}
//MonitorWebDelReq 错误收集error新增参数

View File

@@ -94,9 +94,9 @@ func (loginSrv systemLoginService) Login(c *gin.Context, req *SystemLoginReq) (r
util.RedisUtil.Set(config.AdminConfig.BackstageTokenKey+token, adminIdStr, 7200)
admin.Service.CacheAdminUserByUid(sysAdmin.ID)
u := system_model.SystemAuthAdmin{LastLoginIp: c.ClientIP(), LastLoginTime: core.NowTime()}
// 更新登录信息
err = loginSrv.db.Model(&sysAdmin).Updates(
system_model.SystemAuthAdmin{LastLoginIp: c.ClientIP(), LastLoginTime: core.NowTime()}).Error
err = loginSrv.db.Model(&sysAdmin).Updates(u).Error
if err != nil {
if e = loginSrv.RecordLoginLog(c, sysAdmin.ID, req.Username, response.SystemError.Msg()); e != nil {
return