Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
4c02d490
Commit
4c02d490
authored
Sep 07, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单权限修改
parent
567d6873
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
326 additions
and
23 deletions
+326
-23
SysUserPermissionController.java
...v1/permission/controller/SysUserPermissionController.java
+13
-12
SysUserPermissionMapper.java
...ud/plus/v1/permission/mapper/SysUserPermissionMapper.java
+62
-0
SysUserPermissionService.java
.../plus/v1/permission/service/SysUserPermissionService.java
+6
-0
SysMenuServiceImpl.java
...d/plus/v1/permission/service/impl/SysMenuServiceImpl.java
+2
-0
SysUserPermissionServiceImpl.java
...permission/service/impl/SysUserPermissionServiceImpl.java
+192
-11
SysUserPermissionMapper.xml
...biz/src/main/resources/mapper/SysUserPermissionMapper.xml
+51
-0
No files found.
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/controller/SysUserPermissionController.java
View file @
4c02d490
...
...
@@ -30,7 +30,7 @@ import java.util.List;
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/sysuserpermission"
)
@Tag
(
name
=
"
新权限-
用户权限表管理"
)
@Tag
(
name
=
"用户权限表管理"
)
public
class
SysUserPermissionController
{
private
final
SysUserPermissionService
sysUserPermissionService
;
...
...
@@ -66,12 +66,12 @@ public class SysUserPermissionController {
* @param sysUserPermission 新权限-用户权限表
* @return R
*/
@Operation
(
description
=
"新增
新权限-
用户权限表:hasPermission('permission_sysuserpermission_add')"
)
@SysLog
(
"新增
新权限-
用户权限表"
)
@Operation
(
description
=
"新增用户权限表:hasPermission('permission_sysuserpermission_add')"
)
@SysLog
(
"新增用户权限表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
return
R
.
ok
(
sysUserPermissionService
.
save
(
sysUserPermission
)
);
public
R
save
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
return
sysUserPermissionService
.
savePermission
(
sysUserPermission
);
}
/**
...
...
@@ -80,8 +80,8 @@ public class SysUserPermissionController {
* @param sysUserPermission 新权限-用户权限表
* @return R
*/
@Operation
(
description
=
"修改
新权限-
用户权限表:hasPermission('permission_sysuserpermission_edit')"
)
@SysLog
(
"修改
新权限-
用户权限表"
)
@Operation
(
description
=
"修改用户权限表:hasPermission('permission_sysuserpermission_edit')"
)
@SysLog
(
"修改用户权限表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
...
...
@@ -94,8 +94,8 @@ public class SysUserPermissionController {
* @param idList
* @return R
*/
@Operation
(
description
=
"通过id删除
新权限-
用户权限表:hasPermission('permission_sysuserpermission_del')"
)
@SysLog
(
"通过id删除
新权限-
用户权限表"
)
@Operation
(
description
=
"通过id删除用户权限表:hasPermission('permission_sysuserpermission_del')"
)
@SysLog
(
"通过id删除用户权限表"
)
@PostMapping
(
"/deleteByIds"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_del')"
)
public
R
<
Boolean
>
removeById
(
@RequestBody
List
<
String
>
idList
)
{
...
...
@@ -109,8 +109,8 @@ public class SysUserPermissionController {
* @date 2023-08-29 14:49:40
**/
@SneakyThrows
@Operation
(
description
=
"批量新增
新权限-
用户权限表 hasPermission('permission_sysuserpermission-batch-import')"
)
@SysLog
(
"批量新增
新权限-
用户权限表"
)
@Operation
(
description
=
"批量新增用户权限表 hasPermission('permission_sysuserpermission-batch-import')"
)
@SysLog
(
"批量新增用户权限表"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission-batch-import')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
)
{
...
...
@@ -123,8 +123,9 @@ public class SysUserPermissionController {
* @author hyc
* @date 2023-08-29 14:49:40
**/
@Operation
(
description
=
"导出
新权限-
用户权限表"
)
@Operation
(
description
=
"导出用户权限表"
)
@PostMapping
(
"/export"
)
@SysLog
(
"批量导出用户权限表"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
SysUserPermissionSearchVo
searchVo
)
{
sysUserPermissionService
.
listExport
(
response
,
searchVo
);
}
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/mapper/SysUserPermissionMapper.java
View file @
4c02d490
...
...
@@ -101,6 +101,68 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
*/
IPage
<
SysUserDeptVo
>
selectDeptVO
(
Page
<
SysUserDeptVo
>
page
,
@Param
(
"name"
)
String
name
);
/**
* 根据类型查询字典值
*
* @param type 类型
* @return
*/
List
<
SysDictVo
>
selectDictByType
(
@Param
(
"type"
)
String
type
);
/**
* 根据类型和名称判断字典值是否存在
*
* @param type 类型
* @return
*/
Integer
selectDictByName
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
type
);
/**
* 根据名称或者编码查询数据
* 单位权限
* @param name 名称
* @return
*/
Integer
selectUnitCount
(
@Param
(
"name"
)
String
name
);
/**
* 根据名称或者编码查询数据
* 合同权限
* @param name 名称
* @return
*/
Integer
selectContractCount
(
@Param
(
"name"
)
String
name
);
/**
* 根据名称或者编码查询数据
* 项目权限
* @param name 名称
* @return
*/
Integer
selectSettleCount
(
@Param
(
"name"
)
String
name
);
/**
* 根据名称或者编码查询数据
* 商机权限
* @param name 名称
* @return
*/
Integer
selectBusinessCount
(
@Param
(
"name"
)
String
name
);
/**
* 根据名称或者编码查询数据
* 报价单权限
* @param name 名称
* @return
*/
Integer
selectQuotationCount
(
@Param
(
"name"
)
String
name
);
/**
* 根据名称或者编码查询数据
* 部门&&收入归属权限
* @param name 名称
* @return
*/
Integer
selectDeptCount
(
@Param
(
"name"
)
String
name
);
}
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/SysUserPermissionService.java
View file @
4c02d490
...
...
@@ -28,6 +28,12 @@ public interface SysUserPermissionService extends IService<SysUserPermission> {
*/
IPage
<
SysUserPermission
>
getSysUserPermissionPage
(
Page
<
SysUserPermission
>
page
,
SysUserPermissionSearchVo
sysUserPermission
);
/**
* 新增权限
* @param sysUserPermission 新权限-用户权限表
*/
R
savePermission
(
SysUserPermission
sysUserPermission
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
SysUserPermissionSearchVo
searchVo
);
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysMenuServiceImpl.java
View file @
4c02d490
...
...
@@ -11,6 +11,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.permission.entity.SysMenu
;
import
com.yifu.cloud.plus.v1.yifu.permission.vo.SysMenuSearchVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
...
...
@@ -24,6 +25,7 @@ import java.util.List;
*/
@Log4j2
@Service
@RequiredArgsConstructor
public
class
SysMenuServiceImpl
extends
ServiceImpl
<
SysMenuMapper
,
SysMenu
>
implements
SysMenuService
{
/**
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserPermissionServiceImpl.java
View file @
4c02d490
This diff is collapsed.
Click to expand it.
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysUserPermissionMapper.xml
View file @
4c02d490
...
...
@@ -212,4 +212,55 @@
where a.dict_type = #{type}
</select>
<!--针对BU归属和条线类型时的存在判断-->
<select
id=
"selectDictByName"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from permission_type a
where a.dict_type = #{type} and a.name = #{name}
</select>
<!--判断对应维度的名称或者编码是否存在-->
<select
id=
"selectUnitCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from ekp_05b7485fd444f95a6177 a
where a.fd_3a9d1d4d438bfc = #{name}
</select>
<select
id=
"selectContractCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from ekp_0103c453b2848c3bb31c a
where a.fd_3ade33763baa0e = #{name}
</select>
<select
id=
"selectSettleCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from ekp_24a8e6a7fc143bb8c48a a
where a.fd_3a37fe508071fe = #{name}
</select>
<select
id=
"selectBusinessCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from ekp_2f8e08660c542d8a169f a
where a.fd_3b107f1084fd96 = #{name}
</select>
<select
id=
"selectQuotationCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from ekp_2f8e08660c542d8a169f a
where a.fd_3b04b9dc64a9f4 = #{name}
</select>
<select
id=
"selectDeptCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
from sys_org_element a
where a.fd_is_available = '1' and fd_org_type = 2 and a.fd_no = #{name}
</select>
</mapper>
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