Yi преди 1 година
родител
ревизия
0696ee6ba5

+ 12 - 0
backend/common/pagination.proto

@@ -0,0 +1,12 @@
+syntax = "proto3";
+
+package backend.common;
+
+option go_package = ".;commonPb";
+
+
+message PaginationModel {
+  int32 Page       = 1;
+  int32 PageSize   = 2;
+  int32 PageOffset = 3;
+}

+ 35 - 10
backend/operation/system.proto

@@ -13,8 +13,6 @@ message AddRoleRequest {
 }
 
 message SearchRoleRequest {
-  int32 page = 1;        // 第几页,从1开始
-  int32 page_size = 2;   // 每页size,一般为20
   string name = 3;       // 角色名称
 }
 
@@ -40,15 +38,42 @@ message UserAuth {
   string user_name = 1;   // 用户名称
   string password = 2;    // 用户密码
   string phone = 3;       // 用户手机号
-  int64  role_id  = 4;    // 用户角色id
-  string  role_name = 5;  // 用户角色名称
+  repeated UserRole roles  = 4;    // 用户角色
+  string employee_name = 5;    // 员工名称
+}
+
+message UserRole {
+  int64 id = 1;      // 角色id
+  string name = 2;   // 角色名称
 }
 
 message AddSystemUser {
-  int64 id = 1;           // 用户id
-  string name = 2;        // 用户名称
-  string phone = 3;       // 用户手机号
-  int64 role_id = 4;       // 角色id
-  IsShow.Kind is_show = 5;  // 是否开启
-  string employee_name = 6; // 员工姓名
+  int64 id = 1;                    // 用户id
+  string name = 2;                 // 用户名称
+  string phone = 3;                // 用户手机号
+  repeated UserRole roles = 4;      // 角色
+  IsShow.Kind is_show = 5;         // 是否开启
+  string employee_name = 6;        // 员工姓名
+  string create_user = 7;          // 创建人
+  int64 created_at = 8;            // 创建时间
+}
+
+// 查询用户
+message SearchUserRequest {
+  string name = 1;               // 用户名称
+  string employee_name = 2;       // 员工姓名
+  IsShow.Kind is_show = 3;        // 是否启用
+  int64 created_start_time = 4;   // 开始时间
+  int64 created_end_time = 5;     // 结束时间
+}
+
+message SearchUserResponse {
+  int32 page = 1;
+  int32 total = 2;
+  repeated AddSystemUser list = 3;
+}
+
+message EditIsShowSystemUserRequest {
+  int64 user_id = 1;  // 用户id
+  IsShow.Kind is_show = 2;   // is_show
 }

+ 3 - 3
http/handler/pasture/pasture.go

@@ -10,13 +10,13 @@ import (
 	"github.com/gin-gonic/gin"
 )
 
