Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
9030fff8
Commit
9030fff8
authored
Nov 18, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
f505ea4c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
1 deletion
+44
-1
BDiscussRepository.java
...org/rcisoft/business/bdiscuss/dao/BDiscussRepository.java
+7
-1
BDiscussDto.java
...n/java/org/rcisoft/business/bdiscuss/dto/BDiscussDto.java
+6
-0
BDiscuss.java
...n/java/org/rcisoft/business/bdiscuss/entity/BDiscuss.java
+2
-0
BDiscussServiceImpl.java
...t/business/bdiscuss/service/impl/BDiscussServiceImpl.java
+26
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+1
-0
BDiscussMapper.xml
...ources/mapper/business/bdiscuss/mapper/BDiscussMapper.xml
+2
-0
No files found.
src/main/java/org/rcisoft/business/bdiscuss/dao/BDiscussRepository.java
View file @
9030fff8
...
@@ -30,10 +30,16 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> {
...
@@ -30,10 +30,16 @@ public interface BDiscussRepository extends BaseMapper<BDiscuss> {
@Select
(
"<script> SELECT "
+
@Select
(
"<script> SELECT "
+
" bd.*, "
+
" bd.*, "
+
" su.NAME AS studentName "
+
" su.NAME AS studentName, "
+
" pbd.student_id AS replyToId, "
+
" psu.NAME AS replyToName "
+
"FROM "
+
"FROM "
+
" b_discuss bd "
+
" b_discuss bd "
+
" LEFT JOIN s_user su ON su.business_id = bd.student_id "
+
" LEFT JOIN s_user su ON su.business_id = bd.student_id "
+
" LEFT JOIN b_discuss pbd ON bd.pid = pbd.business_id "
+
" AND pbd.del_flag = '0' "
+
" AND pbd.flag = '1' "
+
" LEFT JOIN s_user psu ON psu.business_id = pbd.student_id "
+
"WHERE "
+
"WHERE "
+
" 1 = 1 "
+
" 1 = 1 "
+
" AND bd.del_flag = '0' "
+
" AND bd.del_flag = '0' "
+
...
...
src/main/java/org/rcisoft/business/bdiscuss/dto/BDiscussDto.java
View file @
9030fff8
...
@@ -20,5 +20,11 @@ public class BDiscussDto extends BDiscuss {
...
@@ -20,5 +20,11 @@ public class BDiscussDto extends BDiscuss {
private
String
studentName
;
private
String
studentName
;
private
String
headPic
;
private
String
replyToId
;
private
String
replyToName
;
}
}
src/main/java/org/rcisoft/business/bdiscuss/entity/BDiscuss.java
View file @
9030fff8
...
@@ -31,6 +31,8 @@ public class BDiscuss extends IdEntity<BDiscuss> {
...
@@ -31,6 +31,8 @@ public class BDiscuss extends IdEntity<BDiscuss> {
private
String
studentId
;
private
String
studentId
;
private
String
isReply
;
}
}
src/main/java/org/rcisoft/business/bdiscuss/service/impl/BDiscussServiceImpl.java
View file @
9030fff8
package
org
.
rcisoft
.
business
.
bdiscuss
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
bdiscuss
.
service
.
impl
;
import
org.rcisoft.business.bdiscuss.dto.BDiscussDto
;
import
org.rcisoft.business.bdiscuss.dto.BDiscussDto
;
import
org.rcisoft.common.util.feignDto.MTUserGetsReqDTO
;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.model.PersistModel
;
...
@@ -16,6 +19,7 @@ import org.springframework.transaction.annotation.Propagation;
...
@@ -16,6 +19,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -30,6 +34,8 @@ public class BDiscussServiceImpl implements BDiscussService {
...
@@ -30,6 +34,8 @@ public class BDiscussServiceImpl implements BDiscussService {
@Autowired
@Autowired
private
BDiscussRepository
bDiscussRepository
;
private
BDiscussRepository
bDiscussRepository
;
@Autowired
MTCotactApiRequestClient
mtCotactApiRequestClient
;
/**
/**
* 保存 bDiscuss
* 保存 bDiscuss
...
@@ -103,10 +109,30 @@ public class BDiscussServiceImpl implements BDiscussService {
...
@@ -103,10 +109,30 @@ public class BDiscussServiceImpl implements BDiscussService {
@Override
@Override
public
List
<
BDiscussDto
>
getDiscussByLessonId
(
String
lessonId
,
String
corpId
)
{
public
List
<
BDiscussDto
>
getDiscussByLessonId
(
String
lessonId
,
String
corpId
)
{
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
BDiscussDto
>
bDiscussList
=
bDiscussRepository
.
getDiscussByLessonId
(
lessonId
,
""
,
corpId
);
List
<
BDiscussDto
>
bDiscussList
=
bDiscussRepository
.
getDiscussByLessonId
(
lessonId
,
""
,
corpId
);
bDiscussList
.
stream
().
forEach
(
bDiscuss
->
{
bDiscussList
.
stream
().
forEach
(
bDiscuss
->
{
bDiscuss
.
setBDiscussChildList
(
bDiscussRepository
.
getDiscussByLessonId
(
lessonId
,
bDiscuss
.
getBusinessId
(),
corpId
));
bDiscuss
.
setBDiscussChildList
(
bDiscussRepository
.
getDiscussByLessonId
(
lessonId
,
bDiscuss
.
getBusinessId
(),
corpId
));
ids
.
add
(
bDiscuss
.
getStudentId
());
});
});
MTUserGetsReqDTO
mtUserGetsReqDTO
=
new
MTUserGetsReqDTO
();
mtUserGetsReqDTO
.
setCorpId
(
corpId
);
mtUserGetsReqDTO
.
setIds
(
ids
);
List
<
MTUserInfoRspDTO
>
mtUserInfoRspDTOList
=
mtCotactApiRequestClient
.
userGets
(
mtUserGetsReqDTO
);
if
(
mtUserInfoRspDTOList
!=
null
&&
mtUserInfoRspDTOList
.
size
()
>
0
){
mtUserInfoRspDTOList
.
forEach
(
mtUserInfoRspDTO
->
{
bDiscussList
.
forEach
(
bDiscussDto
->
{
if
(
mtUserInfoRspDTO
.
getId
().
equals
(
bDiscussDto
.
getStudentId
()))
{
//设置一级评论头像
// myInfoDTO.setName(mtUserInfoRspDTO.getName());
bDiscussDto
.
setHeadPic
(
mtUserInfoRspDTO
.
getAvatar
());
}
});
});
}
return
bDiscussList
;
return
bDiscussList
;
}
}
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
9030fff8
...
@@ -246,6 +246,7 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -246,6 +246,7 @@ public class BLesson extends IdEntity<BLesson> {
private
String
lecturerDeptName
;
private
String
lecturerDeptName
;
@ApiModelProperty
(
value
=
"登录人是否为讲师0 不是 1 是"
)
@ApiModelProperty
(
value
=
"登录人是否为讲师0 不是 1 是"
)
@Transient
private
String
userIsLecturer
;
private
String
userIsLecturer
;
...
...
src/main/resources/mapper/business/bdiscuss/mapper/BDiscussMapper.xml
View file @
9030fff8
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
<result
column=
"level"
jdbcType=
"VARCHAR"
property=
"level"
/>
<result
column=
"level"
jdbcType=
"VARCHAR"
property=
"level"
/>
<result
column=
"student_id"
jdbcType=
"VARCHAR"
property=
"studentId"
/>
<result
column=
"student_id"
jdbcType=
"VARCHAR"
property=
"studentId"
/>
<result
column=
"is_reply"
jdbcType=
"VARCHAR"
property=
"isReply"
/>
</resultMap>
</resultMap>
<resultMap
id=
"BaseResultMapDto"
type=
"org.rcisoft.business.bdiscuss.dto.BDiscussDto"
>
<resultMap
id=
"BaseResultMapDto"
type=
"org.rcisoft.business.bdiscuss.dto.BDiscussDto"
>
...
@@ -31,6 +32,7 @@
...
@@ -31,6 +32,7 @@
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
<result
column=
"level"
jdbcType=
"VARCHAR"
property=
"level"
/>
<result
column=
"level"
jdbcType=
"VARCHAR"
property=
"level"
/>
<result
column=
"student_id"
jdbcType=
"VARCHAR"
property=
"studentId"
/>
<result
column=
"student_id"
jdbcType=
"VARCHAR"
property=
"studentId"
/>
<result
column=
"is_reply"
jdbcType=
"VARCHAR"
property=
"isReply"
/>
</resultMap>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
...
...
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