调整商户注册逻辑

This commit is contained in:
2025-06-11 10:24:48 +08:00
parent a3c6b20a04
commit efdbb21261
31 changed files with 310 additions and 302 deletions

View File

@ -11,21 +11,22 @@ import (
// Users is the golang structure of table users for DAO operations like Where/Data.
type Users struct {
g.Meta `orm:"table:users, do:true"`
Id interface{} // 用户唯一标识符
WxOpenId interface{} // 微信 OpenID
Username interface{} // 用户名
Nickname interface{} // 昵称
Avatar interface{} // 用户头像URL
PasswordHash interface{} // 密码哈希
Email interface{} // 邮箱地址
PhoneNumber interface{} // 手机号
WxPopenId interface{} // 微信 PopenID
QqPopenId interface{} // QQ PopenID
FirstVisitAt *gtime.Time // 首次访问时间
LastLoginAt *gtime.Time // 最后登录时间
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间
RoleId interface{} // 角色ID
g.Meta `orm:"table:users, do:true"`
Id interface{} // 用户唯一标识符
WxOpenId interface{} // 微信 OpenID
Username interface{} // 用户名
Nickname interface{} // 昵称
Avatar interface{} // 用户头像URL
PasswordHash interface{} // 密码哈希
Email interface{} // 邮箱地址
PhoneNumber interface{} // 手机号
WxPopenId interface{} // 微信 PopenID
QqPopenId interface{} // QQ PopenID
FirstVisitAt *gtime.Time // 首次访问时间
LastLoginAt *gtime.Time // 最后登录时间
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间
RoleId interface{} // 角色ID
LastLoginStoreId interface{} // 上次登录门店ID
}

View File

@ -10,20 +10,21 @@ import (
// Users is the golang structure for table users.
type Users struct {
Id int64 `json:"id" orm:"id" description:"用户唯一标识符"` // 用户唯一标识符
WxOpenId string `json:"wxOpenId" orm:"wx_open_id" description:"微信 OpenID"` // 微信 OpenID
Username string `json:"username" orm:"username" description:"用户名"` // 用户名
Nickname string `json:"nickname" orm:"nickname" description:"昵称"` // 昵称
Avatar string `json:"avatar" orm:"avatar" description:"用户头像URL"` // 用户头像URL
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
Email string `json:"email" orm:"email" description:"邮箱地址"` // 邮箱地址
PhoneNumber string `json:"phoneNumber" orm:"phone_number" description:"手机号"` // 手机号
WxPopenId string `json:"wxPopenId" orm:"wx_popen_id" description:"微信 PopenID"` // 微信 PopenID
QqPopenId string `json:"qqPopenId" orm:"qq_popen_id" description:"QQ PopenID"` // QQ PopenID
FirstVisitAt *gtime.Time `json:"firstVisitAt" orm:"first_visit_at" description:"首次访问时间"` // 首次访问时间
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at" 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:"软删除时间"` // 软删除时间
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` // 角色ID
Id int64 `json:"id" orm:"id" description:"用户唯一标识符"` // 用户唯一标识符
WxOpenId string `json:"wxOpenId" orm:"wx_open_id" description:"微信 OpenID"` // 微信 OpenID
Username string `json:"username" orm:"username" description:"用户名"` // 用户名
Nickname string `json:"nickname" orm:"nickname" description:"昵称"` // 昵称
Avatar string `json:"avatar" orm:"avatar" description:"用户头像URL"` // 用户头像URL
PasswordHash string `json:"passwordHash" orm:"password_hash" description:"密码哈希"` // 密码哈希
Email string `json:"email" orm:"email" description:"邮箱地址"` // 邮箱地址
PhoneNumber string `json:"phoneNumber" orm:"phone_number" description:"手机号"` // 手机号
WxPopenId string `json:"wxPopenId" orm:"wx_popen_id" description:"微信 PopenID"` // 微信 PopenID
QqPopenId string `json:"qqPopenId" orm:"qq_popen_id" description:"QQ PopenID"` // QQ PopenID
FirstVisitAt *gtime.Time `json:"firstVisitAt" orm:"first_visit_at" description:"首次访问时间"` // 首次访问时间
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at" 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:"软删除时间"` // 软删除时间
RoleId int64 `json:"roleId" orm:"role_id" description:"角色ID"` // 角色ID
LastLoginStoreId int64 `json:"lastLoginStoreId" orm:"last_login_store_id" description:"上次登录门店ID"` // 上次登录门店ID
}

View File

@ -19,7 +19,9 @@ type MerchantAdminInfoIn struct {
MerchantAdminId int64
}
type MerchantAdminInfoOut struct {
Name string
Username string
MerchantId int64
StoreId int64
}
type MerchantAdminCodeIn struct {
Phone string

View File

@ -8,21 +8,19 @@ import (
// User 用户信息
type User struct {
Id int64 `json:"id" orm:"id,primary"` // 用户ID
Username string `json:"username" orm:"username,not null"` // 用户名
PasswordHash string `json:"passwordHash" orm:"password_hash,not null"` // 密码哈希
Nickname string `json:"nickname" orm:"nickname"` // 昵称
Avatar string `json:"avatar" orm:"avatar"` // 头像
Phone string `json:"phone" orm:"phone"` // 手机号
Email string `json:"email" orm:"email"` // 邮箱
Gender int `json:"gender" orm:"gender,default:0"` // 性别0=未知1=男2=女
Birthday *gtime.Time `json:"birthday" orm:"birthday"` // 生日
Status int `json:"status" orm:"status,default:1"` // 状态1=正常2=禁用
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at"` // 最后登录时间
LastLoginIp string `json:"lastLoginIp" orm:"last_login_ip"` // 最后登录IP
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at"` // 软删除时间戳
Id int64 `json:"id" orm:"id,primary"` // 用户ID
Username string `json:"username" orm:"username,not null"` // 用户名
Nickname string `json:"nickname" orm:"nickname"` // 昵称
Avatar string `json:"avatar" orm:"avatar"` // 头像
Phone string `json:"phone" orm:"phone"` // 手机号
Email string `json:"email" orm:"email"` // 邮箱
Gender int `json:"gender" orm:"gender,default:0"` // 性别0=未知1=男2=女
Birthday *gtime.Time `json:"birthday" orm:"birthday"` // 生日
Status int `json:"status" orm:"status,default:1"` // 状态1=正常2=禁用
LastLoginAt *gtime.Time `json:"lastLoginAt" orm:"last_login_at"` // 最后登录时间
LastLoginIp string `json:"lastLoginIp" orm:"last_login_ip"` // 最后登录IP
LastLoginStoreId int `json:"lastLoginStoreId" orm:"last_login_store_id"` // 最后登录门店ID
LastLoginStoreName string `json:"lastLoginStoreName" orm:"last_login_store_name"` // 最后登录门店名称
}
// UserCreateIn 创建用户请求
@ -96,11 +94,11 @@ type UserBindPhoneOut struct {
}
type UserListIn struct {
OperatorId int64
Role string
Nickname string
Page int
Size int
OperatorId int64
OperatorRole string
Nickname string
Page int
Size int
}
type UserListOut struct {
List []User