fix 修复websocket在某些情况下不重连问题

fix 修复登录日志查看权限
feat 访问日志增加接口信息显示
perf 为所有orm的Insert操作增加OmitEmptyData选项
This commit is contained in:
孟帅
2024-04-24 23:25:29 +08:00
parent 269b2f9e43
commit dc20a86b33
57 changed files with 622 additions and 401 deletions

View File

@@ -147,7 +147,7 @@ type MemberAddInp struct {
}
func (in *MemberEditInp) Filter(ctx context.Context) (err error) {
if in.Password != "" {
if in.Id < 1 || in.Password != "" {
if err := g.Validator().
Rules("length:6,16").
Messages("新密码不能为空#新密码需在6~16之间").

View File

@@ -14,20 +14,25 @@ import (
type LogListInp struct {
form.PageReq
form.StatusReq
ReqId string `json:"reqId" dc:"对外ID"`
Module string `json:"module" dc:"应用端口"`
MemberId int `json:"member_id" dc:"用户ID"`
TakeUpTime int `json:"take_up_time" dc:"请求耗时"`
MemberId int `json:"memberId" dc:"用户ID"`
TakeUpTime string `json:"takeUpTime" dc:"请求耗时"`
Method string `json:"method" dc:"请求方式"`
Url string `json:"url" dc:"请求路径"`
Ip string `json:"ip" dc:"访问IP"`
ErrorCode string `json:"error_code" dc:"状态码"`
CreatedAt []int64 `json:"created_at" dc:"创建时间"`
ErrorCode string `json:"errorCode" dc:"状态码"`
CreatedAt []int64 `json:"createdAt" dc:"创建时间"`
}
type LogListModel struct {
entity.SysLog
MemberName string `json:"memberName"`
Region string `json:"region"`
MemberName string `json:"memberName"`
Region string `json:"region"`
CityLabel string `json:"cityLabel" dc:"城市标签"`
Tags string `json:"tags" dc:"接口所属的标签,用于接口分类"`
Summary string `json:"summary" dc:"接口/参数概要描述"`
Description string `json:"description" dc:"接口/参数详细描述"`
}
// LogViewInp 获取信息
@@ -37,7 +42,10 @@ type LogViewInp struct {
type LogViewModel struct {
entity.SysLog
CityLabel string `json:"cityLabel" description:"城市标签"`
CityLabel string `json:"cityLabel" dc:"城市标签"`
Tags string `json:"tags" dc:"接口所属的标签,用于接口分类"`
Summary string `json:"summary" dc:"接口/参数概要描述"`
Description string `json:"description" dc:"接口/参数详细描述"`
}
// LogDeleteInp 删除