提交 148dda02 authored 作者: mooncake9527's avatar mooncake9527

web log

上级 2df7d796
......@@ -119,7 +119,7 @@ func Init(schema string, isProd bool) {
func AddAsync(ctx context.Context, traceNo, operate string, req *entity.CopyHttpReq, rsp *entity.CopyHttpRsp) {
op := &WebLog{}
op.ID = xsf.GenerateID()
op.MerchantID = ctxUtils.GetCtxCompanyID(ctx)
op.CompanyID = ctxUtils.GetCtxCompanyID(ctx)
op.UserID = ctxUtils.GetCtxUID(ctx)
op.TraceID = ctxUtils.GetCtxTid(ctx)
op.Operate = operate
......@@ -155,7 +155,7 @@ func getUserType(c *gin.Context) int {
type WebLog struct {
ID xsf.ID `json:"id" form:"id" swaggertype:"string" gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement;comment:主键" example:"1000"` //主键
MerchantID xsf.ID `json:"merchantID" form:"merchantID" swaggertype:"string" gorm:"column:merchant_id;type:bigint(20) unsigned;comment:商户ID" example:"1008"` //商户ID
CompanyID xsf.ID `json:"companyID" form:"companyID" swaggertype:"string" gorm:"column:company_id;type:bigint(20) unsigned;comment:商户ID" example:"1008"` //商户ID
UserID xsf.ID `json:"userID" form:"userID" swaggertype:"string" gorm:"column:user_id;type:bigint(20) unsigned;comment:用户ID" example:"2008"` //用户ID
Operate string `json:"operate" form:"operate" gorm:"column:operate;type:varchar(128);comment:操作" example:"用户登出"` //操作
TraceID string `json:"traceID" form:"traceID" gorm:"column:trace_id;type:varchar(64);comment:溯源id" example:"TRACE_ID12345"` //溯源id
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论