Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
883be243
authored
Sep 04, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
角色
parent
1c2ff4c0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
953 additions
and
167 deletions
db/platAuth.sql
db/saas-insert.sql
db/saas.sql
saas-module/src/main/java/com/makeit/controller/config/SwaggerSaasConfig.java
saas-module/src/main/java/com/makeit/controller/plat/PlatLoginController.java
saas-module/src/main/java/com/makeit/controller/plat/PlatRoleController.java
saas-module/src/main/java/com/makeit/controller/saas/PlatUserController.java → saas-module/src/main/java/com/makeit/controller/plat/PlatUserController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatMenuController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatUserController.java
server-common/src/main/java/com/makeit/common/dto/BaseOrgDTO.java
server-common/src/main/java/com/makeit/common/entity/BaseEntity.java
server-common/src/main/java/com/makeit/global/inteceptor/PlatAuthorizationInterceptor.java
server-common/src/main/java/com/makeit/global/inteceptor/SaasAuthorizationInterceptor.java
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatMenuDTOVO.java
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatRoleDTOVO.java
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatUserDTOVO.java
server-common/src/main/java/com/makeit/module/admin/vo/plat/PlatUserLoginVO.java
server-common/src/main/java/com/makeit/utils/user/TokenUtil.java
server-common/src/main/java/com/makeit/utils/user/common/CommonUserUtil.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatDeptQueryDTO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatPersonDTOVO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatRoleDeptDTOVO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatRoleMenuDTO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserCountVO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserRoleDTO.java
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserRoleImportDTO.java
server-service/src/main/java/com/makeit/entity/platform/auth/PlatRole.java
server-service/src/main/java/com/makeit/entity/platform/auth/PlatRoleMenu.java
server-service/src/main/java/com/makeit/service/platform/auth/PlatRoleService.java
server-service/src/main/java/com/makeit/service/platform/auth/PlatUserService.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatRoleServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/PlatMenuService.java
server-service/src/main/java/com/makeit/service/saas/impl/PlatMenuServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
server-service/src/main/java/com/makeit/vo/platform/auth/PlatPersonDTOVO.java
server-web/src/main/resources/application.yml
db/platAuth.sql
View file @
883be243
...
@@ -6,7 +6,7 @@ CREATE TABLE `plat_user` (
...
@@ -6,7 +6,7 @@ CREATE TABLE `plat_user` (
`account`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_bin
DEFAULT
NULL
COMMENT
'账户'
,
`account`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_bin
DEFAULT
NULL
COMMENT
'账户'
,
`password`
varchar
(
64
)
NOT
NULL
COMMENT
'密码'
,
`password`
varchar
(
64
)
NOT
NULL
COMMENT
'密码'
,
`mobile`
varchar
(
11
)
NOT
NULL
COMMENT
'手机号'
,
`mobile`
varchar
(
11
)
NOT
NULL
COMMENT
'手机号'
,
`email`
varchar
(
64
)
NO
T
NULL
COMMENT
'邮箱'
,
`email`
varchar
(
64
)
DEFAUL
T
NULL
COMMENT
'邮箱'
,
`status`
char
(
1
)
NOT
NULL
COMMENT
'状态 0禁用 1启用'
,
`status`
char
(
1
)
NOT
NULL
COMMENT
'状态 0禁用 1启用'
,
`avatar`
varchar
(
256
)
DEFAULT
NULL
COMMENT
'头像'
,
`avatar`
varchar
(
256
)
DEFAULT
NULL
COMMENT
'头像'
,
`is_tenant`
char
(
1
)
DEFAULT
NULL
COMMENT
'是否租户账户/租户管理员 0否 1是'
,
`is_tenant`
char
(
1
)
DEFAULT
NULL
COMMENT
'是否租户账户/租户管理员 0否 1是'
,
...
@@ -28,7 +28,7 @@ CREATE TABLE `plat_user` (
...
@@ -28,7 +28,7 @@ CREATE TABLE `plat_user` (
CREATE
TABLE
`plat_role`
(
CREATE
TABLE
`plat_role`
(
`id`
varchar
(
64
)
NOT
NULL
COLLATE
utf8mb4_general_ci
COMMENT
'id'
,
`id`
varchar
(
64
)
NOT
NULL
COLLATE
utf8mb4_general_ci
COMMENT
'id'
,
`tenant_id`
varchar
(
64
)
NOT
NULL
COMMENT
'租户id'
,
`tenant_id`
varchar
(
64
)
NOT
NULL
COMMENT
'租户id'
,
`
role_
name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`data_scope`
varchar
(
600
)
DEFAULT
NULL
COMMENT
'数据权限 子公司id 上级可看到下级'
,
`data_scope`
varchar
(
600
)
DEFAULT
NULL
COMMENT
'数据权限 子公司id 上级可看到下级'
,
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
...
@@ -36,6 +36,7 @@ CREATE TABLE `plat_role` (
...
@@ -36,6 +36,7 @@ CREATE TABLE `plat_role` (
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`update_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'更新人'
,
`update_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'更新人'
,
`create_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'创建人'
,
`create_by`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'创建人'
,
`org_id`
varchar
(
64
)
DEFAULT
NULL
COMMENT
'所属组织'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
COMPACT
COMMENT
=
'租户端角色'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
COMPACT
COMMENT
=
'租户端角色'
;
...
...
db/saas-insert.sql
0 → 100644
View file @
883be243
INSERT
INTO
`sys_dictionary_category`
(
`id`
,
`code`
,
`name`
,
`create_date`
,
`update_date`
,
`del_flag`
)
VALUES
(
'10000'
,
'menu.type'
,
'菜单类型'
,
'2022-05-16 16:33:28'
,
'2022-05-16 16:33:33'
,
0
);
INSERT
INTO
`sys_dictionary`
(
`id`
,
`code`
,
`name`
,
`value`
,
`sort`
,
`description`
,
`category_id`
,
`create_date`
,
`update_date`
,
`del_flag`
)
VALUES
(
'10001'
,
'menu.type.catalogue'
,
'目录'
,
'1'
,
1
,
''
,
'10000'
,
'2022-05-16 16:34:57'
,
'2022-05-16 16:35:10'
,
0
);
INSERT
INTO
`sys_dictionary`
(
`id`
,
`code`
,
`name`
,
`value`
,
`sort`
,
`description`
,
`category_id`
,
`create_date`
,
`update_date`
,
`del_flag`
)
VALUES
(
'10002'
,
'menu.type.menu'
,
'菜单'
,
'2'
,
2
,
''
,
'10000'
,
'2022-05-16 16:35:44'
,
'2022-05-16 16:35:50'
,
0
);
INSERT
INTO
`sys_dictionary`
(
`id`
,
`code`
,
`name`
,
`value`
,
`sort`
,
`description`
,
`category_id`
,
`create_date`
,
`update_date`
,
`del_flag`
)
VALUES
(
'10003'
,
'menu.type.button'
,
'按钮'
,
'3'
,
3
,
''
,
'10000'
,
'2022-05-16 16:36:28'
,
'2022-05-16 16:36:33'
,
0
);
select
*
from
sys_dictionary_category
t
order
by
t
.
id
asc
;
select
*
from
sys_dictionary
t
order
by
t
.
id
asc
;
\ No newline at end of file
db/saas.sql
View file @
883be243
...
@@ -144,7 +144,7 @@ CREATE TABLE `plat_tenant` (
...
@@ -144,7 +144,7 @@ CREATE TABLE `plat_tenant` (
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`update_date`
datetime
NOT
NULL
COMMENT
'更新时间'
,
`update_date`
datetime
NOT
NULL
COMMENT
'更新时间'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`create_by
_
`
varchar
(
64
)
NOT
NULL
COMMENT
'创建人'
,
`create_by`
varchar
(
64
)
NOT
NULL
COMMENT
'创建人'
,
`update_by`
varchar
(
64
)
NOT
NULL
COMMENT
'更新人'
,
`update_by`
varchar
(
64
)
NOT
NULL
COMMENT
'更新人'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
STATS_AUTO_RECALC
=
0
ROW_FORMAT
=
COMPACT
COMMENT
=
'租户管理'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
STATS_AUTO_RECALC
=
0
ROW_FORMAT
=
COMPACT
COMMENT
=
'租户管理'
;
...
@@ -156,6 +156,8 @@ CREATE TABLE `plat_tenant_menu` (
...
@@ -156,6 +156,8 @@ CREATE TABLE `plat_tenant_menu` (
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`update_date`
datetime
NOT
NULL
COMMENT
'更新时间'
,
`update_date`
datetime
NOT
NULL
COMMENT
'更新时间'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`create_by`
varchar
(
64
)
NOT
NULL
COMMENT
'创建人'
,
`update_by`
varchar
(
64
)
NOT
NULL
COMMENT
'更新人'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
KEY
`tnt_tenant_menu_menu_id_index`
(
`menu_id`
),
KEY
`tnt_tenant_menu_menu_id_index`
(
`menu_id`
),
KEY
`tnt_tenant_menu_tenant_id_index`
(
`tenant_id`
)
KEY
`tnt_tenant_menu_tenant_id_index`
(
`tenant_id`
)
...
...
saas-module/src/main/java/com/makeit/controller/config/SwaggerSaasConfig.java
View file @
883be243
...
@@ -40,6 +40,28 @@ public class SwaggerSaasConfig {
...
@@ -40,6 +40,28 @@ public class SwaggerSaasConfig {
return
config
;
return
config
;
}
}
@Bean
public
SwaggerModuleConfig
platModule
()
{
SwaggerModuleConfig
config
=
new
SwaggerModuleConfig
();
config
.
setPackageList
(
Arrays
.
asList
(
"com.makeit.controller.plat"
));
config
.
setModuleName
(
"平台端"
);
return
config
;
}
@Bean
public
Docket
platApi
()
{
Docket
docket
=
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
groupName
(
"03-平台端"
);
ApiSelectorBuilder
builder
=
docket
.
select
();
//api过滤
builder
=
builder
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"com.makeit.controller.plat"
)
);
return
builder
.
build
();
}
@Bean
@Bean
public
Docket
saasApi
()
{
public
Docket
saasApi
()
{
...
...
saas-module/src/main/java/com/makeit/controller/plat/PlatLoginController.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
controller
.
plat
;
import
com.makeit.common.dto.LoginDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.module.admin.vo.plat.PlatUserLoginVO
;
import
com.makeit.service.platform.auth.PlatUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Api
(
tags
=
"平台端-登录"
)
@RestController
@RequestMapping
(
"/plat/login"
)
public
class
PlatLoginController
{
@Autowired
private
PlatUserService
platUserService
;
@ApiOperation
(
"登录"
)
@PostMapping
(
"login"
)
public
ApiResponseEntity
<
PlatUserLoginVO
>
login
(
@RequestBody
LoginDTO
loginDTO
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
login
(
loginDTO
));
}
@ApiOperation
(
"退出登录"
)
@PostMapping
(
"logout"
)
public
ApiResponseEntity
<?>
logout
()
{
platUserService
.
logout
();
return
ApiResponseUtils
.
success
();
}
}
saas-module/src/main/java/com/makeit/controller/plat/PlatRoleController.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
controller
.
plat
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.common.dto.BaseOrgDTO
;
import
com.makeit.common.dto.StatusDTO
;
import
com.makeit.common.page.PageReqDTO
;
import
com.makeit.common.page.PageVO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.dto.platform.auth.PlatRoleDeptDTOVO
;
import
com.makeit.dto.platform.auth.PlatRoleMenuDTO
;
import
com.makeit.dto.platform.auth.PlatUserRoleDTO
;
import
com.makeit.entity.platform.auth.PlatRoleMenu
;
import
com.makeit.entity.platform.auth.PlatRoleOrg
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.plat.PlatRoleDTOVO
;
import
com.makeit.service.platform.auth.PlatRoleService
;
import
com.makeit.service.platform.auth.PlatUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 租户端角色 前端控制器
* </p>
*
* @author eugene young
* @since 2022-05-10
*/
@Api
(
tags
=
"平台端-角色"
)
@RestController
@RequestMapping
(
"/plat/role"
)
public
class
PlatRoleController
{
@Autowired
private
PlatRoleService
platRoleService
;
@Autowired
private
PlatUserService
platUserService
;
@Action
(
module
=
"平台端-角色"
,
name
=
"分页列表"
,
code
=
"tnt:role:page"
)
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"page"
)
public
ApiResponseEntity
<
PageVO
<
PlatRoleDTOVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatRoleDTOVO
>
page
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
page
(
page
));
}
@Action
(
module
=
"平台端-角色"
,
name
=
"列表"
,
code
=
"tnt:role:list"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
PlatRoleDTOVO
>>
list
(
@RequestBody
PlatRoleDTOVO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
list
(
dto
));
}
@ApiOperation
(
"分页列表(AuthIgnore)"
)
@PostMapping
(
"pageAuthIgnore"
)
public
ApiResponseEntity
<
PageVO
<
PlatRoleDTOVO
>>
pageAuthIgnore
(
@RequestBody
PageReqDTO
<
PlatRoleDTOVO
>
page
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
page
(
page
));
}
@ApiOperation
(
"列表(AuthIgnore)"
)
@PostMapping
(
"listAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatRoleDTOVO
>>
listAuthIgnore
(
@RequestBody
PlatRoleDTOVO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
list
(
dto
));
}
@Action
(
module
=
"平台端-角色"
,
name
=
"新增"
,
code
=
"tnt:role:add"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
platRoleService
.
add
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"编辑"
,
code
=
"tnt:role:edit"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatRoleDTOVO
dto
)
{
platRoleService
.
edit
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"详情"
,
code
=
"tnt:role:view"
)
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatRoleDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
view
(
dto
.
getId
()));
}
@Action
(
module
=
"平台端-角色"
,
name
=
"删除"
,
code
=
"tnt:role:del"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
)
{
platRoleService
.
del
(
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"改变状态"
,
code
=
"tnt:role:changeStatus"
)
@ApiOperation
(
"改变状态"
)
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
platRoleService
.
changeStatus
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配用户"
,
code
=
"tnt:role:assignUserList"
)
@ApiOperation
(
"分配用户"
)
@PostMapping
(
"assignUserList"
)
public
ApiResponseEntity
<?>
assignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
//参数要不要是一个对象里 有一个数组
platRoleService
.
assignUserList
(
userRoleDTOList
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"删除分配用户"
,
code
=
"tnt:role:removeAssignUserList"
)
@ApiOperation
(
"删除分配用户"
)
@PostMapping
(
"removeAssignUserList"
)
public
ApiResponseEntity
<?>
removeAssignUserList
(
@RequestBody
List
<
PlatUserRoleDTO
>
userRoleDTOList
)
{
platRoleService
.
removeAssignUserList
(
userRoleDTOList
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配菜单"
,
code
=
"tnt:role:assignMenuList"
)
@ApiOperation
(
"分配菜单"
)
@PostMapping
(
"assignMenuList"
)
public
ApiResponseEntity
<?>
assignMenuList
(
@RequestBody
PlatRoleMenuDTO
roleMenuDTO
)
{
platRoleService
.
assignMenuList
(
roleMenuDTO
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配菜单"
,
code
=
"tnt:role:getAssignMenuList"
)
@ApiOperation
(
"获取分配菜单"
)
@PostMapping
(
"getAssignMenuList"
)
public
ApiResponseEntity
<
List
<
PlatRoleMenu
>>
getAssignMenuList
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
getAssignMenuList
(
baseIdDTO
.
getId
()));
}
// @Action(module = "平台端-角色", name = "分配微信菜单", code = "tnt:role:assignWechatMenuList")
// @ApiOperation("分配微信菜单")
// @PostMapping("assignWechatMenuList")
// public ApiResponseEntity<?> assignWechatMenuList(@RequestBody PlatRoleMenuDTO roleMenuDTO) {
// platRoleService.assignWechatMenuList(roleMenuDTO);
// return ApiResponseUtils.success();
// }
//
// @Action(module = "平台端-角色", name = "获取分配微信菜单", code = "tnt:role:getWechatMenuListByRoleId")
// @ApiOperation("获取分配微信菜单")
// @PostMapping("getWechatMenuListByRoleId")
// public ApiResponseEntity<List<PlatRoleWechatMenu>> getWechatMenuListByRoleId(@RequestBody BaseIdDTO baseIdDTO) {
// return ApiResponseUtils.success(platRoleService.getWechatMenuListByRoleId(baseIdDTO.getId()));
// }
//@Action(module = "平台端-角色", name = "管理范围可选值", code = "tnt:role:getCandidateDeptList")
@ApiOperation
(
"管理范围可选值"
)
@PostMapping
(
"getCandidateOrgList"
)
public
ApiResponseEntity
<?>
getCandidateDeptList
(
@RequestBody
BaseOrgDTO
deptDTO
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
getHotelList
(
deptDTO
.
getOrgId
()));
}
@ApiOperation
(
"管理范围可选值2"
)
@PostMapping
(
"getCandidateDeptList2"
)
public
ApiResponseEntity
<?>
getCandidateDeptList2
(
@RequestBody
BaseOrgDTO
deptDTO
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
getCandidateDeptList
());
}
@Action
(
module
=
"平台端-角色"
,
name
=
"分配管理权限"
,
code
=
"tnt:role:assignDeptList"
)
@ApiOperation
(
"分配管理权限"
)
@PostMapping
(
"assignDeptList"
)
public
ApiResponseEntity
<?>
assignDeptList
(
@RequestBody
PlatRoleDeptDTOVO
roleDeptDTO
)
{
platRoleService
.
assignDeptList
(
roleDeptDTO
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"平台端-角色"
,
name
=
"获取分配管理权限"
,
code
=
"tnt:role:getDeptListByRoleId"
)
@ApiOperation
(
"获取分配管理权限"
)
@PostMapping
(
"getDeptListByRoleId"
)
public
ApiResponseEntity
<
List
<
PlatRoleOrg
>>
getDeptListByRoleId
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
getDeptListByRoleId
(
baseIdDTO
.
getId
()));
}
@Action
(
module
=
"平台端-角色"
,
name
=
"复制角色及关联"
,
code
=
"tnt:role:copyRole"
)
@ApiOperation
(
"复制角色及关联"
)
@PostMapping
(
"copyRole"
)
public
ApiResponseEntity
<?>
copyRole
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
platRoleService
.
copyRole
(
baseIdDTO
.
getId
());
return
ApiResponseUtils
.
success
();
}
@ApiOperation
(
"列表(AuthIgnore)"
)
@PostMapping
(
"getAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatRoleDTOVO
>>
getAuthIgnore
(
@RequestBody
PlatRoleDTOVO
dto
)
{
return
ApiResponseUtils
.
success
(
platRoleService
.
getList
(
dto
));
}
// @ApiOperation(value = "导出模板", notes = "")
// @PostMapping("/exportTemplate")
// public void exportTemplate(HttpServletResponse response) {
// platRoleService.exportTemplate(response);
// }
//
// @ApiOperation(value = "人员角色关联-导入", notes = "tnt.userLabel.importExcel")
// @PostMapping("/importExcel")
// @Action(name = "人员角色关联-导入", code = "tnt:role:copyRole.userRole.importExcel")
// public ApiResponseEntity<ExcelImportVo> importExcel(@RequestParam(value = "deptId", required = true) String deptId,
// @RequestParam(value = "hotelId", required = true) String hotelId,
// @RequestParam(value = "excelFile", required = true) MultipartFile excelFile) throws Exception {
// return ApiResponseUtils.success(platRoleService.importExcel(deptId, hotelId, excelFile));
// }
}
saas-module/src/main/java/com/makeit/controller/
saas
/PlatUserController.java
→
saas-module/src/main/java/com/makeit/controller/
plat
/PlatUserController.java
View file @
883be243
package
com
.
makeit
.
controller
.
saas
;
package
com
.
makeit
.
controller
.
plat
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.common.dto.BaseIdDTO
;
...
@@ -10,7 +10,6 @@ import com.makeit.common.response.ApiResponseUtils;
...
@@ -10,7 +10,6 @@ import com.makeit.common.response.ApiResponseUtils;
import
com.makeit.global.annotation.Action
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.plat.PlatUserDTOVO
;
import
com.makeit.module.admin.dto.plat.PlatUserDTOVO
;
import
com.makeit.module.admin.dto.plat.PlatUserQueryDTO
;
import
com.makeit.module.admin.dto.plat.PlatUserQueryDTO
;
import
com.makeit.module.admin.vo.plat.PlatUserLoginVO
;
import
com.makeit.service.platform.auth.PlatUserService
;
import
com.makeit.service.platform.auth.PlatUserService
;
import
com.makeit.vo.platform.auth.PlatPersonDTOVO
;
import
com.makeit.vo.platform.auth.PlatPersonDTOVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -32,29 +31,29 @@ import java.util.List;
...
@@ -32,29 +31,29 @@ import java.util.List;
* @author eugene young
* @author eugene young
* @since 2022-05-10
* @since 2022-05-10
*/
*/
@Api
(
tags
=
"
租户管理-租户账号
管理"
)
@Api
(
tags
=
"
平台端-人员
管理"
)
@RestController
@RestController
@RequestMapping
(
"/
saas/
plat/user"
)
@RequestMapping
(
"/plat/user"
)
public
class
PlatUserController
{
public
class
PlatUserController
{
@Autowired
@Autowired
private
PlatUserService
platUserService
;
private
PlatUserService
platUserService
;
@Action
(
module
=
"
租户端-人员"
,
name
=
"分页列表"
,
code
=
"saas:
plat:user:page"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"分页列表"
,
code
=
"
plat:user:page"
)
@ApiOperation
(
"分页列表"
)
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"page"
)
@PostMapping
(
"page"
)
public
ApiResponseEntity
<
PageVO
<
PlatPersonDTOVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatPersonDTOVO
>>
page
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
page
(
page
));
return
ApiResponseUtils
.
success
(
platUserService
.
page
(
page
));
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"列表"
,
code
=
"saas:
plat:user:list"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"列表"
,
code
=
"
plat:user:list"
)
@ApiOperation
(
"列表"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"list"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
PlatPersonDTOVO
>>
list
(
@RequestBody
PlatUserQueryDTO
dto
)
{
public
ApiResponseEntity
<
List
<
PlatPersonDTOVO
>>
list
(
@RequestBody
PlatUserQueryDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
list
(
dto
));
return
ApiResponseUtils
.
success
(
platUserService
.
list
(
dto
));
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"未分配部门用户分页列表"
,
code
=
"saas:
plat:user:pageNoDeptUser"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"未分配部门用户分页列表"
,
code
=
"
plat:user:pageNoDeptUser"
)
@ApiOperation
(
"未分配部门用户分页列表"
)
@ApiOperation
(
"未分配部门用户分页列表"
)
@PostMapping
(
"pageNoDeptUser"
)
@PostMapping
(
"pageNoDeptUser"
)
public
ApiResponseEntity
<
PageVO
<
PlatPersonDTOVO
>>
pageNoDeptUser
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
)
{
public
ApiResponseEntity
<
PageVO
<
PlatPersonDTOVO
>>
pageNoDeptUser
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
)
{
...
@@ -73,7 +72,7 @@ public class PlatUserController {
...
@@ -73,7 +72,7 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
(
platUserService
.
list
(
dto
));
return
ApiResponseUtils
.
success
(
platUserService
.
list
(
dto
));
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"新增"
,
code
=
"saas:
plat:user:add"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"新增"
,
code
=
"
plat:user:add"
)
@ApiOperation
(
"新增"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
PlatPersonDTOVO
dto
)
{
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
PlatPersonDTOVO
dto
)
{
...
@@ -81,7 +80,7 @@ public class PlatUserController {
...
@@ -81,7 +80,7 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"编辑"
,
code
=
"saas:
plat:user:edit"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"编辑"
,
code
=
"
plat:user:edit"
)
@ApiOperation
(
"编辑"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatPersonDTOVO
dto
)
{
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatPersonDTOVO
dto
)
{
...
@@ -89,7 +88,7 @@ public class PlatUserController {
...
@@ -89,7 +88,7 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"改变密码"
,
code
=
"saas:
plat:user:changePassword"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"改变密码"
,
code
=
"
plat:user:changePassword"
)
@ApiOperation
(
"改变密码"
)
@ApiOperation
(
"改变密码"
)
@PostMapping
(
"changePassword"
)
@PostMapping
(
"changePassword"
)
public
ApiResponseEntity
<?>
changePassword
(
@RequestBody
PlatUserDTOVO
dto
)
{
public
ApiResponseEntity
<?>
changePassword
(
@RequestBody
PlatUserDTOVO
dto
)
{
...
@@ -97,14 +96,14 @@ public class PlatUserController {
...
@@ -97,14 +96,14 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"详情"
,
code
=
"saas:
plat:user:view"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"详情"
,
code
=
"
plat:user:view"
)
@ApiOperation
(
"详情"
)
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatPersonDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
public
ApiResponseEntity
<
PlatPersonDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platUserService
.
viewPerson
(
dto
.
getId
()));
return
ApiResponseUtils
.
success
(
platUserService
.
viewPerson
(
dto
.
getId
()));
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"删除"
,
code
=
"saas:
plat:user:del"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"删除"
,
code
=
"
plat:user:del"
)
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
)
{
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
)
{
...
@@ -112,7 +111,7 @@ public class PlatUserController {
...
@@ -112,7 +111,7 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@Action
(
module
=
"
租户端-人员"
,
name
=
"改变状态"
,
code
=
"saas:
plat:user:changeStatus"
)
@Action
(
module
=
"
平台端-人员"
,
name
=
"改变状态"
,
code
=
"
plat:user:changeStatus"
)
@ApiOperation
(
"改变状态"
)
@ApiOperation
(
"改变状态"
)
@PostMapping
(
"changeStatus"
)
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
...
@@ -120,36 +119,36 @@ public class PlatUserController {
...
@@ -120,36 +119,36 @@ public class PlatUserController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@ApiOperation
(
"获取当前登录用户角色菜单"
)
//
@ApiOperation("获取当前登录用户角色菜单")
@PostMapping
(
"getRoleMenu"
)
//
@PostMapping("getRoleMenu")
public
ApiResponseEntity
<
PlatUserLoginVO
>
getRoleAndMenuList
()
{
//
public ApiResponseEntity<PlatUserLoginVO> getRoleAndMenuList() {
return
ApiResponseUtils
.
success
(
platUserService
.
getRoleAndMenuList
());
//
return ApiResponseUtils.success(platUserService.getRoleAndMenuList());
}
//
}
//
@ApiOperation
(
"获取当前登录用户角色菜单2"
)
//
@ApiOperation("获取当前登录用户角色菜单2")
@PostMapping
(
"getRoleMenu2"
)
//
@PostMapping("getRoleMenu2")
public
ApiResponseEntity
<
PlatUserLoginVO
>
getRoleAndMenuList2
()
{
//
public ApiResponseEntity<PlatUserLoginVO> getRoleAndMenuList2() {
return
ApiResponseUtils
.
success
(
platUserService
.
getRoleAndMenuList2
());
//
return ApiResponseUtils.success(platUserService.getRoleAndMenuList2());
}
//
}
// //@Action(module = "
租户
端-人员", name = "获取当前登录用户企业微信菜单", code = "tnt:user:getWechatMenuList")
// //@Action(module = "
平台
端-人员", name = "获取当前登录用户企业微信菜单", code = "tnt:user:getWechatMenuList")
// @ApiOperation("获取当前登录用户企业微信菜单")
// @ApiOperation("获取当前登录用户企业微信菜单")
// @PostMapping("getWechatMenuList")
// @PostMapping("getWechatMenuList")
// public ApiResponseEntity<PlatUserLoginVO> getWechatMenuList() {
// public ApiResponseEntity<PlatUserLoginVO> getWechatMenuList() {
// return ApiResponseUtils.success(platUserService.getWechatMenuList());
// return ApiResponseUtils.success(platUserService.getWechatMenuList());
// }
// }
@ApiOperation
(
"获取当前登录用户信息"
)
//
@ApiOperation("获取当前登录用户信息")
@PostMapping
(
"getUserVO"
)
//
@PostMapping("getUserVO")
public
ApiResponseEntity
<
PlatUserLoginVO
>
getUserInfo
()
{
//
public ApiResponseEntity<PlatUserLoginVO> getUserInfo() {
return
ApiResponseUtils
.
success
(
platUserService
.
getUserVO
());
//
return ApiResponseUtils.success(platUserService.getUserVO());
}
//
}
//
@ApiOperation
(
"获取当前登录用户详细信息"
)
//
@ApiOperation("获取当前登录用户详细信息")
@PostMapping
(
"getUserDetail"
)
//
@PostMapping("getUserDetail")
public
ApiResponseEntity
<
PlatPersonDTOVO
>
getUserDetail
()
{
//
public ApiResponseEntity<PlatPersonDTOVO> getUserDetail() {
return
ApiResponseUtils
.
success
(
platUserService
.
getUserDetail
());
//
return ApiResponseUtils.success(platUserService.getUserDetail());
}
//
}
}
}
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatMenuController.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
controller
.
saas
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.entity.saas.PlatMenu
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.plat.PlatMenuDTOVO
;
import
com.makeit.module.admin.dto.plat.PlatMenuQueryDTO
;
import
com.makeit.service.saas.PlatMenuService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 租户端菜单 前端控制器
* </p>
*
* @author eugene young
* @since 2022-05-10
*/
@Api
(
tags
=
"系统管理-租户资源管理(菜单)"
)
@RestController
@RequestMapping
(
"/saas/plat/menu"
)
public
class
SaasPlatMenuController
{
@Autowired
private
PlatMenuService
platMenuService
;
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"列表"
,
code
=
"saas:plat:menu:list"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
PlatMenuDTOVO
>>
list
(
@RequestBody
PlatMenuQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platMenuService
.
list
(
dto
));
}
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"树形列表"
,
code
=
"saas:plat:menu:tree"
)
@ApiOperation
(
"树形列表"
)
@PostMapping
(
"tree"
)
public
ApiResponseEntity
<
List
<
PlatMenuDTOVO
>>
tree
(
@RequestBody
PlatMenuQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platMenuService
.
tree
(
dto
));
}
@ApiOperation
(
"列表(AuthIgnore)"
)
@PostMapping
(
"listAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatMenuDTOVO
>>
listAuthIgnore
(
@RequestBody
PlatMenuQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platMenuService
.
list
(
dto
));
}
@ApiOperation
(
"树形列表(AuthIgnore)"
)
@PostMapping
(
"treeAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatMenuDTOVO
>>
treeAuthIgnore
(
@RequestBody
PlatMenuQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platMenuService
.
tree
(
dto
));
}
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"新增"
,
code
=
"saas:plat:menu:add"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
PlatMenuDTOVO
dto
){
platMenuService
.
add
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"编辑"
,
code
=
"saas:plat:menu:edit"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatMenuDTOVO
dto
){
platMenuService
.
edit
(
dto
);
return
ApiResponseUtils
.
success
();
}
//@Action(module = "saas端-租户资源管理(菜单)", name = "详情", code = "saas:plat:menu:view")
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatMenuDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
return
ApiResponseUtils
.
success
(
platMenuService
.
view
(
dto
.
getId
()));
}
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"删除"
,
code
=
"saas:plat:menu:del"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
platMenuService
.
del
(
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
@ApiOperation
(
"同步"
)
@PostMapping
(
"sync"
)
public
ApiResponseEntity
<?>
sync
()
{
platMenuService
.
sync
();
return
ApiResponseUtils
.
success
();
}
@ApiOperation
(
"获取菜单code"
)
@PostMapping
(
"loadMenuCodeList"
)
public
ApiResponseEntity
<
List
<
PlatMenu
>>
loadMenuCodeLis
()
{
return
ApiResponseUtils
.
success
(
platMenuService
.
loadMenuCodeList
());
}
}
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatUserController.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
controller
.
saas
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.common.dto.StatusDTO
;
import
com.makeit.common.page.PageReqDTO
;
import
com.makeit.common.page.PageVO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.plat.PlatUserDTOVO
;
import
com.makeit.module.admin.dto.plat.PlatUserQueryDTO
;
import
com.makeit.service.platform.auth.PlatUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 租户端用户 前端控制器
* </p>
*
* @author eugene young
* @since 2022-05-10
*/
@Api
(
tags
=
"系统管理-租户账号"
)
@RestController
@RequestMapping
(
"/saas/plat/user"
)
public
class
SaasPlatUserController
{
@Autowired
private
PlatUserService
platUserService
;
@Action
(
module
=
"saas端-租户账号"
,
name
=
"分页列表"
,
code
=
"saas.plat.user.pageTenant"
)
//@PlatOperationLogger
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"pageTenant"
)
public
ApiResponseEntity
<
PageVO
<
PlatUserDTOVO
>>
pageTenant
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
){
return
ApiResponseUtils
.
success
(
platUserService
.
pageTenant
(
page
));
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"列表"
,
code
=
"saas.plat.user.listTenant"
)
@ApiOperation
(
"列表"
)
@PostMapping
(
"listTenant"
)
public
ApiResponseEntity
<
List
<
PlatUserDTOVO
>>
listTenant
(
@RequestBody
PlatUserQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platUserService
.
listTenant
(
dto
));
}
@ApiOperation
(
"分页列表(AuthIgnore)"
)
@PostMapping
(
"pageTenantAuthIgnore"
)
public
ApiResponseEntity
<
PageVO
<
PlatUserDTOVO
>>
pageTenantAuthIgnore
(
@RequestBody
PageReqDTO
<
PlatUserQueryDTO
>
page
){
return
ApiResponseUtils
.
success
(
platUserService
.
pageTenant
(
page
));
}
@ApiOperation
(
"列表(AuthIgnore)"
)
@PostMapping
(
"listTenantAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatUserDTOVO
>>
listTenantAuthIgnore
(
@RequestBody
PlatUserQueryDTO
dto
){
return
ApiResponseUtils
.
success
(
platUserService
.
listTenant
(
dto
));
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"新增"
,
code
=
"saas.plat.user.add"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<?>
add
(
@Validated
@RequestBody
PlatUserDTOVO
dto
){
platUserService
.
add
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"编辑"
,
code
=
"saas.plat.user.edit"
)
@ApiOperation
(
"编辑"
)
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatUserDTOVO
dto
){
platUserService
.
edit
(
dto
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"改变密码"
,
code
=
"saas.plat.user.changePassword"
)
@ApiOperation
(
"改变密码"
)
@PostMapping
(
"changePasword"
)
public
ApiResponseEntity
<?>
changePassword
(
@RequestBody
PlatUserDTOVO
dto
){
platUserService
.
changePassword
(
dto
);
return
ApiResponseUtils
.
success
();
}
//@Action(module = "saas端-租户账号", name = "详情", code = "saas.plat.user.view")
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatUserDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
return
ApiResponseUtils
.
success
(
platUserService
.
view
(
dto
.
getId
()));
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"删除"
,
code
=
"saas.plat.user.del"
)
@ApiOperation
(
"删除"
)
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
platUserService
.
del
(
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-租户账号"
,
name
=
"改变状态"
,
code
=
"saas.plat.user.changeStatus"
)
@ApiOperation
(
"改变状态"
)
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
){
platUserService
.
changeStatus
(
dto
);
return
ApiResponseUtils
.
success
();
}
}
server-common/src/main/java/com/makeit/common/dto/BaseOrgDTO.java
View file @
883be243
...
@@ -13,7 +13,7 @@ import java.io.Serializable;
...
@@ -13,7 +13,7 @@ import java.io.Serializable;
public
class
BaseOrgDTO
extends
BaseTenantDTO
implements
Serializable
{
public
class
BaseOrgDTO
extends
BaseTenantDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"部门树 id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"部门树 id"
,
required
=
true
)
private
String
dept
Id
;
private
String
org
Id
;
@ApiModelProperty
(
value
=
"部门树冗余 id"
)
@ApiModelProperty
(
value
=
"部门树冗余 id"
)
private
String
path
;
private
String
path
;
...
...
server-common/src/main/java/com/makeit/common/entity/BaseEntity.java
View file @
883be243
...
@@ -48,7 +48,7 @@ public class BaseEntity implements Serializable {
...
@@ -48,7 +48,7 @@ public class BaseEntity implements Serializable {
private
LocalDateTime
updateDate
;
private
LocalDateTime
updateDate
;
@TableLogic
@TableLogic
(
value
=
"0"
,
delval
=
"1"
)
@TableField
(
select
=
false
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
select
=
false
,
fill
=
FieldFill
.
INSERT
)
private
String
delFlag
;
private
String
delFlag
;
...
...
server-common/src/main/java/com/makeit/global/inteceptor/PlatAuthorizationInterceptor.java
View file @
883be243
...
@@ -7,6 +7,7 @@ import com.makeit.exception.BusinessException;
...
@@ -7,6 +7,7 @@ import com.makeit.exception.BusinessException;
import
com.makeit.global.annotation.Action
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.vo.plat.PlatUserRoleMenuRedisVO
;
import
com.makeit.module.admin.vo.plat.PlatUserRoleMenuRedisVO
;
import
com.makeit.utils.user.plat.PlatUserUtil
;
import
com.makeit.utils.user.plat.PlatUserUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.method.HandlerMethod
;
...
@@ -38,16 +39,18 @@ public class PlatAuthorizationInterceptor implements HandlerInterceptor {
...
@@ -38,16 +39,18 @@ public class PlatAuthorizationInterceptor implements HandlerInterceptor {
}
}
PlatUserRoleMenuRedisVO
userLoginVO
=
PlatUserUtil
.
getTntUserRoleMenu
();
PlatUserRoleMenuRedisVO
userLoginVO
=
PlatUserUtil
.
getTntUserRoleMenu
();
if
(
userLoginVO
==
null
)
{
// if (IsFactoryAccountEnum.YES.getValue().equals(userLoginVO.getIsFactory())) {
return
true
;
// return true;
}
// }
if
(
PlatUserUtil
.
isSuper
())
{
if
(
PlatUserUtil
.
isSuper
())
{
return
true
;
return
true
;
}
}
Set
<
String
>
codeSet
=
new
HashSet
<>(
userLoginVO
.
getButtonCodeList
());
Set
<
String
>
codeSet
=
new
HashSet
<>();
if
(
userLoginVO
!=
null
&&
CollectionUtils
.
isNotEmpty
(
userLoginVO
.
getButtonCodeList
()))
{
codeSet
=
new
HashSet
<>(
userLoginVO
.
getButtonCodeList
());
}
for
(
String
e
:
annotation
.
code
())
{
for
(
String
e
:
annotation
.
code
())
{
if
(
codeSet
.
contains
(
e
))
{
if
(
codeSet
.
contains
(
e
))
{
...
...
server-common/src/main/java/com/makeit/global/inteceptor/SaasAuthorizationInterceptor.java
View file @
883be243
...
@@ -7,6 +7,7 @@ import com.makeit.exception.BusinessException;
...
@@ -7,6 +7,7 @@ import com.makeit.exception.BusinessException;
import
com.makeit.global.annotation.Action
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.vo.saas.SaasUserRoleMenuRedisVO
;
import
com.makeit.module.admin.vo.saas.SaasUserRoleMenuRedisVO
;
import
com.makeit.utils.user.saas.SaasUserUtil
;
import
com.makeit.utils.user.saas.SaasUserUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.method.HandlerMethod
;
...
@@ -44,7 +45,11 @@ public class SaasAuthorizationInterceptor implements HandlerInterceptor {
...
@@ -44,7 +45,11 @@ public class SaasAuthorizationInterceptor implements HandlerInterceptor {
return
true
;
return
true
;
}
}
Set
<
String
>
codeSet
=
new
HashSet
<>(
userLoginVO
.
getButtonCodeList
());
Set
<
String
>
codeSet
=
new
HashSet
<>();
if
(
userLoginVO
!=
null
&&
CollectionUtils
.
isNotEmpty
(
userLoginVO
.
getButtonCodeList
()))
{
codeSet
=
new
HashSet
<>(
userLoginVO
.
getButtonCodeList
());
}
for
(
String
e
:
annotation
.
code
())
{
for
(
String
e
:
annotation
.
code
())
{
if
(
codeSet
.
contains
(
e
))
{
if
(
codeSet
.
contains
(
e
))
{
return
true
;
return
true
;
...
...
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatMenuDTOVO.java
View file @
883be243
...
@@ -24,9 +24,6 @@ public class PlatMenuDTOVO extends BaseIdDTO {
...
@@ -24,9 +24,6 @@ public class PlatMenuDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"名称"
)
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
private
String
name
;
//@ApiModelProperty(value = "模块+类名+方法")
//private String code;
@ApiModelProperty
(
value
=
"图标"
)
@ApiModelProperty
(
value
=
"图标"
)
private
String
icon
;
private
String
icon
;
...
@@ -41,7 +38,7 @@ public class PlatMenuDTOVO extends BaseIdDTO {
...
@@ -41,7 +38,7 @@ public class PlatMenuDTOVO extends BaseIdDTO {
@NotBlank
(
message
=
"类型不能为空"
)
@NotBlank
(
message
=
"类型不能为空"
)
@Pattern
(
regexp
=
"1|2|3"
,
message
=
"类型可选值 1目录 2菜单 3按钮"
)
@Pattern
(
regexp
=
"1|2|3"
,
message
=
"类型可选值 1目录 2菜单 3按钮"
)
@ApiModelProperty
(
value
=
"类型 1目录 2菜单 3按钮"
)
@ApiModelProperty
(
value
=
"类型 1目录 2菜单 3按钮"
)
private
String
category
;
private
String
resourceType
;
@ApiModelProperty
(
value
=
"前端路径"
)
@ApiModelProperty
(
value
=
"前端路径"
)
private
String
requestPath
;
private
String
requestPath
;
...
@@ -60,7 +57,7 @@ public class PlatMenuDTOVO extends BaseIdDTO {
...
@@ -60,7 +57,7 @@ public class PlatMenuDTOVO extends BaseIdDTO {
*/
*/
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
create
dAt
;
private
LocalDateTime
create
Date
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"子集"
)
@ApiModelProperty
(
value
=
"子集"
)
...
...
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatRoleDTOVO.java
View file @
883be243
...
@@ -29,10 +29,10 @@ public class PlatRoleDTOVO extends BaseOrgDTO implements Serializable {
...
@@ -29,10 +29,10 @@ public class PlatRoleDTOVO extends BaseOrgDTO implements Serializable {
@ApiModelProperty
(
value
=
"编码"
)
@ApiModelProperty
(
value
=
"编码"
)
private
String
code
;
private
String
code
;
@NotBlank
(
message
=
"状态不能为空"
)
//
@NotBlank(message = "状态不能为空")
@Pattern
(
regexp
=
"0|1"
,
message
=
"状态可选值为 0禁用 1启用"
)
//
@Pattern(regexp = "0|1", message = "状态可选值为 0禁用 1启用")
@ApiModelProperty
(
value
=
"状态 0禁用 1启用"
)
//
@ApiModelProperty(value = "状态 0禁用 1启用")
private
String
status
;
//
private String status;
@Size
(
max
=
512
,
message
=
"备注最长512字符"
)
@Size
(
max
=
512
,
message
=
"备注最长512字符"
)
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
...
...
server-common/src/main/java/com/makeit/module/admin/dto/plat/PlatUserDTOVO.java
View file @
883be243
...
@@ -18,10 +18,10 @@ import java.util.List;
...
@@ -18,10 +18,10 @@ import java.util.List;
@Data
@Data
public
class
PlatUserDTOVO
extends
BaseIdDTO
{
public
class
PlatUserDTOVO
extends
BaseIdDTO
{
//
@NotBlank(message = "用户名不能为空")
@NotBlank
(
message
=
"用户名不能为空"
)
//
@Size(max = 64, message = "用户名最长为64字符")
@Size
(
max
=
64
,
message
=
"用户名最长为64字符"
)
//
@ApiModelProperty(value = "用户名")
@ApiModelProperty
(
value
=
"用户名"
)
//
private String username;
private
String
username
;
@NotBlank
(
message
=
"名称不能为空"
)
@NotBlank
(
message
=
"名称不能为空"
)
@Size
(
max
=
64
,
message
=
"名称最长为64字符"
)
@Size
(
max
=
64
,
message
=
"名称最长为64字符"
)
...
@@ -29,20 +29,11 @@ public class PlatUserDTOVO extends BaseIdDTO {
...
@@ -29,20 +29,11 @@ public class PlatUserDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"账户"
)
@ApiModelProperty
(
value
=
"账户"
)
private
String
account
;
private
String
account
;
//@NotBlank(message = "密码不能为空")
@Size
(
max
=
32
,
message
=
"密码最长为64字符"
)
@Size
(
max
=
32
,
message
=
"密码最长为64字符"
)
@ApiModelProperty
(
value
=
"密码"
)
@ApiModelProperty
(
value
=
"密码"
)
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
private
String
password
;
private
String
password
;
// @ApiModelProperty(value = "姓名")
// private String name;
@NotBlank
(
message
=
"姓名不能为空"
)
@Size
(
max
=
64
,
message
=
"用户名最长为64字符"
)
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
@NotBlank
(
message
=
"手机号不能为空"
)
@NotBlank
(
message
=
"手机号不能为空"
)
@Pattern
(
regexp
=
"1[0-9]{10}"
,
message
=
"手机号格式不对"
)
@Pattern
(
regexp
=
"1[0-9]{10}"
,
message
=
"手机号格式不对"
)
//@Size(max = 11, message = "手机号最长为64字符")
//@Size(max = 11, message = "手机号最长为64字符")
...
@@ -63,7 +54,7 @@ public class PlatUserDTOVO extends BaseIdDTO {
...
@@ -63,7 +54,7 @@ public class PlatUserDTOVO extends BaseIdDTO {
*/
*/
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
create
dAt
;
private
LocalDateTime
create
Date
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"角色集合"
)
@ApiModelProperty
(
value
=
"角色集合"
)
...
...
server-common/src/main/java/com/makeit/module/admin/vo/plat/PlatUserLoginVO.java
View file @
883be243
...
@@ -18,7 +18,7 @@ public class PlatUserLoginVO implements Serializable {
...
@@ -18,7 +18,7 @@ public class PlatUserLoginVO implements Serializable {
private
String
account
;
private
String
account
;
@ApiModelProperty
(
"姓名"
)
@ApiModelProperty
(
"姓名"
)
private
String
name
;
private
String
user
name
;
// @ApiModelProperty("用户名")
// @ApiModelProperty("用户名")
// private String username;
// private String username;
...
...
server-common/src/main/java/com/makeit/utils/user/TokenUtil.java
View file @
883be243
...
@@ -297,7 +297,7 @@ public class TokenUtil {
...
@@ -297,7 +297,7 @@ public class TokenUtil {
public
static
SaasUserRoleMenuRedisVO
getPlatUserRoleMenu
()
{
public
static
SaasUserRoleMenuRedisVO
getPlatUserRoleMenu
()
{
String
token
=
RequestUtil
.
getHeader
(
HeaderConst
.
PLATFORM_TOKEN
);
String
token
=
RequestUtil
.
getHeader
(
HeaderConst
.
PLATFORM_TOKEN
);
if
(
StringUtils
.
isNotBlank
(
token
))
{
if
(
StringUtils
.
isNotBlank
(
token
))
{
SaasUserRoleMenuRedisVO
userLoginVO
=
Redis
Util
.
get
(
RedisConst
.
PLATFORM_TOKEN_ROLE_MENU_PREFIX
+
token
);
SaasUserRoleMenuRedisVO
userLoginVO
=
Redis
TemplateUtil
.
get
(
RedisConst
.
PLATFORM_TOKEN_ROLE_MENU_PREFIX
+
token
,
SaasUserRoleMenuRedisVO
.
class
);
return
userLoginVO
;
return
userLoginVO
;
}
}
return
null
;
return
null
;
...
...
server-common/src/main/java/com/makeit/utils/user/common/CommonUserUtil.java
View file @
883be243
...
@@ -16,7 +16,7 @@ public class CommonUserUtil {
...
@@ -16,7 +16,7 @@ public class CommonUserUtil {
PlatUserLoginVO
sysUserLoginVO
=
ThreadLocalUserUtil
.
getTntUser
();
PlatUserLoginVO
sysUserLoginVO
=
ThreadLocalUserUtil
.
getTntUser
();
if
(
sysUserLoginVO
!=
null
)
{
if
(
sysUserLoginVO
!=
null
)
{
return
new
CommonUserVO
(
sysUserLoginVO
.
getId
(),
sysUserLoginVO
.
get
N
ame
());
return
new
CommonUserVO
(
sysUserLoginVO
.
getId
(),
sysUserLoginVO
.
get
Usern
ame
());
}
}
WechatUserInfo
wechatUserInfo
=
ThreadLocalUserUtil
.
getWechatUser
();
WechatUserInfo
wechatUserInfo
=
ThreadLocalUserUtil
.
getWechatUser
();
...
...
server-service/src/main/java/com/makeit/dto/platform/auth/PlatDeptQueryDTO.java
0 → 100644
View file @
883be243
//package com.makeit.dto.platform.auth;
//
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//
//@ApiModel("租户端部门 查询")
//@Data
//public class TntDeptQueryDTO extends BaseDeptDTO {
//
// @ApiModelProperty(value = "名称")
// private String name;
//
// @ApiModelProperty(value = "状态 0禁用 1启用")
// private String status;
//
// @ApiModelProperty(value = "是否从酒店开始 0否 1是")
// private String fromHotel;
//
//}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatPersonDTOVO.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
dto
.
platform
.
auth
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.makeit.common.dto.BaseIdDTO
;
import
com.makeit.module.admin.dto.plat.PlatRoleDTOVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Size
;
import
java.time.LocalDateTime
;
import
java.util.List
;
@ApiModel
(
"租户账号 新增 编辑 详情"
)
@Data
public
class
PlatPersonDTOVO
extends
BaseIdDTO
{
// @NotBlank(message = "用户名不能为空")
// @Size(max = 64, message = "用户名最长为64字符")
// @ApiModelProperty(value = "用户名")
// private String username;
@NotBlank
(
message
=
"名称不能为空"
)
@Size
(
max
=
64
,
message
=
"名称最长为64字符"
)
@Pattern
(
regexp
=
"[a-zA-Z0-9]{0,64}"
,
message
=
"工号只能为大小写英文字符和数字"
)
@ApiModelProperty
(
value
=
"账户"
)
private
String
account
;
//@NotBlank(message = "密码不能为空")
@Size
(
max
=
32
,
message
=
"密码最长为64字符"
)
@ApiModelProperty
(
value
=
"密码"
)
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
private
String
password
;
// @ApiModelProperty(value = "姓名")
// private String name;
@NotBlank
(
message
=
"姓名不能为空"
)
@Size
(
max
=
64
,
message
=
"用户名最长为64字符"
)
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
@NotBlank
(
message
=
"手机号不能为空"
)
@Pattern
(
regexp
=
"1[0-9]{10}"
,
message
=
"手机号格式不对"
)
//@Size(max = 11, message = "手机号最长为64字符")
@ApiModelProperty
(
value
=
"手机号"
)
private
String
mobile
;
@NotBlank
(
message
=
"状态不能为空"
)
@Pattern
(
regexp
=
"0|1"
,
message
=
"状态可选值为 0禁用 1启用"
)
@ApiModelProperty
(
value
=
"状态 0禁用 1启用"
)
private
String
status
;
@NotBlank
(
message
=
"部门不能为空"
)
@ApiModelProperty
(
value
=
"部门树id"
)
private
String
deptId
;
@ApiModelProperty
(
value
=
"分管部门id"
)
private
String
chargeDeptId
;
@NotBlank
(
message
=
"性别不能为空"
)
@Pattern
(
regexp
=
"1|2"
,
message
=
"性别可选值为 1男 2女"
)
@ApiModelProperty
(
value
=
"性别 1男 2女"
)
private
String
sex
;
@ApiModelProperty
(
value
=
"职位"
)
private
String
post
;
//@NotNull(message = "职级不能为空")
@ApiModelProperty
(
value
=
"职级"
)
private
Integer
postLevel
;
@ApiModelProperty
(
value
=
"职级描述"
)
private
String
postLevelDesc
;
@NotBlank
(
message
=
"类型不能为空"
)
@Pattern
(
regexp
=
"1|2"
,
message
=
"类型可选值为 1默认 2自建"
)
@ApiModelProperty
(
value
=
"类型 1默认 2自建"
)
private
String
type
;
@ApiModelProperty
(
value
=
"企业微信id"
)
private
String
wechatId
;
@Size
(
max
=
512
,
message
=
"备注最长512字符"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"在职状态 0离职 1在职"
)
private
String
empStatus
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updatedAt
;
@ApiModelProperty
(
value
=
"部门名称"
)
private
String
deptName
;
@ApiModelProperty
(
value
=
"分管部门名称"
)
private
String
chargeDeptName
;
@ApiModelProperty
(
value
=
"头像"
)
private
String
avatar
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"角色集合"
)
private
List
<
PlatRoleDTOVO
>
roleList
;
@ApiModelProperty
(
"是否常用 0否 1是"
)
private
String
isFrequent
;
}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatRoleDeptDTOVO.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
dto
.
platform
.
auth
;
import
com.makeit.common.dto.BaseTenantDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
"租户端角色分配管理权限"
)
public
class
PlatRoleDeptDTOVO
extends
BaseTenantDTO
{
@ApiModelProperty
(
value
=
"角色id"
)
private
String
roleId
;
// @ApiModelProperty(value = "部门树id")
// private String deptId;
//
// @ApiModelProperty(value = "部门树冗余id")
// private String hotelId;
@ApiModelProperty
(
value
=
"部门树id集合"
)
private
List
<
String
>
deptIdList
;
}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatRoleMenuDTO.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
dto
.
platform
.
auth
;
import
com.makeit.common.dto.BaseTenantDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@ApiModel
(
"租户端角色分配菜单"
)
@Data
public
class
PlatRoleMenuDTO
extends
BaseTenantDTO
implements
Serializable
{
// @ApiModelProperty(value = "菜单id")
// private String menuId;
@ApiModelProperty
(
value
=
"角色id"
)
private
String
roleId
;
@ApiModelProperty
(
value
=
"菜单集合id"
)
private
List
<
String
>
menuIdList
;
}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserCountVO.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
dto
.
platform
.
auth
;
import
lombok.Data
;
import
lombok.experimental.FieldNameConstants
;
@FieldNameConstants
@Data
public
class
PlatUserCountVO
{
//private String id;
private
String
deptId
;
private
Integer
count
;
}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserRoleDTO.java
0 → 100644
View file @
883be243
package
com
.
makeit
.
dto
.
platform
.
auth
;
import
com.makeit.common.dto.BaseTenantDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@ApiModel
(
"租户端角色分配用户"
)
@Data
public
class
PlatUserRoleDTO
extends
BaseTenantDTO
implements
Serializable
{
@ApiModelProperty
(
value
=
"用户id"
)
private
String
userId
;
@ApiModelProperty
(
value
=
"角色id"
)
private
String
roleId
;
}
server-service/src/main/java/com/makeit/dto/platform/auth/PlatUserRoleImportDTO.java
0 → 100644
View file @
883be243
//package com.makeit.dto.platform.auth;
//
//import lombok.Data;
//
//@Data
//public class TntUserRoleImportDTO {
//
// @Excel(name = "用户工号")
// private String userAccount;
//
// @Excel(name = "角色名称")
// private String roleName;
//
//}
server-service/src/main/java/com/makeit/entity/platform/auth/PlatRole.java
View file @
883be243
...
@@ -20,7 +20,7 @@ public class PlatRole extends BaseBusEntity {
...
@@ -20,7 +20,7 @@ public class PlatRole extends BaseBusEntity {
/**
/**
* 名称
* 名称
*/
*/
private
String
roleN
ame
;
private
String
n
ame
;
/**
/**
* 备注
* 备注
...
@@ -31,4 +31,6 @@ public class PlatRole extends BaseBusEntity {
...
@@ -31,4 +31,6 @@ public class PlatRole extends BaseBusEntity {
* 数据权限 子公司id 上级可看到下级
* 数据权限 子公司id 上级可看到下级
*/
*/
private
String
dataScope
;
private
String
dataScope
;
private
String
orgId
;
}
}
\ No newline at end of file
server-service/src/main/java/com/makeit/entity/platform/auth/PlatRoleMenu.java
View file @
883be243
package
com
.
makeit
.
entity
.
platform
.
auth
;
package
com
.
makeit
.
entity
.
platform
.
auth
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.makeit.common.entity.BaseBusEntity
;
import
com.makeit.common.entity.BaseBusEntity
;
...
@@ -32,4 +33,7 @@ public class PlatRoleMenu extends BaseBusEntity {
...
@@ -32,4 +33,7 @@ public class PlatRoleMenu extends BaseBusEntity {
* 菜单id
* 菜单id
*/
*/
private
String
menuId
;
private
String
menuId
;
@TableField
(
exist
=
false
)
private
String
menuName
;
}
}
\ No newline at end of file
server-service/src/main/java/com/makeit/service/platform/auth/PlatRoleService.java
View file @
883be243
...
@@ -2,7 +2,18 @@ package com.makeit.service.platform.auth;
...
@@ -2,7 +2,18 @@ package com.makeit.service.platform.auth;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.makeit.common.dto.StatusDTO
;
import
com.makeit.common.page.PageReqDTO
;
import
com.makeit.common.page.PageVO
;
import
com.makeit.dto.platform.auth.PlatRoleDeptDTOVO
;
import
com.makeit.dto.platform.auth.PlatRoleMenuDTO
;
import
com.makeit.dto.platform.auth.PlatUserRoleDTO
;
import
com.makeit.entity.platform.auth.PlatRole
;
import
com.makeit.entity.platform.auth.PlatRole
;
import
com.makeit.entity.platform.auth.PlatRoleMenu
;
import
com.makeit.entity.platform.auth.PlatRoleOrg
;
import
com.makeit.module.admin.dto.plat.PlatRoleDTOVO
;
import
java.util.List
;
/**
/**
* @author lixl
* @author lixl
...
@@ -10,5 +21,53 @@ import com.makeit.entity.platform.auth.PlatRole;
...
@@ -10,5 +21,53 @@ import com.makeit.entity.platform.auth.PlatRole;
* @createDate 2023-08-30 20:10:25
* @createDate 2023-08-30 20:10:25
*/
*/
public
interface
PlatRoleService
extends
IService
<
PlatRole
>
{
public
interface
PlatRoleService
extends
IService
<
PlatRole
>
{
List
<
PlatRoleDTOVO
>
list
(
PlatRoleDTOVO
dto
);
PageVO
<
PlatRoleDTOVO
>
page
(
PageReqDTO
<
PlatRoleDTOVO
>
page
);
void
add
(
PlatRoleDTOVO
dto
);
void
edit
(
PlatRoleDTOVO
dto
);
PlatRoleDTOVO
view
(
String
id
);
void
del
(
String
id
);
void
changeStatus
(
StatusDTO
dto
);
void
assignUserList
(
List
<
PlatUserRoleDTO
>
userRoleDTOList
);
void
removeAssignUserList
(
List
<
PlatUserRoleDTO
>
userRoleDTOList
);
// void exportTemplate(HttpServletResponse response);
//
// ExcelImportVo importExcel(String deptId, String hotelId, MultipartFile excelFile) throws Exception;
void
assignMenuList
(
PlatRoleMenuDTO
roleMenuDTO
);
List
<
PlatRoleMenu
>
getAssignMenuList
(
String
id
);
// void assignWechatMenuList(PlatRoleMenuDTO roleMenuDTO);
// List<PlatRoleWechatMenu> getWechatMenuListByRoleId(String roleId);
void
assignDeptList
(
PlatRoleDeptDTOVO
tntRoleDeptDTO
);
List
<
PlatRoleOrg
>
getDeptListByRoleId
(
String
roleId
);
void
copyRole
(
String
roleId
);
/**
* Lzy
*
* @param dto
* @return
*/
List
<
PlatRoleDTOVO
>
getList
(
PlatRoleDTOVO
dto
);
}
}
server-service/src/main/java/com/makeit/service/platform/auth/PlatUserService.java
View file @
883be243
...
@@ -90,9 +90,9 @@ public interface PlatUserService extends IService<PlatUser> {
...
@@ -90,9 +90,9 @@ public interface PlatUserService extends IService<PlatUser> {
//void leaveMessage(PlatUser tntUser);
//void leaveMessage(PlatUser tntUser);
//
List<PlatRole> getRoleListWithTag(String userId);
List
<
PlatRole
>
getRoleListWithTag
(
String
userId
);
//
PlatRole getMaxRole(String userId);
PlatRole
getMaxRole
(
String
userId
);
List
<
PlatOrg
>
getDeptTreeList
();
List
<
PlatOrg
>
getDeptTreeList
();
...
@@ -110,7 +110,7 @@ public interface PlatUserService extends IService<PlatUser> {
...
@@ -110,7 +110,7 @@ public interface PlatUserService extends IService<PlatUser> {
List
<
PlatOrg
>
getDeptSelfAndChildrenCanTap
(
String
deptId
);
List
<
PlatOrg
>
getDeptSelfAndChildrenCanTap
(
String
deptId
);
//
List<PlatOrg> getHotelList(String deptId);
List
<
PlatOrg
>
getHotelList
(
String
deptId
);
List
<
PlatOrg
>
getCandidateDeptList
();
List
<
PlatOrg
>
getCandidateDeptList
();
...
@@ -130,4 +130,11 @@ public interface PlatUserService extends IService<PlatUser> {
...
@@ -130,4 +130,11 @@ public interface PlatUserService extends IService<PlatUser> {
PageVO
<
PlatPersonDTOVO
>
indexPage
(
PageReqDTO
<
PlatUserQueryDTO
>
page
);
PageVO
<
PlatPersonDTOVO
>
indexPage
(
PageReqDTO
<
PlatUserQueryDTO
>
page
);
List
<
PlatOrg
>
getDeptList
();
List
<
PlatOrg
>
getDeptList
();
/**
* 更新用户的tenantId
* @param tenantId
* @param platUserId
*/
void
updatePlatUserTenantId
(
String
tenantId
,
String
platUserId
);
}
}
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
View file @
883be243
...
@@ -87,15 +87,15 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -87,15 +87,15 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
// e.setCanTap(CommonEnum.YES.getValue());
// e.setCanTap(CommonEnum.YES.getValue());
});
});
List
<
PlatOrg
>
tntDeptList
=
this
.
getDeptSelfAndChildren
(
dto
.
get
Dept
Id
());
List
<
PlatOrg
>
tntDeptList
=
this
.
getDeptSelfAndChildren
(
dto
.
get
Org
Id
());
// if (CommonEnum.YES.getValue().equals(dto.getFromHotel())) {
// if (CommonEnum.YES.getValue().equals(dto.getFromHotel())) {
// tntDeptList = StreamUtil.filter(tntDeptList, e -> DeptEnum.DeptTagEnum.HOTEL.getValue().equals(e.getTag()));
// tntDeptList = StreamUtil.filter(tntDeptList, e -> DeptEnum.DeptTagEnum.HOTEL.getValue().equals(e.getTag()));
// }
// }
List
<
String
>
idList
=
StreamUtil
.
map
(
tntDeptList
,
PlatOrg:
:
getId
);
List
<
String
>
idList
=
StreamUtil
.
map
(
tntDeptList
,
PlatOrg:
:
getId
);
if
(
StringUtils
.
isNotBlank
(
dto
.
get
Dept
Id
()))
{
//左上方可点击的 和 左下方中的任意
if
(
StringUtils
.
isNotBlank
(
dto
.
get
Org
Id
()))
{
//左上方可点击的 和 左下方中的任意
idList
.
add
(
dto
.
get
Dept
Id
());
idList
.
add
(
dto
.
get
Org
Id
());
}
}
tntDeptList
.
addAll
(
deptList
);
tntDeptList
.
addAll
(
deptList
);
...
...
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatRoleServiceImpl.java
View file @
883be243
This diff is collapsed.
Click to expand it.
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatUserServiceImpl.java
View file @
883be243
This diff is collapsed.
Click to expand it.
server-service/src/main/java/com/makeit/service/saas/PlatMenuService.java
View file @
883be243
...
@@ -29,5 +29,5 @@ public interface PlatMenuService extends IService<PlatMenu> {
...
@@ -29,5 +29,5 @@ public interface PlatMenuService extends IService<PlatMenu> {
void
sync
();
void
sync
();
List
<
PlatMenu
>
loadMenuCodeLis
();
List
<
PlatMenu
>
loadMenuCodeLis
t
();
}
}
server-service/src/main/java/com/makeit/service/saas/impl/PlatMenuServiceImpl.java
View file @
883be243
...
@@ -235,7 +235,7 @@ implements PlatMenuService {
...
@@ -235,7 +235,7 @@ implements PlatMenuService {
}
}
@Override
@Override
public
List
<
PlatMenu
>
loadMenuCodeLis
()
{
public
List
<
PlatMenu
>
loadMenuCodeLis
t
()
{
List
<
PlatMenu
>
list
=
StreamUtil
.
filter
(
this
.
load
(),
e
->
TreeConst
.
TOP_LEVEL
.
equals
(
e
.
getParentId
()));
List
<
PlatMenu
>
list
=
StreamUtil
.
filter
(
this
.
load
(),
e
->
TreeConst
.
TOP_LEVEL
.
equals
(
e
.
getParentId
()));
return
list
;
return
list
;
}
}
...
@@ -250,7 +250,7 @@ implements PlatMenuService {
...
@@ -250,7 +250,7 @@ implements PlatMenuService {
//插入匹配过滤条件
//插入匹配过滤条件
provider
.
addIncludeFilter
(
new
RegexPatternTypeFilter
(
Pattern
.
compile
(
".*Controller"
)));
provider
.
addIncludeFilter
(
new
RegexPatternTypeFilter
(
Pattern
.
compile
(
".*Controller"
)));
final
Set
<
BeanDefinition
>
classes
=
provider
.
findCandidateComponents
(
"com.makeit.controller.
tenan
t"
);
final
Set
<
BeanDefinition
>
classes
=
provider
.
findCandidateComponents
(
"com.makeit.controller.
pla
t"
);
//从bean中加载数据
//从bean中加载数据
for
(
BeanDefinition
bean
:
classes
)
{
for
(
BeanDefinition
bean
:
classes
)
{
...
...
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
View file @
883be243
...
@@ -31,7 +31,6 @@ import com.makeit.utils.data.convert.BeanDtoVoUtils;
...
@@ -31,7 +31,6 @@ import com.makeit.utils.data.convert.BeanDtoVoUtils;
import
com.makeit.utils.data.convert.PageUtil
;
import
com.makeit.utils.data.convert.PageUtil
;
import
com.makeit.utils.data.convert.StreamUtil
;
import
com.makeit.utils.data.convert.StreamUtil
;
import
com.makeit.utils.redis.RedisCacheUtil
;
import
com.makeit.utils.redis.RedisCacheUtil
;
import
com.makeit.utils.redis.ScheduleLockUtil
;
import
com.makeit.utils.user.plat.PlatUserUtil
;
import
com.makeit.utils.user.plat.PlatUserUtil
;
import
com.makeit.utils.user.plat.PlatUserVO
;
import
com.makeit.utils.user.plat.PlatUserVO
;
import
com.makeit.utils.user.plat.TntUserJoinUtil
;
import
com.makeit.utils.user.plat.TntUserJoinUtil
;
...
@@ -190,10 +189,12 @@ implements PlatTenantService {
...
@@ -190,10 +189,12 @@ implements PlatTenantService {
PlatTenant
tntTenant
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatTenant
.
class
);
PlatTenant
tntTenant
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatTenant
.
class
);
save
(
tntTenant
);
save
(
tntTenant
);
dto
.
setId
(
tntTenant
.
getId
());
dto
.
setId
(
tntTenant
.
getId
());
//setMenuList(dto);
sysConfigService
.
copyForTenant
(
dto
);
sysConfigService
.
copyForTenant
(
dto
);
//更新用户的tenantId
platUserService
.
updatePlatUserTenantId
(
tntTenant
.
getId
(),
dto
.
getPlatUserId
());
return
tntTenant
.
getId
();
return
tntTenant
.
getId
();
}
}
...
@@ -203,8 +204,14 @@ implements PlatTenantService {
...
@@ -203,8 +204,14 @@ implements PlatTenantService {
checkName
(
dto
);
checkName
(
dto
);
checkDate
(
dto
);
checkDate
(
dto
);
PlatTenant
tntTenant
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatTenant
.
class
);
PlatTenant
tntTenant
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatTenant
.
class
);
PlatTenant
platTenant
=
getById
(
tntTenant
.
getId
());
updateById
(
tntTenant
);
updateById
(
tntTenant
);
//setMenuList(dto);
//更新用户的tenantId
if
(!
StringUtils
.
equals
(
dto
.
getPlatUserId
(),
platTenant
.
getPlatUserId
()))
{
platUserService
.
updatePlatUserTenantId
(
null
,
dto
.
getPlatUserId
());
}
platUserService
.
updatePlatUserTenantId
(
tntTenant
.
getId
(),
dto
.
getPlatUserId
());
saasOperationLogService
.
add
(
"平台端-租户账号-编辑"
,
dto
.
getId
());
saasOperationLogService
.
add
(
"平台端-租户账号-编辑"
,
dto
.
getId
());
...
@@ -216,7 +223,7 @@ implements PlatTenantService {
...
@@ -216,7 +223,7 @@ implements PlatTenantService {
TntUserJoinUtil
.
join
(
platUserService
,
Arrays
.
asList
(
userVO
),
PlatTenantDTOVO:
:
getPlatUserId
,(
t
,
u
)->
t
.
setPlatUserVO
(
BeanDtoVoUtils
.
convert
(
u
,
PlatUserVO
.
class
))
,
PlatUser:
:
getId
);
TntUserJoinUtil
.
join
(
platUserService
,
Arrays
.
asList
(
userVO
),
PlatTenantDTOVO:
:
getPlatUserId
,(
t
,
u
)->
t
.
setPlatUserVO
(
BeanDtoVoUtils
.
convert
(
u
,
PlatUserVO
.
class
))
,
PlatUser:
:
getId
);
//plat
OperationLogService.add("平台端-租户账号-详情", id);
saas
OperationLogService
.
add
(
"平台端-租户账号-详情"
,
id
);
return
userVO
;
return
userVO
;
}
}
...
@@ -261,9 +268,9 @@ implements PlatTenantService {
...
@@ -261,9 +268,9 @@ implements PlatTenantService {
@Override
@Override
public
void
changeStatusJob
()
{
public
void
changeStatusJob
()
{
if
(!
ScheduleLockUtil
.
lockWithLog
(
"TntTenantServiceImpl:changeStatusJob"
))
{
//
if (!ScheduleLockUtil.lockWithLog("TntTenantServiceImpl:changeStatusJob")) {
return
;
//
return;
}
//
}
List
<
PlatTenant
>
tntTenantList
=
list
(
new
QueryWrapper
<
PlatTenant
>().
lambda
()
List
<
PlatTenant
>
tntTenantList
=
list
(
new
QueryWrapper
<
PlatTenant
>().
lambda
()
.
lt
(
PlatTenant:
:
getEndTime
,
LocalDate
.
now
())
.
lt
(
PlatTenant:
:
getEndTime
,
LocalDate
.
now
())
...
...
server-service/src/main/java/com/makeit/service/saas/impl/SaasRoleServiceImpl.java
View file @
883be243
...
@@ -67,11 +67,11 @@ implements SaasRoleService{
...
@@ -67,11 +67,11 @@ implements SaasRoleService{
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_NAME_DUPLICATE
);
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_NAME_DUPLICATE
);
}
}
old
=
getOne
(
new
QueryWrapper
<
SaasRole
>().
lambda
()
//
old = getOne(new QueryWrapper<SaasRole>().lambda()
.
eq
(
SaasRole:
:
getCode
,
dto
.
getCod
e
()));
// .eq(SaasRole::getName, dto.getNam
e()));
if
(
old
!=
null
&&
!
old
.
getId
().
equals
(
dto
.
getId
()))
{
//
if (old != null && !old.getId().equals(dto.getId())) {
throw
new
BusinessException
(
CodeMessageEnum
.
SYSTEM_ERROR_CODE_DUPLICATE
);
//
throw new BusinessException(CodeMessageEnum.SYSTEM_ERROR_CODE_DUPLICATE);
}
//
}
}
}
@Transactional
@Transactional
...
...
server-service/src/main/java/com/makeit/vo/platform/auth/PlatPersonDTOVO.java
View file @
883be243
...
@@ -19,10 +19,10 @@ import java.util.List;
...
@@ -19,10 +19,10 @@ import java.util.List;
@Data
@Data
public
class
PlatPersonDTOVO
extends
BaseIdDTO
{
public
class
PlatPersonDTOVO
extends
BaseIdDTO
{
//
@NotBlank(message = "用户名不能为空")
@NotBlank
(
message
=
"用户名不能为空"
)
//
@Size(max = 64, message = "用户名最长为64字符")
@Size
(
max
=
64
,
message
=
"用户名最长为64字符"
)
//
@ApiModelProperty(value = "用户名")
@ApiModelProperty
(
value
=
"用户名"
)
//
private String username;
private
String
username
;
@NotBlank
(
message
=
"名称不能为空"
)
@NotBlank
(
message
=
"名称不能为空"
)
@Size
(
max
=
64
,
message
=
"名称最长为64字符"
)
@Size
(
max
=
64
,
message
=
"名称最长为64字符"
)
...
@@ -30,23 +30,13 @@ public class PlatPersonDTOVO extends BaseIdDTO {
...
@@ -30,23 +30,13 @@ public class PlatPersonDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"账户"
)
@ApiModelProperty
(
value
=
"账户"
)
private
String
account
;
private
String
account
;
//@NotBlank(message = "密码不能为空")
@Size
(
max
=
32
,
message
=
"密码最长为64字符"
)
@Size
(
max
=
32
,
message
=
"密码最长为64字符"
)
@ApiModelProperty
(
value
=
"密码"
)
@ApiModelProperty
(
value
=
"密码"
)
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
@JsonProperty
(
access
=
JsonProperty
.
Access
.
WRITE_ONLY
)
private
String
password
;
private
String
password
;
// @ApiModelProperty(value = "姓名")
// private String name;
@NotBlank
(
message
=
"姓名不能为空"
)
@Size
(
max
=
64
,
message
=
"用户名最长为64字符"
)
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
@NotBlank
(
message
=
"手机号不能为空"
)
@NotBlank
(
message
=
"手机号不能为空"
)
@Pattern
(
regexp
=
"1[0-9]{10}"
,
message
=
"手机号格式不对"
)
@Pattern
(
regexp
=
"1[0-9]{10}"
,
message
=
"手机号格式不对"
)
//@Size(max = 11, message = "手机号最长为64字符")
@ApiModelProperty
(
value
=
"手机号"
)
@ApiModelProperty
(
value
=
"手机号"
)
private
String
mobile
;
private
String
mobile
;
...
@@ -55,69 +45,31 @@ public class PlatPersonDTOVO extends BaseIdDTO {
...
@@ -55,69 +45,31 @@ public class PlatPersonDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"状态 0禁用 1启用"
)
@ApiModelProperty
(
value
=
"状态 0禁用 1启用"
)
private
String
status
;
private
String
status
;
@NotBlank
(
message
=
"部门不能为空"
)
@ApiModelProperty
(
value
=
"部门树id"
)
@ApiModelProperty
(
value
=
"部门树id"
)
private
String
deptId
;
private
String
deptId
;
@ApiModelProperty
(
value
=
"分管部门id"
)
private
String
chargeDeptId
;
@NotBlank
(
message
=
"性别不能为空"
)
@Pattern
(
regexp
=
"1|2"
,
message
=
"性别可选值为 1男 2女"
)
@ApiModelProperty
(
value
=
"性别 1男 2女"
)
private
String
sex
;
@ApiModelProperty
(
value
=
"职位"
)
private
String
post
;
//@NotNull(message = "职级不能为空")
@ApiModelProperty
(
value
=
"职级"
)
private
Integer
postLevel
;
@ApiModelProperty
(
value
=
"职级描述"
)
private
String
postLevelDesc
;
@NotBlank
(
message
=
"类型不能为空"
)
@Pattern
(
regexp
=
"1|2"
,
message
=
"类型可选值为 1默认 2自建"
)
@ApiModelProperty
(
value
=
"类型 1默认 2自建"
)
private
String
type
;
@ApiModelProperty
(
value
=
"企业微信id"
)
private
String
wechatId
;
@Size
(
max
=
512
,
message
=
"备注最长512字符"
)
@Size
(
max
=
512
,
message
=
"备注最长512字符"
)
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
private
String
remark
;
@ApiModelProperty
(
value
=
"在职状态 0离职 1在职"
)
private
String
empStatus
;
/**
/**
* 创建时间
* 创建时间
*/
*/
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
create
dAt
;
private
LocalDateTime
create
Date
;
/**
/**
* 更新时间
* 更新时间
*/
*/
@ApiModelProperty
(
value
=
"更新时间"
,
required
=
false
)
@ApiModelProperty
(
value
=
"更新时间"
,
required
=
false
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updatedAt
;
private
LocalDateTime
updateDate
;
@ApiModelProperty
(
value
=
"部门名称"
)
@ApiModelProperty
(
value
=
"部门名称"
)
private
String
deptName
;
private
String
deptName
;
@ApiModelProperty
(
value
=
"分管部门名称"
)
private
String
chargeDeptName
;
@ApiModelProperty
(
value
=
"头像"
)
@ApiModelProperty
(
value
=
"头像"
)
private
String
avatar
;
private
String
avatar
;
...
@@ -125,7 +77,4 @@ public class PlatPersonDTOVO extends BaseIdDTO {
...
@@ -125,7 +77,4 @@ public class PlatPersonDTOVO extends BaseIdDTO {
@ApiModelProperty
(
value
=
"角色集合"
)
@ApiModelProperty
(
value
=
"角色集合"
)
private
List
<
PlatRoleDTOVO
>
roleList
;
private
List
<
PlatRoleDTOVO
>
roleList
;
@ApiModelProperty
(
"是否常用 0否 1是"
)
private
String
isFrequent
;
}
}
server-web/src/main/resources/application.yml
View file @
883be243
...
@@ -110,11 +110,11 @@ sa-token:
...
@@ -110,11 +110,11 @@ sa-token:
interceptor
:
interceptor
:
## 登录拦截路径
## 登录拦截路径
authenticationTntPath
:
/**
authenticationTntPath
:
/**
authenticationTntPathIgnore
:
/swagger-resources/**,/v2/api-docs/**,/
sys
/login/**,/sys/dictionaryCategory/getDictionaryCategoryByList,/mobile/**,/doc.html,/saas/**,/error
authenticationTntPathIgnore
:
/swagger-resources/**,/v2/api-docs/**,/
plat
/login/**,/sys/dictionaryCategory/getDictionaryCategoryByList,/mobile/**,/doc.html,/saas/**,/error
## 权限拦截路径
## 权限拦截路径
authorizationTntPath
:
/**
authorizationTntPath
:
/**
authorizationTntPathIgnore
:
/swagger-resources/**,/v2/api-docs/**,/
sys
/login/**,/sys/dictionaryCategory/getDictionaryCategoryByList,/mobile/**,/doc.html,/saas/**,/error
authorizationTntPathIgnore
:
/swagger-resources/**,/v2/api-docs/**,/
plat
/login/**,/sys/dictionaryCategory/getDictionaryCategoryByList,/mobile/**,/doc.html,/saas/**,/error
## saas端登录拦截路径
## saas端登录拦截路径
authenticationSaasPath
:
/saas/**
authenticationSaasPath
:
/saas/**
...
@@ -133,27 +133,18 @@ tenant:
...
@@ -133,27 +133,18 @@ tenant:
table
:
table
:
prefix
:
prefix
:
-
sys_
-
sys_
-
esop_
-
plat_
-
base_
-
fixture_
-
mat_
# - wflow_model
# - wflow_model
# - wflow_record
# - wflow_record
ignore
:
ignore
:
-
sys_file
-
sys_file
-
sys_dictionary
-
sys_dictionary
-
sys_dictionary_category
-
sys_dictionary_category
-
sys_auth_dept
-
sys_factory
-
sys_auth_menu
-
sys_auth_role
-
sys_auth_role_menu
-
sys_auth_role_user
-
sys_auth_role_factory
-
sys_auth_user
-
wflow_model_perms
-
sys_config_category
-
sys_config_category
-
sys_config
-
sys_config
-
plat_tenant
-
plat_tenant_menu
-
plat_user
rsa
:
rsa
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment