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
406ef1ca
Commit
406ef1ca
authored
Jun 20, 2023
by
lixiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit
parent
a8e546c9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
1 deletion
+25
-1
BusinessBrowseVo.java
.../main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
+5
-0
BusinessUserMapper.java
...c/main/java/com/dsk/system/mapper/BusinessUserMapper.java
+9
-0
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+5
-1
BusinessUserMapper.xml
...src/main/resources/mapper/business/BusinessUserMapper.xml
+6
-0
No files found.
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessBrowseVo.java
View file @
406ef1ca
...
@@ -130,5 +130,10 @@ public class BusinessBrowseVo {
...
@@ -130,5 +130,10 @@ public class BusinessBrowseVo {
*/
*/
private
Integer
fileCount
;
private
Integer
fileCount
;
/**
* 是否创建人(1 是,0 否)
*/
private
Integer
isFounder
;
}
}
dsk-system/src/main/java/com/dsk/system/mapper/BusinessUserMapper.java
View file @
406ef1ca
package
com
.
dsk
.
system
.
mapper
;
package
com
.
dsk
.
system
.
mapper
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -65,4 +67,11 @@ public interface BusinessUserMapper
...
@@ -65,4 +67,11 @@ public interface BusinessUserMapper
* @return
* @return
*/
*/
String
selectCreatorByBusinessId
(
Integer
businessId
);
String
selectCreatorByBusinessId
(
Integer
businessId
);
/**
* 查询是否为项目的创建人
* @param businessId
* @return
*/
Integer
selectFounder
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"userId"
)
Long
userId
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
406ef1ca
...
@@ -89,7 +89,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -89,7 +89,6 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
dto
.
setOthers
(
userId
.
intValue
());
dto
.
setOthers
(
userId
.
intValue
());
//查询他人可见项目
//查询他人可见项目
othersList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
othersList
=
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
}
}
dto
.
setOthers
(
null
);
dto
.
setOthers
(
null
);
//查询自己参与的项目
//查询自己参与的项目
...
@@ -106,6 +105,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -106,6 +105,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
//商务团队
//商务团队
businessBrowseVo
.
setTeam
(
businessUserMapper
.
selectCreatorByBusinessId
(
businessId
));
businessBrowseVo
.
setTeam
(
businessUserMapper
.
selectCreatorByBusinessId
(
businessId
));
//查询是否是项目创建人
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUserId
();
if
(
userId
==
null
)
throw
new
BaseException
(
"请登录"
);
Integer
founder
=
businessUserMapper
.
selectFounder
(
businessId
,
userId
);
businessBrowseVo
.
setIsFounder
(
founder
==
null
?
0
:
founder
);
//查询项目标签
//查询项目标签
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
//相关数据统计
//相关数据统计
...
...
dsk-system/src/main/resources/mapper/business/BusinessUserMapper.xml
View file @
406ef1ca
...
@@ -41,6 +41,12 @@
...
@@ -41,6 +41,12 @@
where bu.is_founder = 1
where bu.is_founder = 1
and i.id = #{BusinessId}
and i.id = #{BusinessId}
</select>
</select>
<select
id=
"selectFounder"
resultType=
"java.lang.Integer"
>
select is_founder
from business_user
where business_id = #{businessId}
and user_id = #{userId}
</select>
<insert
id=
"insertBusinessUser"
parameterType=
"com.dsk.common.core.domain.entity.BusinessUser"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertBusinessUser"
parameterType=
"com.dsk.common.core.domain.entity.BusinessUser"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into business_user
insert into business_user
...
...
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