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
e468221f
authored
Sep 18, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加日志
parent
0079bc90
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
118 additions
and
22 deletions
saas-module/src/main/java/com/makeit/controller/device/SaasDeviceController.java
saas-module/src/main/java/com/makeit/controller/saas/PlatTenantController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasLoginController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasMenuController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatMenuController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatUserController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasPrivacyConfigController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasRoleController.java
saas-module/src/main/java/com/makeit/controller/saas/SaasUserController.java
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
saas-module/src/main/java/com/makeit/controller/device/SaasDeviceController.java
View file @
e468221f
...
...
@@ -10,6 +10,7 @@ import com.makeit.dto.saas.device.PlatDeviceEditSaasDTO;
import
com.makeit.entity.platform.device.PlatDevice
;
import
com.makeit.global.aspect.tenant.TenantIdIgnore
;
import
com.makeit.service.platform.device.PlatDeviceService
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -24,11 +25,14 @@ import org.springframework.web.bind.annotation.RestController;
public
class
SaasDeviceController
{
@Autowired
private
PlatDeviceService
platDeviceService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@ApiOperation
(
"列表"
)
@PostMapping
(
"page"
)
@TenantIdIgnore
public
ApiResponseEntity
<
PageVO
<
PlatDevice
>>
page
(
@RequestBody
PageReqDTO
<
PlatDevice
>
pageReqDTO
)
{
return
ApiResponseUtils
.
success
(
platDeviceService
.
pageSaas
(
pageReqDTO
));
}
...
...
@@ -36,6 +40,7 @@ public class SaasDeviceController {
@PostMapping
(
"detail"
)
@TenantIdIgnore
public
ApiResponseEntity
<
PlatDeviceDetailDTO
>
detail
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
saasOperationLogService
.
add
(
"saas端-租户设备管理-设备信息"
,
null
);
return
ApiResponseUtils
.
success
(
platDeviceService
.
getDetailDTO
(
baseIdDTO
.
getId
()));
}
...
...
@@ -44,6 +49,8 @@ public class SaasDeviceController {
@TenantIdIgnore
public
ApiResponseEntity
<
Void
>
edit
(
@RequestBody
PlatDeviceEditSaasDTO
dto
)
{
platDeviceService
.
saasEdit
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户设备管理-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/PlatTenantController.java
View file @
e468221f
...
...
@@ -7,12 +7,14 @@ import com.makeit.common.page.PageVO;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.entity.saas.PlatTenant
;
import
com.makeit.enums.CommonEnum
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.plat.PlatTenantDTOVO
;
import
com.makeit.module.admin.dto.plat.PlatTenantMenuDTO
;
import
com.makeit.module.admin.dto.plat.PlatTenantStatusDTO
;
import
com.makeit.module.admin.vo.plat.PlatTenantVO
;
import
com.makeit.service.saas.PlatTenantService
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -39,6 +41,8 @@ public class PlatTenantController {
@Autowired
private
PlatTenantService
platTenantService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"租户管理-租户"
,
name
=
"分页列表"
,
code
=
"saas:tenant:page"
)
@ApiOperation
(
"分页列表"
)
...
...
@@ -76,8 +80,11 @@ public class PlatTenantController {
@Action
(
module
=
"租户管理-租户"
,
name
=
"新增"
,
code
=
"saas:tenant:add"
)
@ApiOperation
(
"新增"
)
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatTenantDTOVO
dto
){
;
return
ApiResponseUtils
.
success
(
platTenantService
.
add
(
dto
));
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatTenantDTOVO
dto
){
String
add
=
platTenantService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户管理-新增"
,
add
);
return
ApiResponseUtils
.
success
(
add
);
}
@Action
(
module
=
"租户管理-租户"
,
name
=
"编辑"
,
code
=
"saas:tenant:edit"
)
...
...
@@ -85,6 +92,8 @@ public class PlatTenantController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatTenantDTOVO
dto
){
platTenantService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户管理-编辑"
,
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
...
...
@@ -92,6 +101,8 @@ public class PlatTenantController {
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatTenantDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
saasOperationLogService
.
add
(
"saas端-租户管理-详情"
,
dto
.
getId
());
return
ApiResponseUtils
.
success
(
platTenantService
.
view
(
dto
.
getId
()));
}
...
...
@@ -106,6 +117,8 @@ public class PlatTenantController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
platTenantService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-租户管理-删除"
,
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
...
...
@@ -114,6 +127,11 @@ public class PlatTenantController {
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
PlatTenantStatusDTO
dto
){
platTenantService
.
changeStatus
(
dto
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getStatus
()))
{
saasOperationLogService
.
add
(
"saas端-租户管理-启用"
,
dto
.
getId
());
}
else
{
saasOperationLogService
.
add
(
"saas端-租户管理-禁用"
,
dto
.
getId
());
}
return
ApiResponseUtils
.
success
();
}
...
...
@@ -123,6 +141,8 @@ public class PlatTenantController {
@Deprecated
public
ApiResponseEntity
<?>
assignMenuList
(
@RequestBody
PlatTenantMenuDTO
tntTenantMenuDTO
){
platTenantService
.
assignMenuList
(
tntTenantMenuDTO
);
saasOperationLogService
.
add
(
"saas端-租户管理-分配菜单"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasLoginController.java
View file @
e468221f
...
...
@@ -3,8 +3,10 @@ package com.makeit.controller.saas;
import
com.makeit.common.dto.LoginDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.service.saas.SaasUserService
;
import
com.makeit.module.admin.vo.saas.SaasUserLoginVO
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
com.makeit.service.saas.SaasUserService
;
import
com.makeit.utils.request.RequestUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -20,17 +22,23 @@ public class SaasLoginController {
@Autowired
private
SaasUserService
saasUserService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@ApiOperation
(
"登录"
)
@PostMapping
(
"login"
)
public
ApiResponseEntity
<
SaasUserLoginVO
>
login
(
@RequestBody
LoginDTO
loginDTO
)
{
return
ApiResponseUtils
.
success
(
saasUserService
.
login
(
loginDTO
));
SaasUserLoginVO
login
=
saasUserService
.
login
(
loginDTO
);
RequestUtil
.
setHeader
(
"token"
,
login
.
getToken
());
saasOperationLogService
.
add
(
"saas端-用户-登录"
,
null
);
return
ApiResponseUtils
.
success
(
login
);
}
@ApiOperation
(
"退出登录"
)
@PostMapping
(
"logout"
)
public
ApiResponseEntity
<?>
logout
()
{
saasUserService
.
logout
();
saasOperationLogService
.
add
(
"saas端-用户-退出"
,
null
);
return
ApiResponseUtils
.
success
();
}
}
saas-module/src/main/java/com/makeit/controller/saas/SaasMenuController.java
View file @
e468221f
...
...
@@ -5,10 +5,12 @@ import com.makeit.common.dto.BaseIdDTO;
import
com.makeit.common.dto.StatusDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.enums.CommonEnum
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.saas.SaasMenuDTOVO
;
import
com.makeit.module.admin.dto.saas.SaasMenuQueryDTO
;
import
com.makeit.service.saas.SaasMenuService
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -35,6 +37,8 @@ public class SaasMenuController {
@Autowired
private
SaasMenuService
saasMenuService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-菜单"
,
name
=
"列表"
,
code
=
"saas:menu:list"
)
@ApiOperation
(
"列表"
)
...
...
@@ -67,6 +71,8 @@ public class SaasMenuController {
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
SaasMenuDTOVO
dto
)
{
String
id
=
saasMenuService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-菜单-新增"
,
null
);
return
ApiResponseUtils
.
success
(
id
);
}
...
...
@@ -75,6 +81,8 @@ public class SaasMenuController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
SaasMenuDTOVO
dto
)
{
saasMenuService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-菜单-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -90,6 +98,8 @@ public class SaasMenuController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
)
{
saasMenuService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-菜单-删除"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -98,6 +108,11 @@ public class SaasMenuController {
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<
Void
>
changeStatus
(
@RequestBody
StatusDTO
dto
)
{
saasMenuService
.
changeStatus
(
dto
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getStatus
()))
{
saasOperationLogService
.
add
(
"saas端-菜单-启用"
,
null
);
}
else
{
saasOperationLogService
.
add
(
"saas端-菜单-禁用"
,
null
);
}
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatMenuController.java
View file @
e468221f
...
...
@@ -9,6 +9,7 @@ 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
com.makeit.service.saas.SaasOperationLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -35,6 +36,8 @@ public class SaasPlatMenuController {
@Autowired
private
PlatMenuService
platMenuService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-租户资源管理(菜单)"
,
name
=
"列表"
,
code
=
"saas:plat:menu:list"
)
@ApiOperation
(
"列表"
)
...
...
@@ -67,6 +70,8 @@ public class SaasPlatMenuController {
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatMenuDTOVO
dto
){
String
add
=
platMenuService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户资源管理-新增"
,
null
);
return
ApiResponseUtils
.
success
(
add
);
}
...
...
@@ -75,6 +80,8 @@ public class SaasPlatMenuController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatMenuDTOVO
dto
){
platMenuService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户资源管理-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -90,6 +97,8 @@ public class SaasPlatMenuController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
platMenuService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-租户资源管理-删除"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasPlatUserController.java
View file @
e468221f
...
...
@@ -7,10 +7,12 @@ 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.enums.CommonEnum
;
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
com.makeit.service.saas.SaasOperationLogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -37,6 +39,8 @@ public class SaasPlatUserController {
@Autowired
private
PlatUserService
platUserService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-租户账号"
,
name
=
"分页列表"
,
code
=
"saas.plat.user.pageTenant"
)
//@PlatOperationLogger
...
...
@@ -70,6 +74,8 @@ public class SaasPlatUserController {
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
PlatUserDTOVO
dto
){
String
add
=
platUserService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户账号管理-新增"
,
null
);
return
ApiResponseUtils
.
success
(
add
);
}
...
...
@@ -78,6 +84,8 @@ public class SaasPlatUserController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
PlatUserDTOVO
dto
){
platUserService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户账号管理-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -87,6 +95,8 @@ public class SaasPlatUserController {
@PostMapping
(
"changePasword"
)
public
ApiResponseEntity
<?>
changePassword
(
@RequestBody
PlatUserDTOVO
dto
){
platUserService
.
changePassword
(
dto
);
saasOperationLogService
.
add
(
"saas端-租户账号管理-修改密码"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -94,6 +104,8 @@ public class SaasPlatUserController {
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatUserDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
saasOperationLogService
.
add
(
"saas端-租户账号管理-详情"
,
null
);
return
ApiResponseUtils
.
success
(
platUserService
.
view
(
dto
.
getId
()));
}
...
...
@@ -102,6 +114,8 @@ public class SaasPlatUserController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
platUserService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-租户账号管理-删除"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -110,6 +124,11 @@ public class SaasPlatUserController {
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
){
platUserService
.
changeStatus
(
dto
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getStatus
()))
{
saasOperationLogService
.
add
(
"saas端-租户账号管理-启用"
,
dto
.
getId
());
}
else
{
saasOperationLogService
.
add
(
"saas端-租户账号管理-禁用"
,
dto
.
getId
());
}
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasPrivacyConfigController.java
View file @
e468221f
...
...
@@ -4,6 +4,7 @@ import com.makeit.common.response.ApiResponseEntity;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.dto.saas.SaasPrivacyConfigDTO
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
com.makeit.service.saas.SaasPrivacyConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -28,6 +29,8 @@ public class SaasPrivacyConfigController {
@Autowired
private
SaasPrivacyConfigService
saasPrivacyConfigService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-隐私政策-关于我们"
,
name
=
"新增"
,
code
=
"saas.sys.privacyConfig.add"
)
//@PlatOperationLogger
...
...
@@ -35,6 +38,7 @@ public class SaasPrivacyConfigController {
@PostMapping
(
"/add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
SaasPrivacyConfigDTO
saasPrivacyConfigDTO
){
String
add
=
saasPrivacyConfigService
.
add
(
saasPrivacyConfigDTO
);
saasOperationLogService
.
add
(
"saas端-隐私政策-新增"
,
null
);
return
ApiResponseUtils
.
success
(
add
);
}
...
...
@@ -42,6 +46,7 @@ public class SaasPrivacyConfigController {
@ApiOperation
(
value
=
"获取隐私政策-关于我们"
,
notes
=
""
)
@PostMapping
(
"/view"
)
public
ApiResponseEntity
<
SaasPrivacyConfigDTO
>
view
(
@RequestBody
SaasPrivacyConfigDTO
saasPrivacyConfigDTO
){
saasOperationLogService
.
add
(
"saas端-隐私政策-详情"
,
null
);
return
ApiResponseUtils
.
success
(
saasPrivacyConfigService
.
view
(
saasPrivacyConfigDTO
.
getCategory
()));
}
...
...
@@ -51,6 +56,8 @@ public class SaasPrivacyConfigController {
@PostMapping
(
"/addAbout"
)
public
ApiResponseEntity
<?>
addAbout
(
@Validated
@RequestBody
SaasPrivacyConfigDTO
saasPrivacyConfigDTO
){
saasPrivacyConfigService
.
add
(
saasPrivacyConfigDTO
);
saasOperationLogService
.
add
(
"saas端-关于我们-新增"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -58,6 +65,8 @@ public class SaasPrivacyConfigController {
@ApiOperation
(
value
=
"获取关于我们"
,
notes
=
""
)
@PostMapping
(
"/viewAbout"
)
public
ApiResponseEntity
<
SaasPrivacyConfigDTO
>
viewAbout
(
@RequestBody
SaasPrivacyConfigDTO
saasPrivacyConfigDTO
){
saasOperationLogService
.
add
(
"saas端-关于我们-详情"
,
null
);
return
ApiResponseUtils
.
success
(
saasPrivacyConfigService
.
view
(
saasPrivacyConfigDTO
.
getCategory
()));
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasRoleController.java
View file @
e468221f
...
...
@@ -7,10 +7,12 @@ 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.enums.CommonEnum
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.module.admin.dto.saas.SaasRoleDTOVO
;
import
com.makeit.module.admin.dto.saas.SaasRoleMenuDTO
;
import
com.makeit.module.admin.dto.saas.SaasUserRoleDTO
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
com.makeit.service.saas.SaasRoleService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -38,6 +40,8 @@ public class SaasRoleController {
@Autowired
private
SaasRoleService
saasRoleService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-角色"
,
name
=
"列表"
,
code
=
"saas:role:list"
)
@ApiOperation
(
"列表不分页"
)
...
...
@@ -65,6 +69,7 @@ public class SaasRoleController {
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
SaasRoleDTOVO
dto
){
String
add
=
saasRoleService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-角色管理-新增"
,
null
);
return
ApiResponseUtils
.
success
(
add
);
}
...
...
@@ -73,6 +78,7 @@ public class SaasRoleController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
SaasRoleDTOVO
dto
){
saasRoleService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-角色管理-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -80,6 +86,7 @@ public class SaasRoleController {
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
SaasRoleDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
saasOperationLogService
.
add
(
"saas端-角色管理-详情"
,
null
);
return
ApiResponseUtils
.
success
(
saasRoleService
.
view
(
dto
.
getId
()));
}
...
...
@@ -88,6 +95,7 @@ public class SaasRoleController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
saasRoleService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-角色管理-删除"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -96,6 +104,11 @@ public class SaasRoleController {
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
){
saasRoleService
.
changeStatus
(
dto
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getStatus
()))
{
saasOperationLogService
.
add
(
"saas端-角色管理-启用"
,
null
);
}
else
{
saasOperationLogService
.
add
(
"saas端-角色管理-禁用"
,
null
);
}
return
ApiResponseUtils
.
success
();
}
...
...
@@ -104,6 +117,7 @@ public class SaasRoleController {
@PostMapping
(
"assignUserList"
)
public
ApiResponseEntity
<?>
assignUserList
(
@RequestBody
List
<
SaasUserRoleDTO
>
userRoleDTOList
){
//参数要不要是一个对象里 有一个数组
saasRoleService
.
assignUserList
(
userRoleDTOList
);
saasOperationLogService
.
add
(
"saas端-角色管理-分配用户"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -112,6 +126,7 @@ public class SaasRoleController {
@PostMapping
(
"removeAssignUserList"
)
public
ApiResponseEntity
<?>
removeAssignUserList
(
@RequestBody
List
<
SaasUserRoleDTO
>
userRoleDTOList
){
saasRoleService
.
removeAssignUserList
(
userRoleDTOList
);
saasOperationLogService
.
add
(
"saas端-角色管理-删除分配用户"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -121,6 +136,7 @@ public class SaasRoleController {
@Deprecated
public
ApiResponseEntity
<?>
assignMenuList
(
@RequestBody
SaasRoleMenuDTO
roleMenuDTO
){
saasRoleService
.
assignMenuList
(
roleMenuDTO
);
saasOperationLogService
.
add
(
"saas端-角色管理-分配菜单"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
saas-module/src/main/java/com/makeit/controller/saas/SaasUserController.java
View file @
e468221f
...
...
@@ -13,6 +13,7 @@ import com.makeit.module.admin.dto.saas.SaasUserDTOVO;
import
com.makeit.module.admin.dto.saas.SaasUserQueryDTO
;
import
com.makeit.module.admin.vo.plat.PlatUserLoginVO
;
import
com.makeit.module.admin.vo.saas.SaasUserLoginVO
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
com.makeit.service.saas.SaasUserService
;
import
com.makeit.utils.user.ThreadLocalUserUtil
;
import
com.makeit.utils.user.wechat.WechatUserInfo
;
...
...
@@ -42,6 +43,8 @@ public class SaasUserController {
@Autowired
private
SaasUserService
saasUserService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Action
(
module
=
"saas端-用户"
,
name
=
"分页列表"
,
code
=
"saas:user:page"
)
@ApiOperation
(
"分页列表"
)
...
...
@@ -80,6 +83,7 @@ public class SaasUserController {
@PostMapping
(
"add"
)
public
ApiResponseEntity
<
String
>
add
(
@Validated
@RequestBody
SaasUserDTOVO
dto
){
String
add
=
saasUserService
.
add
(
dto
);
saasOperationLogService
.
add
(
"saas端-用户管理-新增"
,
null
);
return
ApiResponseUtils
.
success
(
add
);
}
...
...
@@ -88,6 +92,7 @@ public class SaasUserController {
@PostMapping
(
"edit"
)
public
ApiResponseEntity
<?>
edit
(
@Validated
@RequestBody
SaasUserDTOVO
dto
){
saasUserService
.
edit
(
dto
);
saasOperationLogService
.
add
(
"saas端-用户管理-编辑"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -96,13 +101,15 @@ public class SaasUserController {
@PostMapping
(
"changePassword"
)
public
ApiResponseEntity
<?>
changePassword
(
@RequestBody
SaasUserDTOVO
dto
){
saasUserService
.
changePassword
(
dto
);
saasOperationLogService
.
add
(
"saas端-用户管理-修改密码"
,
null
);
return
ApiResponseUtils
.
success
();
}
@Action
(
module
=
"saas端-用户"
,
name
=
"详情"
,
code
=
"saas:user:view"
)
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
SaasUserDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){;
public
ApiResponseEntity
<
SaasUserDTOVO
>
view
(
@RequestBody
BaseIdDTO
dto
){
saasOperationLogService
.
add
(
"saas端-用户管理-详情"
,
null
);
return
ApiResponseUtils
.
success
(
saasUserService
.
view
(
dto
.
getId
()));
}
...
...
@@ -111,6 +118,7 @@ public class SaasUserController {
@PostMapping
(
"del"
)
public
ApiResponseEntity
<?>
del
(
@RequestBody
BaseIdDTO
dto
){
saasUserService
.
del
(
dto
.
getId
());
saasOperationLogService
.
add
(
"saas端-用户管理-删除"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
@@ -119,6 +127,7 @@ public class SaasUserController {
@PostMapping
(
"changeStatus"
)
public
ApiResponseEntity
<?>
changeStatus
(
@RequestBody
StatusDTO
dto
){
saasUserService
.
changeStatus
(
dto
);
saasOperationLogService
.
add
(
"saas端-用户管理-改变状态"
,
null
);
return
ApiResponseUtils
.
success
();
}
...
...
server-service/src/main/java/com/makeit/service/saas/impl/PlatTenantServiceImpl.java
View file @
e468221f
...
...
@@ -31,7 +31,6 @@ import com.makeit.service.platform.auth.PlatOrgService;
import
com.makeit.service.platform.auth.PlatUserService
;
import
com.makeit.service.saas.PlatTenantMenuService
;
import
com.makeit.service.saas.PlatTenantService
;
import
com.makeit.service.saas.SaasOperationLogService
;
import
com.makeit.service.saas.SaasUserService
;
import
com.makeit.utils.data.convert.BeanDtoVoUtils
;
import
com.makeit.utils.data.convert.PageUtil
;
...
...
@@ -71,9 +70,6 @@ implements PlatTenantService {
private
SaasUserService
saasUserService
;
@Autowired
private
SaasOperationLogService
saasOperationLogService
;
@Autowired
private
SysConfigService
sysConfigService
;
@Autowired
private
PlatTenantMenuService
platTenantMenuService
;
...
...
@@ -256,8 +252,6 @@ implements PlatTenantService {
//分配菜单
assignMenuList
(
tntTenant
.
getId
(),
dto
.
getMenuIdList
());
saasOperationLogService
.
add
(
"saas端-租户账号-编辑"
,
dto
.
getId
());
}
public
PlatOrg
convertToPlatOrg
(
PlatTenant
platTenant
){
...
...
@@ -278,8 +272,6 @@ implements PlatTenantService {
TntUserJoinUtil
.
join
(
platUserService
,
Arrays
.
asList
(
userVO
),
PlatTenantDTOVO:
:
getPlatUserId
,(
t
,
u
)->
t
.
setPlatUserVO
(
BeanDtoVoUtils
.
convert
(
u
,
PlatUserVO
.
class
))
,
PlatUser:
:
getId
);
saasOperationLogService
.
add
(
"saas端-租户账号-详情"
,
id
);
LambdaQueryWrapper
<
PlatTenantMenu
>
tenantMenuLambdaQueryWrapper
=
new
LambdaQueryWrapper
<
PlatTenantMenu
>()
.
eq
(
BaseBusEntity:
:
getTenantId
,
id
);
List
<
PlatTenantMenu
>
list
=
platTenantMenuService
.
list
(
tenantMenuLambdaQueryWrapper
);
...
...
@@ -296,8 +288,6 @@ implements PlatTenantService {
public
void
del
(
String
id
)
{
removeById
(
id
);
saasOperationLogService
.
add
(
"saas端-租户账号-删除"
,
id
);
}
@Transactional
...
...
@@ -319,12 +309,6 @@ implements PlatTenantService {
tntTenant
.
setStatus
(
dto
.
getStatus
());
updateById
(
tntTenant
);
if
(
CommonEnum
.
YES
.
getValue
().
equals
(
dto
.
getStatus
()))
{
saasOperationLogService
.
add
(
"saas端-租户账号-启用"
,
dto
.
getId
());
}
else
{
saasOperationLogService
.
add
(
"saas端-租户账号-禁用"
,
dto
.
getId
());
}
}
@Transactional
...
...
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