Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
d8f95f40
Commit
d8f95f40
authored
Jun 20, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
086ec855
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
BusinessListDto.java
.../src/main/java/com/dsk/system/domain/BusinessListDto.java
+2
-2
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+15
-7
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+2
-2
No files found.
dsk-system/src/main/java/com/dsk/system/domain/BusinessListDto.java
View file @
d8f95f40
...
...
@@ -22,9 +22,9 @@ public class BusinessListDto {
private
Integer
userId
;
/**
*
部门id
*
用户查看全部他人可见项目标示
*/
private
Integer
deptId
;
private
Integer
others
;
/**
* 省id
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
d8f95f40
...
...
@@ -80,13 +80,21 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
@Override
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
//userId不传值,就查询全部门项目
// if (dto.getUserId() == null) {
// Long deptId = SecurityUtils.getLoginUser().getDeptId();
// if (deptId == null) throw new BaseException("请登录");
// dto.setDeptId(deptId.intValue());
// }
return
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
List
<
BusinessListVo
>
othersList
=
null
;
//userId不传值,就查询全部他人可见项目+自己的
if
(
dto
.
getUserId
()
==
null
)
{
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUserId
();
if
(
userId
==
null
)
throw
new
BaseException
(
"请登录"
);
dto
.
setOthers
(
userId
.
intValue
());
//查询他人可见项目
othersList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
}
dto
.
setOthers
(
null
);
//查询自己参与的项目
List
<
BusinessListVo
>
businessList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
businessList
.
addAll
(
othersList
);
return
businessList
;
}
@Override
...
...
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
d8f95f40
...
...
@@ -131,8 +131,8 @@
<if
test=
"userId != null"
>
and bu.user_id = #{userId}
</if>
<if
test=
"
userId =
= null"
>
and i.is_private = 1
<if
test=
"
others !
= null"
>
and
bu.user_id != #{others} and
i.is_private = 1
</if>
<if
test=
"provinceId != null and provinceId.size > 0 and cityId == null and districtId == null"
>
...
...
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