调整微信扫码登录相关接口,拆分门店奖励:奖励类型、奖励详情

This commit is contained in:
2025-06-03 11:06:00 +08:00
parent ea87bc829e
commit fdc9cc3463
37 changed files with 698 additions and 189 deletions

View File

@ -10,17 +10,14 @@ import (
// Admins is the golang structure for table admins.
type Admins struct {
Id int64 `json:"id" orm:"id" description:"管理员ID"` // 管理员ID
Username string `json:"username" orm:"username" description:"管理员用户名"` // 管理员用户名
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
RealName string `json:"realName" orm:"real_name" description:"真实姓名"` // 真实姓名
Phone string `json:"phone" orm:"phone" description:"手机号"` // 手机号
Email string `json:"email" orm:"email" description:"邮箱"` // 邮箱
Role int `json:"role" orm:"role" description:"角色1=超级管理员2=运营管理员3=客服管理员4=财务管理员"` // 角色1=超级管理员2=运营管理员3=客服管理员4=财务管理员
Status int `json:"status" orm:"status" description:"状态1=正常2=禁用"` // 状态1=正常2=禁用
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at" description:"最后登录时间"` // 最后登录时间
LastLoginIp string `json:"lastLoginIp" orm:"last_login_ip" description:"最后登录IP"` // 最后登录IP
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
Id int64 `json:"id" orm:"id" description:"管理员ID"` // 管理员ID
Username string `json:"username" orm:"username" description:"管理员用户名"` // 管理员用户名
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
RealName string `json:"realName" orm:"real_name" description:"真实姓名"` // 真实姓名
Phone string `json:"phone" orm:"phone" description:"手机号"` // 手机号
Email string `json:"email" orm:"email" description:"邮箱"` // 邮箱
Status int `json:"status" orm:"status" description:"状态1=正常2=禁用"` // 状态1=正常2=禁用
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
}

View File

@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// RewardTypes is the golang structure for table reward_types.
type RewardTypes struct {
Id int64 `json:"id" orm:"id" description:"类型ID"` // 类型ID
Name string `json:"name" orm:"name" description:"类型名称"` // 类型名称
Code string `json:"code" orm:"code" description:"类型编码"` // 类型编码
Description string `json:"description" orm:"description" description:"类型描述"` // 类型描述
Status int `json:"status" orm:"status" description:"状态1=启用2=禁用"` // 状态1=启用2=禁用
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
}

View File

@ -10,14 +10,14 @@ import (
// StoreRewards is the golang structure for table store_rewards.
type StoreRewards struct {
Id int64 `json:"id" orm:"id" description:"门店奖励ID"` // 门店奖励ID
StoreId int64 `json:"storeId" orm:"store_id" description:"所属门店ID"` // 所属门店ID
RewardType int `json:"rewardType" orm:"reward_type" description:"奖励类型1=积分2=优惠券3=商品4=抽奖券"` // 奖励类型1=积分2=优惠券3=商品4=抽奖券
RewardName string `json:"rewardName" orm:"reward_name" description:"奖励名称"` // 奖励名称
Amount int `json:"amount" orm:"amount" description:"奖励数量"` // 奖励数量
Total int `json:"total" orm:"total" description:"该奖励总库存NULL 表示无限)"` // 该奖励总库存NULL 表示无限)
MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"所属商户ID"` // 所属商户ID
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
Id int64 `json:"id" orm:"id" description:"门店奖励ID"` // 门店奖励ID
StoreId int64 `json:"storeId" orm:"store_id" description:"所属门店ID"` // 所属门店ID
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID"` // 奖励类型ID
RewardName string `json:"rewardName" orm:"reward_name" description:"奖励名称"` // 奖励名称
Amount int `json:"amount" orm:"amount" description:"奖励数量"` // 奖励数量
Total int `json:"total" orm:"total" description:"该奖励总库存NULL 表示无限)"` // 该奖励总库存NULL 表示无限)
MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"所属商户ID"` // 所属商户ID
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
}

View File

@ -10,17 +10,15 @@ import (
// UserLoginRecords is the golang structure for table user_login_records.
type UserLoginRecords struct {
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
StoreId int64 `json:"storeId" orm:"store_id" description:"登录门店ID"` // 登录门店ID
MerchantId int64 `json:"merchantId" orm:"merchant_id" description:"所属商户ID"` // 所属商户ID
LoginIp string `json:"loginIp" orm:"login_ip" description:"登录IP地址"` // 登录IP地址
LoginDevice string `json:"loginDevice" orm:"login_device" description:"登录设备信息"` // 登录设备信息
LoginPlatform int `json:"loginPlatform" orm:"login_platform" description:"登录平台1=Web2=iOS3=Android4=微信小程序5=支付宝小程序6=其他"` // 登录平台1=Web2=iOS3=Android4=微信小程序5=支付宝小程序6=其他
LoginType int `json:"loginType" orm:"login_type" description:"登录方式1=微信2=手机号3=账号密码4=其他"` // 登录方式1=微信2=手机号3=账号密码4=其他
LoginStatus int `json:"loginStatus" orm:"login_status" description:"登录状态1=成功2=失败"` // 登录状态1=成功2=失败
FailReason string `json:"failReason" orm:"fail_reason" description:"失败原因"` // 失败原因
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"登录时间"` // 登录时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
Id int64 `json:"id" orm:"id" description:"记录ID"` // 记录ID
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
StoreId int64 `json:"storeId" orm:"store_id" description:"登录门店ID"` // 登录门店ID
LoginIp string `json:"loginIp" orm:"login_ip" description:"登录IP地址"` // 登录IP地址
LoginPlatform int `json:"loginPlatform" orm:"login_platform" description:"登录平台1=PC"` // 登录平台1=PC
LoginType int `json:"loginType" orm:"login_type" description:"登录方式1=微信2=手机号3=账号密码4=其他"` // 登录方式1=微信2=手机号3=账号密码4=其他
LoginStatus int `json:"loginStatus" orm:"login_status" description:"登录状态1=成功2=失败"` // 登录状态1=成功2=失败
FailReason string `json:"failReason" orm:"fail_reason" description:"失败原因"` // 失败原因
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"登录时间"` // 登录时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
}