diff --git a/model/gmodel/fs_pay_event_gen.go b/model/gmodel/fs_pay_event_gen.go new file mode 100644 index 00000000..38d6c56e --- /dev/null +++ b/model/gmodel/fs_pay_event_gen.go @@ -0,0 +1,25 @@ +package gmodel + +import ( + "gorm.io/gorm" +) + +// fs_pay_event 支付回调事件日志 +type FsPayEvent struct { + Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // + PayMethod *int64 `gorm:"default:0;" json:"pay_method"` // 支付方式 1 stripe 2 paypal + EventId *string `gorm:"default:'';" json:"event_id"` // 事件ID + EventType *string `gorm:"default:'';" json:"event_type"` // 事件类型 + EventData *string `gorm:"default:'';" json:"event_data"` // 事件数据 + EventCreated *int64 `gorm:"default:0;" json:"event_created"` // 事件时间 + Ip *string `gorm:"default:'';" json:"ip"` // 请求IP + CreatedAt *int64 `gorm:"default:0;" json:"created_at"` // 创建时间 +} +type FsPayEventModel struct { + db *gorm.DB + name string +} + +func NewFsPayEventModel(db *gorm.DB) *FsPayEventModel { + return &FsPayEventModel{db: db, name: "fs_pay_event"} +} diff --git a/model/gmodel/fs_resources_logic.go b/model/gmodel/fs_pay_event_logic.go similarity index 100% rename from model/gmodel/fs_resources_logic.go rename to model/gmodel/fs_pay_event_logic.go diff --git a/model/gmodel/fs_resources_gen.go b/model/gmodel/fs_resources_gen.go deleted file mode 100644 index 754a2f50..00000000 --- a/model/gmodel/fs_resources_gen.go +++ /dev/null @@ -1,27 +0,0 @@ -package gmodel - -import ( - "gorm.io/gorm" - "time" -) - -// fs_resources 资源表 -type FsResources struct { - ResourceId string `gorm:"primary_key;default:'';" json:"resource_id"` // 资源 ID - UserId *int64 `gorm:"index;default:0;" json:"user_id"` // 用户 ID - GuestId *int64 `gorm:"index;default:0;" json:"guest_id"` // 访客 ID - ResourceType *string `gorm:"index;default:'';" json:"resource_type"` // 资源类型 - ResourceUrl *string `gorm:"default:'';" json:"resource_url"` // 资源 URL - Version *string `gorm:"index;default:'0';" json:"version"` // 版本信息 - UploadedAt *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"uploaded_at"` // 上传时间 - Metadata *string `gorm:"default:'';" json:"metadata"` // 元数据,json格式,存储图像分率 - MetaKey1 *string `gorm:"index;default:'';" json:"meta_key1"` // 需要关键信息查询的自定义属性1,可以动态增加 -} -type FsResourcesModel struct { - db *gorm.DB - name string -} - -func NewFsResourcesModel(db *gorm.DB) *FsResourcesModel { - return &FsResourcesModel{db: db, name: "fs_resources"} -} diff --git a/server/websocket/internal/handler/thirdpartyloginnotifyhandler.go b/server/websocket/internal/handler/thirdpartyloginnotifyhandler.go index ae16b24c..2edcda0b 100644 --- a/server/websocket/internal/handler/thirdpartyloginnotifyhandler.go +++ b/server/websocket/internal/handler/thirdpartyloginnotifyhandler.go @@ -15,7 +15,7 @@ func ThirdPartyLoginNotifyHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req types.ThirdPartyLoginNotifyReq - userinfo, err := basic.RequestParse(w, r, svcCtx, &req) + userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req) if err != nil { return }