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

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

@ -21,4 +21,5 @@ type Roles struct {
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间戳
IsDeletable interface{} // 是否可删除0=不可删除1=可删除
StoreId interface{} // 门店ID
}

View File

@ -26,4 +26,5 @@ type StoreAdmins struct {
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间戳
RoleId interface{} // 角色ID
StoreRoleId interface{} // 门店角色ID
}

View File

@ -0,0 +1,24 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// StoreDesktopSettings is the golang structure of table store_desktop_settings for DAO operations like Where/Data.
type StoreDesktopSettings struct {
g.Meta `orm:"table:store_desktop_settings, do:true"`
Id interface{} // 主键ID
StoreId interface{} // 门店ID
BackgroundUrl interface{} // 桌面背景图片URL
Resolution interface{} // 分辨率例如1920x1080
IsTopWidgetVisible interface{} // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible interface{} // 右侧组件是否显示FALSE=隐藏TRUE=显示
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间戳
}

View File

@ -0,0 +1,21 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// StoreRoles is the golang structure of table store_roles for DAO operations like Where/Data.
type StoreRoles struct {
g.Meta `orm:"table:store_roles, do:true"`
Id interface{} // 门店角色ID
StoreId interface{} // 所属门店ID
Name interface{} // 门店角色名称
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间戳
}

View File

@ -19,4 +19,5 @@ type Roles struct {
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
IsDeletable bool `json:"isDeletable" orm:"is_deletable" description:"是否可删除0=不可删除1=可删除"` // 是否可删除0=不可删除1=可删除
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID"` // 门店ID
}

View File

@ -24,4 +24,5 @@ type StoreAdmins struct {
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
StoreRoleId int64 `json:"storeRoleId" orm:"store_role_id" description:"门店角色ID"` // 门店角色ID
}

View File

@ -0,0 +1,22 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// StoreDesktopSettings is the golang structure for table store_desktop_settings.
type StoreDesktopSettings struct {
Id int64 `json:"id" orm:"id" description:"主键ID"` // 主键ID
StoreId int64 `json:"storeId" orm:"store_id" description:"门店ID"` // 门店ID
BackgroundUrl string `json:"backgroundUrl" orm:"background_url" description:"桌面背景图片URL"` // 桌面背景图片URL
Resolution string `json:"resolution" orm:"resolution" description:"分辨率例如1920x1080"` // 分辨率例如1920x1080
IsTopWidgetVisible int `json:"isTopWidgetVisible" orm:"is_top_widget_visible" description:"顶部组件是否显示FALSE=隐藏TRUE=显示"` // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible int `json:"isRightWidgetVisible" orm:"is_right_widget_visible" description:"右侧组件是否显示FALSE=隐藏TRUE=显示"` // 右侧组件是否显示FALSE=隐藏TRUE=显示
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,19 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// StoreRoles is the golang structure for table store_roles.
type StoreRoles struct {
Id int64 `json:"id" orm:"id" description:"门店角色ID"` // 门店角色ID
StoreId int64 `json:"storeId" orm:"store_id" description:"所属门店ID"` // 所属门店ID
Name string `json:"name" orm:"name" 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:"软删除时间戳"` // 软删除时间戳
}

View File

@ -16,3 +16,48 @@ type StoreAdminLoginIn struct {
type StoreAdminLoginOut struct {
Token string
}
type StoreAdminListIn struct {
Page int
Size int
StoreId int64
}
type StoreAdmin struct {
Id int64 `json:"id" orm:"id" dc:"门店管理员ID"`
StoreId int64 `json:"storeId" orm:"store_id" dc:"所属门店ID"`
Username string `json:"username" orm:"username" dc:"用户名"`
RealName string `json:"realName" orm:"real_name" dc:"真实姓名"`
Phone string `json:"phone" orm:"phone" dc:"手机号"`
Email string `json:"email" orm:"email" dc:"邮箱"`
IsPrimary bool `json:"isPrimary" orm:"is_primary" dc:"是否为主账号true=是false=否)"`
Status int `json:"status" orm:"status" dc:"状态1=正常2=禁用"`
StoreRoleId int64 `json:"storeRoleId" orm:"store_role_id" dc:"门店角色ID"`
StoreRoleName string `json:"storeRoleName" orm:"store_role_name" dc:"门店角色名称"`
}
type StoreAdminListOut struct {
List []StoreAdmin
Total int
}
type StoreAdminCreateIn struct {
StoreId int64
Username string
Password string
Phone string
StoreRoleId int
RealName string
}
type StoreAdminUpdateIn struct {
StoreAdminId int64
Phone string
StoreRoleId int
RealName string
}
type StoreAdminEditPasswordIn struct {
StoreAdminId int64
Password string
Password2 string
}
type StoreAdminDeleteIn struct {
StoreAdminId int64
}

View File

@ -0,0 +1,34 @@
package model
import "github.com/gogf/gf/v2/frame/g"
type StoreDesktopSettings struct {
g.Meta `orm:"table:store_desktop_settings"`
Id int64 `orm:"id" json:"id"` // 主键ID
StoreId int64 `orm:"store_id" json:"store_id"` // 门店ID
BackgroundUrl string `orm:"background_url" json:"background_url"` // 桌面背景图片URL
Resolution string `orm:"resolution" json:"resolution"` // 分辨率例如1920x1080
IsTopWidgetVisible bool `orm:"is_top_widget_visible" json:"is_top_widget_visible"` // 顶部组件是否显示FALSE=隐藏TRUE=显示
IsRightWidgetVisible bool `orm:"is_right_widget_visible" json:"is_right_widget_visible"` // 右侧组件是否显示FALSE=隐藏TRUE=显示
}
type StoreGetDesktopSettingIn struct {
OperatorId int64
OperatorRole string
StoreId int64
}
type StoreGetDesktopSettingOut struct {
StoreDesktopSettings
}
type SaveDesktopSettingIn struct {
Id int64
StoreId int64
BackgroundUrl string
Resolution string
IsTopWidgetVisible bool
IsRightWidgetVisible bool
}
type SaveDesktopSettingOut struct {
Id int64
}

View File

@ -0,0 +1,44 @@
package model
type StoreRoleCreateIn struct {
StoreId int64
Name string
}
type StoreRoleCreateOut struct {
Id int64 `json:"id"`
}
type StoreRoleUpdateIn struct {
Id int64
StoreID int64
Name string
}
type StoreRoleUpdateOut struct {
Success bool `json:"success"`
}
type StoreRoleDeleteIn struct {
Id int64
}
type StoreRoleDeleteOut struct {
Success bool `json:"success"`
}
type StoreRoleListIn struct {
StoreId int64
Page int
Size int
}
type StoreRoleListItem struct {
Id int64 `json:"id"`
StoreID int64 `json:"storeId"`
Name string `json:"name"`
}
type StoreRoleListOut struct {
Total int `json:"total"`
List []StoreRoleListItem `json:"list"`
}