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
f9e7c7f2
Commit
f9e7c7f2
authored
Sep 08, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.8' into MVP1.5.8
parents
552f41fe
682394d2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
338 additions
and
29 deletions
+338
-29
SysUserPermissionVo.java
...cloud/plus/v1/yifu/permission/vo/SysUserPermissionVo.java
+5
-5
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
+198
-11
SysUserPermissionMapper.xml
...biz/src/main/resources/mapper/SysUserPermissionMapper.xml
+52
-1
No files found.
yifu-permission/yifu-permission-api/src/main/java/com/yifu/cloud/plus/v1/yifu/permission/vo/SysUserPermissionVo.java
View file @
f9e7c7f2
...
...
@@ -37,12 +37,12 @@ public class SysUserPermissionVo extends RowIndex implements Serializable {
@ExcelProperty
(
"登录账号"
)
private
String
empLoginName
;
/**
* 所
在
部门
* 所
属
部门
*/
@Length
(
max
=
20
,
message
=
"所
在
部门 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"所
在
部门"
,
maxLength
=
20
)
@Schema
(
description
=
"所
在
部门"
)
@ExcelProperty
(
"所
在
部门"
)
@Length
(
max
=
20
,
message
=
"所
属
部门 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"所
属
部门"
,
maxLength
=
20
)
@Schema
(
description
=
"所
属
部门"
)
@ExcelProperty
(
"所
属
部门"
)
private
String
empDept
;
/**
* 权限类型
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/controller/SysUserPermissionController.java
View file @
f9e7c7f2
...
...
@@ -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 @
f9e7c7f2
...
...
@@ -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 @
f9e7c7f2
...
...
@@ -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 @
f9e7c7f2
...
...
@@ -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 @
f9e7c7f2
This diff is collapsed.
Click to expand it.
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysUserPermissionMapper.xml
View file @
f9e7c7f2
...
...
@@ -188,7 +188,7 @@
<select
id=
"selectQuotationVO"
resultMap=
"nameAndCodeMap"
>
SELECT
a.fd_3b04b9dc64a9f4 code,a.fd_3b04b9daa0c25e name
from ekp_
2f8e08660c542d8a169f
a
from ekp_
fd1449d265845e087bf2
a
where 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND (a.fd_3b04b9dc64a9f4 like concat('%',#{name},'%') or a.fd_3b04b9daa0c25e like concat('%',#{name},'%'))
...
...
@@ -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_fd1449d265845e087bf2 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