-func AddPasture(c *gin.Context) {
-	req := make([]*operationPb.AddPastureRequest, 0)
+func AddSystemPasture(c *gin.Context) {
+	var req operationPb.AddPastureRequest
 	if err := c.BindJSON(&req); err != nil {
 		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
 		return
 	}
-	if err := middleware.BackendOperation(c).OpsService.CreatePastureList(c, req); err != nil {
+	if err := middleware.BackendOperation(c).OpsService.CreatePasture(c, &req); err != nil {
 		apierr.ClassifiedAbort(c, err)
 		return
 	}

+ 2 - 2
http/handler/system/menu.go

@@ -12,12 +12,12 @@ import (
 
 func AddMenu(c *gin.Context) {
 
-	req := make([]*operationPb.AddRoleRequest, 0)
+	var req operationPb.AddRoleRequest
 	if err := c.BindJSON(&req); err != nil {
 		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
 		return
 	}
-	if err := middleware.BackendOperation(c).OpsService.CreateSystemRoleList(c, req); err != nil {
+	if err := middleware.BackendOperation(c).OpsService.CreateSystemRole(c, &req); err != nil {
 		apierr.ClassifiedAbort(c, err)
 		return
 	}

+ 1 - 1
http/handler/system/role.go

@@ -7,7 +7,7 @@ import (
 	"github.com/gin-gonic/gin"
 )
 
-func AddRole(c *gin.Context) {
+func AddSystemRole(c *gin.Context) {
 
 	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
 }

+ 108 - 19
http/handler/system/user.go

@@ -5,8 +5,10 @@ import (
 	"kpt-tmr-group/pkg/apierr"
 	"kpt-tmr-group/pkg/apiok"
 	"kpt-tmr-group/pkg/valid"
+	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"net/http"
+	"strconv"
 
 	"github.com/gin-gonic/gin"
 )
@@ -38,32 +40,26 @@ func Auth(c *gin.Context) {
 	c.JSON(http.StatusOK, apiok.CommonResponse(res))
 }
 
-func AddUser(c *gin.Context) {
-
-	req := make([]*operationPb.AddSystemUser, 0)
+func AddSystemUser(c *gin.Context) {
+	var req operationPb.AddSystemUser
 	if err := c.BindJSON(&req); err != nil {
 		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
 		return
 	}
 
-	for _, field := range req {
-		validate := func() error {
-			return valid.ValidateStruct(&field,
-				valid.Field(&field.Name, valid.Required),
-				valid.Field(&field.Phone, valid.Required),
-				valid.Field(&field.EmployeeName, valid.Required),
-				valid.Field(&field.RoleId, valid.Required),
-				valid.Field(&field.IsShow, valid.Max(2), valid.Min(0)),
-			)
-		}
-		if err := validate(); err != nil {
-			apierr.AbortBadRequest(c, http.StatusBadRequest, err)
-			return
-		}
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.Name, valid.Required),
+		valid.Field(&req.Phone, valid.Required),
+		valid.Field(&req.EmployeeName, valid.Required),
+		valid.Field(&req.Roles, valid.NotNil),
+		valid.Field(&req.IsShow, valid.Max(2), valid.Min(1)),
+		valid.Field(&req.CreateUser, valid.Required),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
 	}
 
-	err := middleware.Dependency(c).StoreEventHub.OpsService.CreateSystemUser(c, req)
-	if err != nil {
+	if err := middleware.Dependency(c).StoreEventHub.OpsService.CreateSystemUser(c, &req); err != nil {
 		apierr.ClassifiedAbort(c, err)
 		return
 	}
@@ -84,3 +80,96 @@ func GetUserInfo(c *gin.Context) {
 
 	c.JSON(http.StatusOK, apiok.CommonResponse(res))
 }
+
+func SearchSystemUserList(c *gin.Context) {
+	var req operationPb.SearchUserRequest
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.IsShow, valid.Max(2), valid.Min(1)),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	pagination := &commonPb.PaginationModel{
+		Page:       int32(c.GetInt(middleware.Page)),
+		PageSize:   int32(c.GetInt(middleware.PageSize)),
+		PageOffset: int32(c.GetInt(middleware.PageOffset)),
+	}
+
+	res, err := middleware.Dependency(c).StoreEventHub.OpsService.SearchSystemUserList(c, &req, pagination)
+	if err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(res))
+}
+
+func EditSystemUser(c *gin.Context) {
+	var req operationPb.AddSystemUser
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.Id, valid.Required, valid.Min(1)),
+		valid.Field(&req.Name, valid.Required),
+		valid.Field(&req.Phone, valid.Required),
+		valid.Field(&req.EmployeeName, valid.Required),
+		valid.Field(&req.Roles, valid.Required),
+		valid.Field(&req.CreateUser, valid.Required),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.Dependency(c).StoreEventHub.OpsService.EditSystemUser(c, &req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
+}
+
+func DeleteUser(c *gin.Context) {
+	userIdStr := c.Param("user_id")
+	userId, _ := strconv.Atoi(userIdStr)
+
+	if err := valid.Validate(userId, valid.Required, valid.Min(1)); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+
+	if err := middleware.BackendOperation(c).OpsService.DeleteSystemUser(c, int64(userId)); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+
+	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
+}
+
+func IsShowSystemUser(c *gin.Context) {
+	var req operationPb.EditIsShowSystemUserRequest
+	if err := c.BindJSON(&req); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := valid.ValidateStruct(&req,
+		valid.Field(&req.UserId, valid.Required, valid.Min(1)),
+		valid.Field(&req.IsShow, valid.Required, valid.Min(1), valid.Max(2)),
+	); err != nil {
+		apierr.AbortBadRequest(c, http.StatusBadRequest, err)
+		return
+	}
+
+	if err := middleware.Dependency(c).StoreEventHub.OpsService.IsShowSystemUser(c, &req); err != nil {
+		apierr.ClassifiedAbort(c, err)
+		return
+	}
+	c.JSON(http.StatusOK, apiok.CommonResponse(apiok.NewApiOk(true)))
+}

+ 7 - 4
http/route/app_api.go

@@ -24,13 +24,16 @@ func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 		// system API 组
 		lingoRoute := authRouteGroup(s, "/api/v1/system/")
 		lingoRoute.POST("/user_info", system.GetUserInfo)
-		lingoRoute.POST("/user/add", system.AddUser)
-		lingoRoute.POST("/user/list", system.AddUser)
+		lingoRoute.POST("/user/add", system.AddSystemUser)
+		lingoRoute.POST("/user/list", system.SearchSystemUserList)
+		lingoRoute.POST("/user/edit", system.EditSystemUser)
+		lingoRoute.POST("/user/is_show", system.IsShowSystemUser)
+		lingoRoute.DELETE("/user/:user_id", system.DeleteUser)
 
-		lingoRoute.POST("/role/add", system.AddRole)
+		lingoRoute.POST("/role/add", system.AddSystemRole)
 
 		// 牧场管理
-		lingoRoute.POST("/pasture/add", pasture.AddPasture)
+		lingoRoute.POST("/pasture/add", pasture.AddSystemPasture)
 		lingoRoute.POST("/pasture/list", pasture.SearchPastureList)
 	}
 }

+ 9 - 12
model/group_pasture.go

@@ -23,19 +23,16 @@ func (s *GroupPasture) TableName() string {
 
 const InitManagerPassword = "123456"
 
-func NewGroupPastureList(reqs []*operationPb.AddPastureRequest) []*GroupPasture {
-	groupPastureList := make([]*GroupPasture, len(reqs))
-	for k, pasture := range reqs {
-		groupPastureList[k] = &GroupPasture{
-			Name:            pasture.Name,
-			ManagerUser:     pasture.ManagerUser,
-			ManagerPassword: tool.Md5String(InitManagerPassword),
-			ManagerPhone:    pasture.ManagerPhone,
-			IsShow:          operationPb.IsShow_OK,
-			Address:         pasture.Address,
-		}
+func NewGroupPasture(req *operationPb.AddPastureRequest) *GroupPasture {
+	groupPasture := &GroupPasture{
+		Name:            req.Name,
+		ManagerUser:     req.ManagerUser,
+		ManagerPassword: tool.Md5String(InitManagerPassword),
+		ManagerPhone:    req.ManagerPhone,
+		IsShow:          operationPb.IsShow_OK,
+		Address:         req.Address,
 	}
-	return groupPastureList
+	return groupPasture
 }
 
 type GroupPastureSlice []*GroupPasture

+ 6 - 9
model/system_role.go

@@ -20,14 +20,11 @@ func (s *SystemRole) TableName() string {
 	return "system_role"
 }
 
-func NewSystemRoleList(reqs []*operationPb.AddRoleRequest) []*SystemRole {
-	systemRoleList := make([]*SystemRole, len(reqs))
-	for k, role := range reqs {
-		systemRoleList[k] = &SystemRole{
-			Name:    role.Name,
-			Remarks: role.Remarks,
-			IsShow:  operationPb.IsShow_OK,
-		}
+func NewSystemRole(req *operationPb.AddRoleRequest) *SystemRole {
+	systemRole := &SystemRole{
+		Name:    req.Name,
+		Remarks: req.Remarks,
+		IsShow:  operationPb.IsShow_OK,
 	}
-	return systemRoleList
+	return systemRole
 }

+ 68 - 16
model/system_user.go

@@ -5,28 +5,80 @@ import (
 )
 
 type SystemUser struct {
-	Id         int64                   `json:"id,omitempty"`
-	Name       string                  `json:"name,omitempty"`
-	Phone      string                  `json:"phone"`
-	Password   string                  `json:"password"`
-	RoleId     int64                   `json:"role_id,omitempty"`
-	RoleName   string                  `json:"role_name,omitempty"`
-	CreateUser string                  `json:"create_user,omitempty"`
-	IsShow     operationPb.IsShow_Kind `json:"is_show,omitempty"`
-	CreatedAt  int64                   `json:"created_at,omitempty"`
-	UpdatedAt  int64                   `json:"updated_at,omitempty"`
+	Id           int64                   `json:"id"`
+	Name         string                  `json:"name"`
+	EmployeeName string                  `json:"employee_name"`
+	Phone        string                  `json:"phone"`
+	Password     string                  `json:"password"`
+	RoleIds      string                  `json:"role_ids"`
+	CreateUser   string                  `json:"create_user"`
+	IsShow       operationPb.IsShow_Kind `json:"is_show"`
+	IsDelete     operationPb.IsShow_Kind `json:"is_delete"`
+	CreatedAt    int64                   `json:"created_at"`
+	UpdatedAt    int64                   `json:"updated_at"`
 }
 
 func (s *SystemUser) TableName() string {
 	return "system_user"
 }
 
-func (s *SystemUser) SystemUserFormat() *operationPb.UserAuth {
+func (s *SystemUser) SystemUserFormat(userRoles []*SystemRole) *operationPb.UserAuth {
+	roles := make([]*operationPb.UserRole, len(userRoles))
+	for k, v := range userRoles {
+		roles[k] = &operationPb.UserRole{
+			Id:   v.Id,
+			Name: v.Name,
+		}
+	}
+
 	return &operationPb.UserAuth{
-		UserName: s.Name,
-		Password: s.Password,
-		Phone:    s.Phone,
-		RoleId:   s.RoleId,
-		RoleName: s.RoleName,
+		UserName:     s.Name,
+		Phone:        s.Phone,
+		EmployeeName: s.EmployeeName,
+		Roles:        roles,
+	}
+}
+
+type SystemUserSlice []*SystemUser
+
+func (s SystemUserSlice) ToPB() []*operationPb.AddSystemUser {
+	res := make([]*operationPb.AddSystemUser, len(s))
+	for i, v := range s {
+		res[i] = &operationPb.AddSystemUser{
+			Id:           v.Id,
+			Name:         v.Name,
+			Phone:        v.Phone,
+			EmployeeName: v.EmployeeName,
+			CreateUser:   v.CreateUser,
+			IsShow:       v.IsShow,
+			CreatedAt:    v.CreatedAt,
+		}
+	}
+	return res
+}
+
+func (s *SystemUser) ToPb() *operationPb.AddSystemUser {
+	return &operationPb.AddSystemUser{
+		Id:           s.Id,
+		Name:         s.Name,
+		Phone:        s.Phone,
+		CreateUser:   s.CreateUser,
+		EmployeeName: s.EmployeeName,
+		IsShow:       s.IsShow,
+		CreatedAt:    s.CreatedAt,
+	}
+}
+
+type SystemUserResponse struct {
+	Page  int32                        `json:"page"`
+	Total int32                        `json:"total"`
+	List  []*operationPb.AddSystemUser `json:"list"`
+}
+
+func (s *SystemUserResponse) ToPB() *operationPb.SearchUserResponse {
+	return &operationPb.SearchUserResponse{
+		Page:  s.Page,
+		Total: s.Total,
+		List:  s.List,
 	}
 }

+ 9 - 4
module/backend/interface.go

@@ -5,6 +5,7 @@ import (
 	"kpt-tmr-group/config"
 	"kpt-tmr-group/model"
 	"kpt-tmr-group/pkg/di"
+	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 	"kpt-tmr-group/store/kptstore"
 
@@ -38,10 +39,10 @@ type KptService interface {
 }
 
 type Operation interface {
-	CreateSystemRoleList(ctx context.Context, req []*operationPb.AddRoleRequest) error
+	CreateSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error
 
-	// CreatePastureList 牧场管理相关
-	CreatePastureList(ctx context.Context, req []*operationPb.AddPastureRequest) error
+	// CreatePasture 牧场管理相关
+	CreatePasture(ctx context.Context, req *operationPb.AddPastureRequest) error
 	SearchPastureList(ctx context.Context, req *operationPb.SearchPastureRequest) (*model.GroupPastureResponse, error)
 }
 
@@ -49,5 +50,9 @@ type SystemOperation interface {
 	Auth(ctx context.Context, auth *operationPb.UserAuth) (*operationPb.SystemToken, error)
 	GetUserInfo(ctx context.Context, token string) (*operationPb.UserAuth, error)
 
-	CreateSystemUser(ctx context.Context, req []*operationPb.AddSystemUser) error
+	CreateSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error
+	SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest, pagination *commonPb.PaginationModel) (*model.SystemUserResponse, error)
+	EditSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error
+	DeleteSystemUser(ctx context.Context, userId int64) error
+	IsShowSystemUser(ctx context.Context, req *operationPb.EditIsShowSystemUserRequest) error
 }

+ 3 - 21
module/backend/ops_service.go

@@ -8,27 +8,9 @@ import (
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
 )
 
-// CreateSystemRoleList 添加角色
-func (s *StoreEntry) CreateSystemRoleList(ctx context.Context, req []*operationPb.AddRoleRequest) error {
-	roleList := model.NewSystemRoleList(req)
-	if err := s.DB.Create(roleList).Error; err != nil {
-		return xerr.WithStack(err)
-	}
-	return nil
-}
-
-// SearchSystemRoleList 查询角色列表
-func (s *StoreEntry) SearchSystemRoleList(ctx context.Context, req []*operationPb.AddRoleRequest) error {
-	roleList := model.NewSystemRoleList(req)
-	if err := s.DB.Create(roleList).Error; err != nil {
-		return xerr.WithStack(err)
-	}
-	return nil
-}
-
-// CreatePastureList 创建牧场
-func (s *StoreEntry) CreatePastureList(ctx context.Context, req []*operationPb.AddPastureRequest) error {
-	pastureList := model.NewGroupPastureList(req)
+// CreatePasture 创建牧场
+func (s *StoreEntry) CreatePasture(ctx context.Context, req *operationPb.AddPastureRequest) error {
+	pastureList := model.NewGroupPasture(req)
 	if err := s.DB.Create(pastureList).Error; err != nil {
 		return xerr.WithStack(err)
 	}

+ 155 - 3
module/backend/system_service.go

@@ -2,10 +2,17 @@ package backend
 
 import (
 	"context"
+	"errors"
+	"fmt"
+	"gorm.io/gorm"
 	"kpt-tmr-group/model"
 	"kpt-tmr-group/pkg/jwt"
+	"kpt-tmr-group/pkg/tool"
 	"kpt-tmr-group/pkg/xerr"
+	commonPb "kpt-tmr-group/proto/go/backend/common"
 	operationPb "kpt-tmr-group/proto/go/backend/operation"
+	"strconv"
+	"strings"
 )
 
 // Auth 用户登录
@@ -43,14 +50,159 @@ func (s *StoreEntry) GetUserInfo(ctx context.Context, token string) (*operationP
 		return nil, xerr.Custom("token解析失败")
 	}
 
-	if err = s.DB.Where("name = ?", claims.Username).Find(systemUser).Error; err != nil {
+	if err = s.DB.Where("name = ?", claims.Username).First(systemUser).Error; err != nil {
 		return nil, xerr.WithStack(err)
 	}
 
-	return systemUser.SystemUserFormat(), nil
+	systemRole := make([]*model.SystemRole, 0)
+
+	roleIdStr := strings.Split(systemUser.RoleIds, ",")
+	if len(roleIdStr) > 0 {
+		roleIds := make([]int, 0)
+		for _, v := range roleIdStr {
+			roleId, _ := strconv.Atoi(v)
+			roleIds = append(roleIds, roleId)
+		}
+
+		if err = s.DB.Find(&systemRole, roleIds).Error; err != nil {
+			return nil, xerr.WithStack(err)
+		}
+	}
+
+	return systemUser.SystemUserFormat(systemRole), nil
+}
+
+// CreateSystemUser 创建系统用户
+func (s *StoreEntry) CreateSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error {
+	roleIds := ""
+	for _, role := range req.Roles {
+		roleIds += fmt.Sprintf("%d,", role.Id)
+	}
+	systemUsers := &model.SystemUser{
+		Name:         req.Name,
+		EmployeeName: req.EmployeeName,
+		Phone:        req.Phone,
+		Password:     tool.Md5String(model.InitManagerPassword),
+		RoleIds:      strings.TrimRight(roleIds, ","),
+		CreateUser:   req.CreateUser,
+		IsShow:       req.IsShow,
+	}
+
+	if err := s.DB.Create(systemUsers).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+	return nil
+}
+
+// SearchSystemUserList 查询系统用户
+func (s *StoreEntry) SearchSystemUserList(ctx context.Context, req *operationPb.SearchUserRequest, pagination *commonPb.PaginationModel) (*model.SystemUserResponse, error) {
+	systemUser := make([]*model.SystemUser, 0)
+	var count int64 = 0
+
+	pref := s.DB.Model(new(model.SystemUser)).Where("is_delete = ?", operationPb.IsShow_OK)
+	if req.Name != "" {
+		pref.Where("name like ?", fmt.Sprintf("%s%s%s", "%", req.Name, "%"))
+	}
+	if req.EmployeeName != "" {
+		pref.Where("employee_name like ?", fmt.Sprintf("%s%s%s", "%", req.EmployeeName, "%"))
+	}
+
+	if req.IsShow > 0 {
+		pref.Where("is_show = ?", req.IsShow)
+	}
+
+	if err := pref.Order("id desc").Count(&count).Limit(int(pagination.PageSize)).Offset(int(pagination.PageOffset)).
+		Find(&systemUser).Debug().Error; err != nil {
+		return nil, xerr.WithStack(err)
+	}
+
+	return &model.SystemUserResponse{
+		Page:  pagination.Page,
+		Total: int32(count),
+		List:  model.SystemUserSlice(systemUser).ToPB(),
+	}, nil
+}
+
+// EditSystemUser 编辑用户
+func (s *StoreEntry) EditSystemUser(ctx context.Context, req *operationPb.AddSystemUser) error {
+	systemUser := &model.SystemUser{Id: req.Id}
+	if err := s.DB.First(systemUser).Error; err != nil {
+		if errors.Is(err, gorm.ErrRecordNotFound) {
+			return xerr.Custom("该数据不存在!")
+		}
+		return xerr.WithStack(err)
+	}
+
+	updateData := &model.SystemUser{
+		Name:         req.Name,
+		EmployeeName: req.EmployeeName,
+		Phone:        req.Phone,
+		CreateUser:   req.CreateUser,
+	}
+	roles := ""
+	for _, v := range req.Roles {
+		roles += fmt.Sprintf("%d,", v.Id)
+	}
+	if roles != "" {
+		updateData.RoleIds = strings.TrimRight(roles, ",")
+	}
+
+	if err := s.DB.Model(new(model.SystemUser)).Omit("is_show", "password", "is_delete").
+		Where("id = ?", systemUser.Id).
+		Updates(updateData).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+
+	return nil
+}
+
+// DeleteSystemUser 删除系统用户
+func (s *StoreEntry) DeleteSystemUser(ctx context.Context, userId int64) error {
+	systemUser := &model.SystemUser{
+		Id: userId,
+	}
+	if err := s.DB.First(systemUser).Error; err != nil {
+		if errors.Is(err, gorm.ErrRecordNotFound) {
+			return xerr.Custom("该用户不存在")
+		}
+		return xerr.WithStack(err)
+	}
+
+	if err := s.DB.Model(systemUser).Update("is_delete", operationPb.IsShow_NO).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+	return nil
+}
+
+// IsShowSystemUser 用户是否启用
+func (s *StoreEntry) IsShowSystemUser(ctx context.Context, req *operationPb.EditIsShowSystemUserRequest) error {
+	systemUser := &model.SystemUser{
+		Id: req.UserId,
+	}
+	if err := s.DB.First(systemUser).Error; err != nil {
+		if errors.Is(err, gorm.ErrRecordNotFound) {
+			return xerr.Custom("该用户不存在")
+		}
+		return xerr.WithStack(err)
+	}
+
+	if err := s.DB.Model(systemUser).Update("is_show", req.IsShow).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+	return nil
+}
+
+// CreateSystemRole 添加角色
+func (s *StoreEntry) CreateSystemRole(ctx context.Context, req *operationPb.AddRoleRequest) error {
+	role := model.NewSystemRole(req)
+	if err := s.DB.Create(role).Error; err != nil {
+		return xerr.WithStack(err)
+	}
+	return nil
 }
 
-func (s *StoreEntry) CreateSystemUser(ctx context.Context, req []*operationPb.AddSystemUser) error {
+// SearchSystemRoleList 查询角色列表
+func (s *StoreEntry) SearchSystemRoleList(ctx context.Context, req []*operationPb.AddRoleRequest) error {
 
 	return nil
 }

+ 163 - 0
proto/go/backend/common/pagination.pb.go

@@ -0,0 +1,163 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.28.1
+// 	protoc        v3.21.9
+// source: backend/common/pagination.proto
+
+package commonPb
+
+import (
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PaginationModel struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Page       int32 `protobuf:"varint,1,opt,name=Page,proto3" json:"Page,omitempty"`
+	PageSize   int32 `protobuf:"varint,2,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
+	PageOffset int32 `protobuf:"varint,3,opt,name=PageOffset,proto3" json:"PageOffset,omitempty"`
+}
+
+func (x *PaginationModel) Reset() {
+	*x = PaginationModel{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_common_pagination_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PaginationModel) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PaginationModel) ProtoMessage() {}
+
+func (x *PaginationModel) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_common_pagination_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PaginationModel.ProtoReflect.Descriptor instead.
+func (*PaginationModel) Descriptor() ([]byte, []int) {
+	return file_backend_common_pagination_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PaginationModel) GetPage() int32 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
+func (x *PaginationModel) GetPageSize() int32 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+func (x *PaginationModel) GetPageOffset() int32 {
+	if x != nil {
+		return x.PageOffset
+	}
+	return 0
+}
+
+var File_backend_common_pagination_proto protoreflect.FileDescriptor
+
+var file_backend_common_pagination_proto_rawDesc = []byte{
+	0x0a, 0x1f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x12, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x22, 0x61, 0x0a, 0x0f, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
+	0x6f, 0x64, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x04, 0x50, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65,
+	0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65,
+	0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x65, 0x4f, 0x66, 0x66, 0x73,
+	0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x65, 0x4f, 0x66,
+	0x66, 0x73, 0x65, 0x74, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_backend_common_pagination_proto_rawDescOnce sync.Once
+	file_backend_common_pagination_proto_rawDescData = file_backend_common_pagination_proto_rawDesc
+)
+
+func file_backend_common_pagination_proto_rawDescGZIP() []byte {
+	file_backend_common_pagination_proto_rawDescOnce.Do(func() {
+		file_backend_common_pagination_proto_rawDescData = protoimpl.X.CompressGZIP(file_backend_common_pagination_proto_rawDescData)
+	})
+	return file_backend_common_pagination_proto_rawDescData
+}
+
+var file_backend_common_pagination_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_backend_common_pagination_proto_goTypes = []interface{}{
+	(*PaginationModel)(nil), // 0: backend.common.PaginationModel
+}
+var file_backend_common_pagination_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_backend_common_pagination_proto_init() }
+func file_backend_common_pagination_proto_init() {
+	if File_backend_common_pagination_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_backend_common_pagination_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PaginationModel); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_backend_common_pagination_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_backend_common_pagination_proto_goTypes,
+		DependencyIndexes: file_backend_common_pagination_proto_depIdxs,
+		MessageInfos:      file_backend_common_pagination_proto_msgTypes,
+	}.Build()
+	File_backend_common_pagination_proto = out.File
+	file_backend_common_pagination_proto_rawDesc = nil
+	file_backend_common_pagination_proto_goTypes = nil
+	file_backend_common_pagination_proto_depIdxs = nil
+}

+ 441 - 94
proto/go/backend/operation/system.pb.go

@@ -97,9 +97,7 @@ type SearchRoleRequest struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Page     int32  `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`                         // 第几页,从1开始
-	PageSize int32  `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页size,一般为20
-	Name     string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`                          // 角色名称
+	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 角色名称
 }
 
 func (x *SearchRoleRequest) Reset() {
@@ -134,20 +132,6 @@ func (*SearchRoleRequest) Descriptor() ([]byte, []int) {
 	return file_backend_operation_system_proto_rawDescGZIP(), []int{1}
 }
 
-func (x *SearchRoleRequest) GetPage() int32 {
-	if x != nil {
-		return x.Page
-	}
-	return 0
-}
-
-func (x *SearchRoleRequest) GetPageSize() int32 {
-	if x != nil {
-		return x.PageSize
-	}
-	return 0
-}
-
 func (x *SearchRoleRequest) GetName() string {
 	if x != nil {
 		return x.Name
@@ -327,11 +311,11 @@ type UserAuth struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` // 用户名称
-	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`                 // 用户密码
-	Phone    string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`                       // 用户手机号
-	RoleId   int64  `protobuf:"varint,4,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`      // 用户角色id
-	RoleName string `protobuf:"bytes,5,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` // 用户角色名称
+	UserName     string      `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"`             // 用户名称
+	Password     string      `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`                             // 用户密码
+	Phone        string      `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`                                   // 用户手机号
+	Roles        []*UserRole `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"`                                   // 用户角色
+	EmployeeName string      `protobuf:"bytes,5,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"` // 员工名称
 }
 
 func (x *UserAuth) Reset() {
@@ -387,16 +371,71 @@ func (x *UserAuth) GetPhone() string {
 	return ""
 }
 
-func (x *UserAuth) GetRoleId() int64 {
+func (x *UserAuth) GetRoles() []*UserRole {
+	if x != nil {
+		return x.Roles
+	}
+	return nil
+}
+
+func (x *UserAuth) GetEmployeeName() string {
 	if x != nil {
-		return x.RoleId
+		return x.EmployeeName
+	}
+	return ""
+}
+
+type UserRole struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id   int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`    // 角色id
+	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 角色名称
+}
+
+func (x *UserRole) Reset() {
+	*x = UserRole{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_system_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserRole) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserRole) ProtoMessage() {}
+
+func (x *UserRole) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_system_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserRole.ProtoReflect.Descriptor instead.
+func (*UserRole) Descriptor() ([]byte, []int) {
+	return file_backend_operation_system_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UserRole) GetId() int64 {
+	if x != nil {
+		return x.Id
 	}
 	return 0
 }
 
-func (x *UserAuth) GetRoleName() string {
+func (x *UserRole) GetName() string {
 	if x != nil {
-		return x.RoleName
+		return x.Name
 	}
 	return ""
 }
@@ -409,15 +448,17 @@ type AddSystemUser struct {
 	Id           int64       `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                                          // 用户id
 	Name         string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
 	Phone        string      `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`                                                     // 用户手机号
-	RoleId       int64       `protobuf:"varint,4,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`                                    // 角色id
+	Roles        []*UserRole `protobuf:"bytes,4,rep,name=roles,proto3" json:"roles,omitempty"`                                                     // 角色
 	IsShow       IsShow_Kind `protobuf:"varint,5,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否开启
 	EmployeeName string      `protobuf:"bytes,6,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
+	CreateUser   string      `protobuf:"bytes,7,opt,name=create_user,json=createUser,proto3" json:"create_user,omitempty"`                         // 创建人
+	CreatedAt    int64       `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`                           // 创建时间
 }
 
 func (x *AddSystemUser) Reset() {
 	*x = AddSystemUser{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_backend_operation_system_proto_msgTypes[6]
+		mi := &file_backend_operation_system_proto_msgTypes[7]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -430,7 +471,7 @@ func (x *AddSystemUser) String() string {
 func (*AddSystemUser) ProtoMessage() {}
 
 func (x *AddSystemUser) ProtoReflect() protoreflect.Message {
-	mi := &file_backend_operation_system_proto_msgTypes[6]
+	mi := &file_backend_operation_system_proto_msgTypes[7]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -443,7 +484,7 @@ func (x *AddSystemUser) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AddSystemUser.ProtoReflect.Descriptor instead.
 func (*AddSystemUser) Descriptor() ([]byte, []int) {
-	return file_backend_operation_system_proto_rawDescGZIP(), []int{6}
+	return file_backend_operation_system_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *AddSystemUser) GetId() int64 {
@@ -467,11 +508,11 @@ func (x *AddSystemUser) GetPhone() string {
 	return ""
 }
 
-func (x *AddSystemUser) GetRoleId() int64 {
+func (x *AddSystemUser) GetRoles() []*UserRole {
 	if x != nil {
-		return x.RoleId
+		return x.Roles
 	}
-	return 0
+	return nil
 }
 
 func (x *AddSystemUser) GetIsShow() IsShow_Kind {
@@ -488,6 +529,218 @@ func (x *AddSystemUser) GetEmployeeName() string {
 	return ""
 }
 
+func (x *AddSystemUser) GetCreateUser() string {
+	if x != nil {
+		return x.CreateUser
+	}
+	return ""
+}
+
+func (x *AddSystemUser) GetCreatedAt() int64 {
+	if x != nil {
+		return x.CreatedAt
+	}
+	return 0
+}
+
+// 查询用户
+type SearchUserRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name             string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                                       // 用户名称
+	EmployeeName     string      `protobuf:"bytes,2,opt,name=employee_name,json=employeeName,proto3" json:"employee_name,omitempty"`                   // 员工姓名
+	IsShow           IsShow_Kind `protobuf:"varint,3,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // 是否启用
+	CreatedStartTime int64       `protobuf:"varint,4,opt,name=created_start_time,json=createdStartTime,proto3" json:"created_start_time,omitempty"`    // 开始时间
+	CreatedEndTime   int64       `protobuf:"varint,5,opt,name=created_end_time,json=createdEndTime,proto3" json:"created_end_time,omitempty"`          // 结束时间
+}
+
+func (x *SearchUserRequest) Reset() {
+	*x = SearchUserRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_system_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SearchUserRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchUserRequest) ProtoMessage() {}
+
+func (x *SearchUserRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_system_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SearchUserRequest.ProtoReflect.Descriptor instead.
+func (*SearchUserRequest) Descriptor() ([]byte, []int) {
+	return file_backend_operation_system_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *SearchUserRequest) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *SearchUserRequest) GetEmployeeName() string {
+	if x != nil {
+		return x.EmployeeName
+	}
+	return ""
+}
+
+func (x *SearchUserRequest) GetIsShow() IsShow_Kind {
+	if x != nil {
+		return x.IsShow
+	}
+	return IsShow_INVALID
+}
+
+func (x *SearchUserRequest) GetCreatedStartTime() int64 {
+	if x != nil {
+		return x.CreatedStartTime
+	}
+	return 0
+}
+
+func (x *SearchUserRequest) GetCreatedEndTime() int64 {
+	if x != nil {
+		return x.CreatedEndTime
+	}
+	return 0
+}
+
+type SearchUserResponse struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Page  int32            `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
+	Total int32            `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
+	List  []*AddSystemUser `protobuf:"bytes,3,rep,name=list,proto3" json:"list,omitempty"`
+}
+
+func (x *SearchUserResponse) Reset() {
+	*x = SearchUserResponse{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_system_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SearchUserResponse) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchUserResponse) ProtoMessage() {}
+
+func (x *SearchUserResponse) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_system_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SearchUserResponse.ProtoReflect.Descriptor instead.
+func (*SearchUserResponse) Descriptor() ([]byte, []int) {
+	return file_backend_operation_system_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *SearchUserResponse) GetPage() int32 {
+	if x != nil {
+		return x.Page
+	}
+	return 0
+}
+
+func (x *SearchUserResponse) GetTotal() int32 {
+	if x != nil {
+		return x.Total
+	}
+	return 0
+}
+
+func (x *SearchUserResponse) GetList() []*AddSystemUser {
+	if x != nil {
+		return x.List
+	}
+	return nil
+}
+
+type EditIsShowSystemUserRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserId int64       `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`                                    // 用户id
+	IsShow IsShow_Kind `protobuf:"varint,2,opt,name=is_show,json=isShow,proto3,enum=backend.operation.IsShow_Kind" json:"is_show,omitempty"` // is_show
+}
+
+func (x *EditIsShowSystemUserRequest) Reset() {
+	*x = EditIsShowSystemUserRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_backend_operation_system_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EditIsShowSystemUserRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EditIsShowSystemUserRequest) ProtoMessage() {}
+
+func (x *EditIsShowSystemUserRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_backend_operation_system_proto_msgTypes[10]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use EditIsShowSystemUserRequest.ProtoReflect.Descriptor instead.
+func (*EditIsShowSystemUserRequest) Descriptor() ([]byte, []int) {
+	return file_backend_operation_system_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *EditIsShowSystemUserRequest) GetUserId() int64 {
+	if x != nil {
+		return x.UserId
+	}
+	return 0
+}
+
+func (x *EditIsShowSystemUserRequest) GetIsShow() IsShow_Kind {
+	if x != nil {
+		return x.IsShow
+	}
+	return IsShow_INVALID
+}
+
 var File_backend_operation_system_proto protoreflect.FileDescriptor
 
 var file_backend_operation_system_proto_rawDesc = []byte{
@@ -504,48 +757,85 @@ var file_backend_operation_system_proto_rawDesc = []byte{
 	0x6b, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x04, 0x20,
 	0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70,
 	0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x06,
-	0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x58, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
-	0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70,
-	0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12,
-	0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04,
-	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x22, 0x75, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65,
-	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,
-	0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
-	0x12, 0x35, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21,
-	0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
-	0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4d, 0x65,
-	0x6e, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
-	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a,
-	0x0b, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05,
-	0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
-	0x65, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12,
-	0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
-	0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
-	0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e,
-	0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x17,
-	0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x5f,
-	0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65,
-	0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73, 0x74,
-	0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68,
-	0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
-	0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x03, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f,
-	0x73, 0x68, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63,
-	0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49,
-	0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68,
-	0x6f, 0x77, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e,
-	0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f,
-	0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f, 0x70, 0x65,
-	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x22, 0x27, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
+	0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
+	0x75, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74,
+	0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12,
+	0x35, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e,
+	0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+	0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x34, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6e,
+	0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x23, 0x0a, 0x0b,
+	0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74,
+	0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65,
+	0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x1b,
+	0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
+	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
+	0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x31, 0x0a,
+	0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62,
+	0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73,
+	0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
+	0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65,
+	0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c,
+	0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
+	0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9a, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73,
+	0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
+	0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e,
+	0x65, 0x12, 0x31, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x1b, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72,
+	0x6f, 0x6c, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e,
+	0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77,
+	0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x23, 0x0a,
+	0x0d, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61,
+	0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65,
+	0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55,
+	0x73, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61,
+	0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
+	0x41, 0x74, 0x22, 0xdd, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65,
+	0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d,
+	0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x4e, 0x61, 0x6d,
+	0x65, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69,
+	0x6e, 0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x72,
+	0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53,
+	0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61,
+	0x74, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69,
+	0x6d, 0x65, 0x22, 0x74, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72,
+	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05,
+	0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74,
+	0x61, 0x6c, 0x12, 0x34, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x20, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73,
+	0x65, 0x72, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, 0x45, 0x64, 0x69, 0x74,
+	0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x12, 0x37, 0x0a, 0x07, 0x69, 0x73, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x6f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x2e, 0x4b, 0x69, 0x6e,
+	0x64, 0x52, 0x06, 0x69, 0x73, 0x53, 0x68, 0x6f, 0x77, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x6f,
+	0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
 }
 
 var (
@@ -560,27 +850,36 @@ func file_backend_operation_system_proto_rawDescGZIP() []byte {
 	return file_backend_operation_system_proto_rawDescData
 }
 
-var file_backend_operation_system_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_backend_operation_system_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
 var file_backend_operation_system_proto_goTypes = []interface{}{
-	(*AddRoleRequest)(nil),     // 0: backend.operation.AddRoleRequest
-	(*SearchRoleRequest)(nil),  // 1: backend.operation.SearchRoleRequest
-	(*SearchRoleResponse)(nil), // 2: backend.operation.SearchRoleResponse
-	(*AddMenuRequest)(nil),     // 3: backend.operation.AddMenuRequest
-	(*SystemToken)(nil),        // 4: backend.operation.SystemToken
-	(*UserAuth)(nil),           // 5: backend.operation.UserAuth
-	(*AddSystemUser)(nil),      // 6: backend.operation.AddSystemUser
-	(*IsShow)(nil),             // 7: backend.operation.IsShow
-	(IsShow_Kind)(0),           // 8: backend.operation.IsShow.Kind
+	(*AddRoleRequest)(nil),              // 0: backend.operation.AddRoleRequest
+	(*SearchRoleRequest)(nil),           // 1: backend.operation.SearchRoleRequest
+	(*SearchRoleResponse)(nil),          // 2: backend.operation.SearchRoleResponse
+	(*AddMenuRequest)(nil),              // 3: backend.operation.AddMenuRequest
+	(*SystemToken)(nil),                 // 4: backend.operation.SystemToken
+	(*UserAuth)(nil),                    // 5: backend.operation.UserAuth
+	(*UserRole)(nil),                    // 6: backend.operation.UserRole
+	(*AddSystemUser)(nil),               // 7: backend.operation.AddSystemUser
+	(*SearchUserRequest)(nil),           // 8: backend.operation.SearchUserRequest
+	(*SearchUserResponse)(nil),          // 9: backend.operation.SearchUserResponse
+	(*EditIsShowSystemUserRequest)(nil), // 10: backend.operation.EditIsShowSystemUserRequest
+	(*IsShow)(nil),                      // 11: backend.operation.IsShow
+	(IsShow_Kind)(0),                    // 12: backend.operation.IsShow.Kind
 }
 var file_backend_operation_system_proto_depIdxs = []int32{
-	7, // 0: backend.operation.AddRoleRequest.is_show:type_name -> backend.operation.IsShow
-	0, // 1: backend.operation.SearchRoleResponse.list:type_name -> backend.operation.AddRoleRequest
-	8, // 2: backend.operation.AddSystemUser.is_show:type_name -> backend.operation.IsShow.Kind
-	3, // [3:3] is the sub-list for method output_type
-	3, // [3:3] is the sub-list for method input_type
-	3, // [3:3] is the sub-list for extension type_name
-	3, // [3:3] is the sub-list for extension extendee
-	0, // [0:3] is the sub-list for field type_name
+	11, // 0: backend.operation.AddRoleRequest.is_show:type_name -> backend.operation.IsShow
+	0,  // 1: backend.operation.SearchRoleResponse.list:type_name -> backend.operation.AddRoleRequest
+	6,  // 2: backend.operation.UserAuth.roles:type_name -> backend.operation.UserRole
+	6,  // 3: backend.operation.AddSystemUser.roles:type_name -> backend.operation.UserRole
+	12, // 4: backend.operation.AddSystemUser.is_show:type_name -> backend.operation.IsShow.Kind
+	12, // 5: backend.operation.SearchUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	7,  // 6: backend.operation.SearchUserResponse.list:type_name -> backend.operation.AddSystemUser
+	12, // 7: backend.operation.EditIsShowSystemUserRequest.is_show:type_name -> backend.operation.IsShow.Kind
+	8,  // [8:8] is the sub-list for method output_type
+	8,  // [8:8] is the sub-list for method input_type
+	8,  // [8:8] is the sub-list for extension type_name
+	8,  // [8:8] is the sub-list for extension extendee
+	0,  // [0:8] is the sub-list for field type_name
 }
 
 func init() { file_backend_operation_system_proto_init() }
@@ -663,6 +962,18 @@ func file_backend_operation_system_proto_init() {
 			}
 		}
 		file_backend_operation_system_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserRole); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_system_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*AddSystemUser); i {
 			case 0:
 				return &v.state
@@ -674,6 +985,42 @@ func file_backend_operation_system_proto_init() {
 				return nil
 			}
 		}
+		file_backend_operation_system_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SearchUserRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_system_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SearchUserResponse); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_backend_operation_system_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EditIsShowSystemUserRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -681,7 +1028,7 @@ func file_backend_operation_system_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_backend_operation_system_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   7,
+			NumMessages:   11,
 			NumExtensions: 0,
 			NumServices:   0,
 		},