实现了门店员工、员工角色的接口开发

This commit is contained in:
2025-06-12 17:13:25 +08:00
parent fac2bd41b3
commit 80b1aa9b91
46 changed files with 1196 additions and 25 deletions

View File

@ -3,10 +3,61 @@ package v1
import "github.com/gogf/gf/v2/frame/g"
type InfoReq struct {
g.Meta `path:"/store/info" method:"get" tags:"StoreAdmin" summary:"(系统、商户门店后台)获取门店管理员信息"`
g.Meta `path:"/store/admin/info" method:"get" tags:"StoreAdmin" summary:"(系统、商户门店后台)获取门店管理员信息"`
}
type InfoRes struct {
Id int64 `json:"id"`
Username string `json:"username"`
}
type ListReq struct {
g.Meta `path:"/store/admin" method:"get" tags:"StoreAdmin" summary:"(系统、商户门店后台)门店管理员列表"`
Page int `json:"page" v:"required#页数不能为空"`
Size int `json:"size" v:"required#页大小不能为空"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空"`
}
type ListRes struct {
List interface{} `json:"list"`
Total int `json:"total"`
}
type CreateReq struct {
g.Meta `path:"/store/admin" method:"post" tags:"StoreAdmin" summary:"(系统、商户门店后台)创建门店管理员"`
Realname string `json:"realname" v:"required#真实姓名不能为空"`
StoreId int64 `json:"storeId" v:"required#门店ID不能为空"`
Username string `json:"username" v:"required#用户名不能为空"`
Password string `json:"password" v:"required#密码不能为空"`
Password2 string `json:"password2" v:"required#确认密码不能为空|same:password"`
Phone string `json:"phone" v:"required#手机号不能为空"`
StoreRoleId int `json:"storeRoleId" v:"required#角色ID不能为空"`
}
type CreateRes struct {
Id int64 `json:"id"`
}
type UpdateReq struct {
g.Meta `path:"/store/admin" method:"put" tags:"StoreAdmin" summary:"(系统、商户门店后台)更新门店管理员"`
Id int64 `json:"id" v:"required#门店管理员ID不能为空"`
Realname string `json:"realname" v:"required#真实姓名不能为空"`
StoreRoleId int `json:"storeRoleId" v:"required#角色ID不能为空"`
Phone string `json:"phone" v:"required#手机号不能为空"`
}
type UpdateRes struct {
Success bool `json:"success"`
}
type EditPasswordReq struct {
g.Meta `path:"/store/admin/password" method:"post" tags:"StoreAdmin" summary:"(系统、商户门店后台)修改门店管理员密码"`
Id int64 `json:"id" v:"required#门店管理员ID不能为空"`
OldPass string `json:"oldPass" v:"required#旧密码不能为空"`
NewPass string `json:"newPass" v:"required#新密码不能为空"`
}
type EditPasswordRes struct {
Success bool `json:"success"`
}
type DeleteReq struct {
g.Meta `path:"/store/admin/{id}" method:"delete" tags:"StoreAdmin" summary:"(系统、商户门店后台)删除门店管理员"`
Id int64 `in:"path" json:"id" v:"required#门店管理员ID不能为空"`
}
type DeleteRes struct {
Success bool `json:"success"`
}