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
61830035
Commit
61830035
authored
Sep 27, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
c927c282
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
196 additions
and
90 deletions
+196
-90
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+2
-11
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+2
-8
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+69
-46
AddLessonDTO.java
...n/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
+6
-0
BViewRangeSonDTO.java
...va/org/rcisoft/business/blesson/dto/BViewRangeSonDTO.java
+27
-0
FirstPageQueryDTO.java
...a/org/rcisoft/business/blesson/dto/FirstPageQueryDTO.java
+7
-0
ILearnCountDTO.java
...java/org/rcisoft/business/blesson/dto/ILearnCountDTO.java
+0
-10
ILearnLessonDTO.java
...ava/org/rcisoft/business/blesson/dto/ILearnLessonDTO.java
+11
-1
ILessonCountDTO.java
...ava/org/rcisoft/business/blesson/dto/ILessonCountDTO.java
+3
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+8
-0
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+16
-1
BViewrange.java
.../java/org/rcisoft/business/blesson/entity/BViewrange.java
+29
-0
BLessonPersonService.java
...cisoft/business/blesson/service/BLessonPersonService.java
+1
-7
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+0
-5
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+12
-0
BLessonPersonMapper.xml
...es/mapper/business/blesson/mapper/BLessonPersonMapper.xml
+3
-1
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
61830035
...
@@ -116,7 +116,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -116,7 +116,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"606 分页查询大家都在学"
,
notes
=
"分页查询大家都在学"
)
@ApiOperation
(
value
=
"606 分页查询大家都在学"
,
notes
=
"分页查询大家都在学"
)
@GetMapping
(
value
=
"/queryPersonMoreByPagination"
)
@GetMapping
(
value
=
"/queryPersonMoreByPagination"
)
public
Result
queryPersonMoreByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
public
Result
queryPersonMoreByPagination
(
CurUser
curUser
)
{
String
userId
=
curUser
.
getUserId
();
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
(),
userId
);
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
...
@@ -128,7 +128,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -128,7 +128,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"607 分页查询企业推荐"
,
notes
=
"分页查询企业推荐"
)
@ApiOperation
(
value
=
"607 分页查询企业推荐"
,
notes
=
"分页查询企业推荐"
)
@GetMapping
(
value
=
"/queryRecommendByPagination"
)
@GetMapping
(
value
=
"/queryRecommendByPagination"
)
public
Result
queryRecommendByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
public
Result
queryRecommendByPagination
(
CurUser
curUser
)
{
String
userId
=
curUser
.
getUserId
();
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryRecommendByPagination
(
getPaginationUtility
(),
userId
);
bLessonService
.
queryRecommendByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
...
@@ -237,13 +237,4 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -237,13 +237,4 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
gridModel
);
}
}
@ApiOperation
(
value
=
"616 我学习的课程总数"
,
notes
=
"我学习的课程总数"
)
@GetMapping
(
value
=
"/iLearnLessonCount"
)
public
Result
iLearnLessonCount
(
CurUser
curUser
)
{
String
userId
=
curUser
.
getUserId
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonPersonService
.
iLearnLessonCount
(
userId
));
}
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
61830035
...
@@ -2,7 +2,6 @@ package org.rcisoft.business.blesson.dao;
...
@@ -2,7 +2,6 @@ package org.rcisoft.business.blesson.dao;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blesson.dto.ILearnCountDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
...
@@ -29,6 +28,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
...
@@ -29,6 +28,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
" and blp.person_id = #{userId} "
+
" and blp.person_id = #{userId} "
+
" <if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> "
+
" <if test= \" param.isFinish != null and param.isFinish != ''\">and blp.is_finish = #{param.isFinish} </if> "
+
" <if test= \" param.lessonType !=null and param.lessonType != ''\">and bl.lesson_type = #{param.lessonType} </if> "
+
" <if test= \" param.lessonType !=null and param.lessonType != ''\">and bl.lesson_type = #{param.lessonType} </if> "
+
// " <if test= \" param.startFlag !=null and param.startFlag != ''\">and blp.start_flag = #{param.startFlag} </if> " +
" <if test= \" param.isAppoint !=null and param.isAppoint != ''\">and blp.is_appoint = #{param.isAppoint} </if> "
+
" order by blp.update_date desc</script>"
)
" order by blp.update_date desc</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryLearnBLessons
(
@Param
(
"param"
)
ILearnLessonDTO
param
,
@Param
(
"userId"
)
String
userId
);
List
<
BLesson
>
queryLearnBLessons
(
@Param
(
"param"
)
ILearnLessonDTO
param
,
@Param
(
"userId"
)
String
userId
);
...
@@ -39,12 +40,5 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
...
@@ -39,12 +40,5 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
@Update
(
"update b_lesson_label set flag = 0 where business_id = #{id}"
)
@Update
(
"update b_lesson_label set flag = 0 where business_id = #{id}"
)
int
quit
(
String
id
);
int
quit
(
String
id
);
@Select
({
"<script>"
,
" select "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '1') finishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '0') notFinishCount "
+
"</script>"
})
ILearnCountDTO
iLearnLessonCount
(
String
userId
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
61830035
...
@@ -115,7 +115,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -115,7 +115,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <if test= \" lessonType !=null and lessonType != ''\">and bl.lesson_type = #{lessonType} </if> "
+
" <if test= \" lessonType !=null and lessonType != ''\">and bl.lesson_type = #{lessonType} </if> "
+
" <if test= \" recommend !=null and recommend != ''\">and bl.recommend = #{recommend} </if> "
+
" <if test= \" recommend !=null and recommend != ''\">and bl.recommend = #{recommend} </if> "
+
" <if test= \" lecturerName !=null and lecturerName != ''\">and bl.lesson_name like CONCAT('%',#{lecturerName},'%') </if> "
+
" <if test= \" lecturerName !=null and lecturerName != ''\">and bl.lesson_name like CONCAT('%',#{lecturerName},'%') </if> "
+
" order by bl.release_date desc"
+
" order by bl.release_date desc
"
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryAllBLesson
(
FindAllLessonDTO
param
);
List
<
BLesson
>
queryAllBLesson
(
FindAllLessonDTO
param
);
...
@@ -140,8 +140,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -140,8 +140,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <if test=\"departs != null and departs.size() > 0 \"> "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>) "
+
" </if>) "
+
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') "
+
//ZXRS 在学人数
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') "
+
//ZXRS 在学人数
" order by bl.person_number,bl.release_date desc "
+
" order by bl.person_number,bl.release_date desc "
+
"</script>"
)
"</script>"
)
...
@@ -182,8 +184,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -182,8 +184,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and br.del_flag != 1 and br.flag = 1 "
+
" and br.del_flag != 1 and br.flag = 1 "
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((brs.type = 0 and brs.target_id = #{userId}) "
+
" and ((brs.type = 0 and brs.target_id = #{userId}) "
+
" <if test=\"departs != null and departs.size() > 0 \"> "
+
" or (brs.type = 1 and brs.target_id in "
+
" or (brs.type = 1 and brs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>) "
+
" </if>) "
+
" order by br.update_date "
+
" order by br.update_date "
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
@@ -228,8 +232,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -228,8 +232,10 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" <if test=\"departs != null and departs.size() > 0 \"> "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>) "
+
" </if>) "
+
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') "
+
//ZXRS 关注人数
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') "
+
//ZXRS 关注人数
" order by bl.collect_number,bl.release_date desc "
+
" order by bl.collect_number,bl.release_date desc "
+
"</script>"
)
"</script>"
)
...
@@ -250,45 +256,47 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -250,45 +256,47 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
// " order by bl.hot_number desc " +
// " order by bl.hot_number desc " +
// "</script>")
// "</script>")
// @ResultMap(value = "BaseResultMap")
// @ResultMap(value = "BaseResultMap")
@Select
(
" <script> SELECT b.* "
+
@Select
(
" <script> SELECT DISTINCT b.* "
+
" ,su.name lecturerName "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" ,suc.name createByName "
+
" FROM "
+
" FROM "
+
" b_lesson b "
+
" b_lesson b "
+
" LEFT JOIN b_lesson_label bl ON b.business_id = bl.lesson_id"
+
" LEFT JOIN b_lesson_label bl ON b.business_id = bl.lesson_id"
+
" inner JOIN ( "
+
" inner JOIN ( "
+
" SELECT "
+
" SELECT "
+
" bla.business_id AS bussinessId, "
+
" bla.business_id AS bussinessId, "
+
" count( 1 ) AS bsum "
+
" count( 1 ) AS bsum "
+
" FROM "
+
" FROM "
+
" b_label bla "
+
" b_label bla "
+
" LEFT JOIN b_lesson_label bl ON bla.business_id = bl.label_id "
+
" LEFT JOIN b_lesson_label bl ON bla.business_id = bl.label_id "
+
" LEFT JOIN b_lesson b ON bl.lesson_id = b.business_id "
+
" LEFT JOIN b_lesson b ON bl.lesson_id = b.business_id "
+
" LEFT JOIN b_lesson_person bp ON b.business_id = bp.lesson_id "
+
" LEFT JOIN b_lesson_person bp ON b.business_id = bp.lesson_id "
+
" WHERE "
+
" WHERE "
+
" bp.person_id = #{userId} "
+
" bp.person_id = #{userId} "
+
" and b.del_flag != 1 and b.flag = 1 "
+
" and b.del_flag != 1 and b.flag = 1 "
+
" and bp.del_flag != 1 and bp.flag = 1 "
+
" and bp.del_flag != 1 and bp.flag = 1 "
+
" GROUP BY "
+
" GROUP BY "
+
" bla.business_id "
+
" bla.business_id "
+
" ) T ON T.bussinessId = bl.label_id "
+
" ) T ON T.bussinessId = bl.label_id "
+
" left join s_user su on su.business_id = b.lecturer_id "
+
" left join s_user su on su.business_id = b.lecturer_id "
+
" left join s_user suc on suc.business_id = b.create_by "
+
" left join s_user suc on suc.business_id = b.create_by "
+
" left join b_viewrange bv on bl.business_id = bv.lesson_id "
+
" left join b_viewrange bv on b.business_id = bv.lesson_id "
+
" left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id "
+
" left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id "
+
" where b.del_flag != 1 and b.flag = 1 "
+
" where b.del_flag != 1 and b.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and b.business_id not in (SELECT DISTINCT b.business_id from "
+
" and b.business_id not in (SELECT DISTINCT b.business_id from "
+
" b_lesson b left join b_lesson_person blp on b.business_id = blp.lesson_id "
+
" b_lesson b left join b_lesson_person blp on b.business_id = blp.lesson_id "
+
" where blp.person_id = #{userId} ) "
+
" where blp.person_id = #{userId} ) "
+
" and b.release_state = 2 "
+
" and b.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <if test=\"departs != null and departs.size() > 0 \"> "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" order by T.bsum , b.collect_number "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>) "
+
"</script>"
)
" </if>) "
+
" order by T.bsum , b.collect_number "
+
"</script>"
)
List
<
BLesson
>
queryInterested
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
List
<
BLesson
>
queryInterested
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
//查询课程中的标签
//查询课程中的标签
...
@@ -302,17 +310,31 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -302,17 +310,31 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"</script>"
)
"</script>"
)
List
<
QueryLabelResDTO
>
queryLabelByLessonId
(
String
lessonId
);
List
<
QueryLabelResDTO
>
queryLabelByLessonId
(
String
lessonId
);
/**
* 首页分页查询全部课程
* @param firstPageQueryDTO
* @param sonCourseIds
* @return
*/
@Select
(
" <script> select bl.* "
+
@Select
(
" <script> select bl.* "
+
" ,su.name lecturerName "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" ,suc.name createByName "
+
" from b_lesson bl "
+
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" left join b_viewrange bv on bl.business_id = bv.lesson_id "
+
" left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id "
+
// " left join b_course bc on bc.business_id = bl.course_id " +
// " left join b_course bc on bc.business_id = bl.course_id " +
" where bl.del_flag != 1 and bl.flag = 1 "
+
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{param.userId}) "
+
" <if test=\"param.departs != null and param.departs.size() > 0 \"> "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)"
+
" </if>) "
+
" <if test= \" param.viewParam !=null and param.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{param.viewParam},'%') "
+
" <if test= \" param.viewParam !=null and param.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{param.viewParam},'%') "
+
" or su.name like CONCAT('%',#{param.viewParam},'%'))</if> "
+
" or su.name like CONCAT('%',#{param.viewParam},'%'))</if> "
+
" <if test= \" courseIds !=null and courseIds.size() > 0 \">and course_id in "
+
" <if test= \" courseIds !=null and courseIds.size() > 0 \">and course_id in "
+
...
@@ -346,8 +368,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -346,8 +368,9 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '1') finishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '2') finishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '0') notFinishCount "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '1') notFinishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '0') notStartCount "
+
"</script>"
})
"</script>"
})
ILessonCountDTO
iLessonCount
(
String
userId
);
ILessonCountDTO
iLessonCount
(
String
userId
);
...
...
src/main/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
View file @
61830035
...
@@ -51,4 +51,10 @@ public class AddLessonDTO {
...
@@ -51,4 +51,10 @@ public class AddLessonDTO {
@ApiModelProperty
(
value
=
"标签集合,使用','分隔"
)
@ApiModelProperty
(
value
=
"标签集合,使用','分隔"
)
private
String
labels
;
private
String
labels
;
@ApiModelProperty
(
value
=
"可见范围(人)多人之间用','隔开"
)
private
String
viewRangePerson
;
@ApiModelProperty
(
value
=
"可见范围(部门)多人之间用','隔开"
)
private
String
viewRangeDepart
;
}
}
src/main/java/org/rcisoft/business/blesson/dto/BViewRangeSonDTO.java
0 → 100644
View file @
61830035
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
@Data
public
class
BViewRangeSonDTO
{
@ApiModelProperty
(
value
=
"主键"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
value
;
@ApiModelProperty
(
value
=
"可见范围id"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
viewrangeId
;
@ApiModelProperty
(
value
=
"可见类型(0:人 1:部门)"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
type
;
@ApiModelProperty
(
value
=
"人/部门id"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
targetId
;
}
src/main/java/org/rcisoft/business/blesson/dto/FirstPageQueryDTO.java
View file @
61830035
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
java.util.List
;
@Data
@Data
public
class
FirstPageQueryDTO
{
public
class
FirstPageQueryDTO
{
...
@@ -15,4 +17,9 @@ public class FirstPageQueryDTO {
...
@@ -15,4 +17,9 @@ public class FirstPageQueryDTO {
@ApiModelProperty
(
value
=
"查询参数"
,
required
=
false
)
@ApiModelProperty
(
value
=
"查询参数"
,
required
=
false
)
private
String
viewParam
;
private
String
viewParam
;
private
String
userId
;
//部门id
private
List
<
String
>
departs
;
}
}
src/main/java/org/rcisoft/business/blesson/dto/ILearnCountDTO.java
deleted
100644 → 0
View file @
c927c282
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
ILearnCountDTO
{
}
src/main/java/org/rcisoft/business/blesson/dto/ILearnLessonDTO.java
View file @
61830035
...
@@ -9,6 +9,7 @@ import org.hibernate.validator.constraints.Length;
...
@@ -9,6 +9,7 @@ import org.hibernate.validator.constraints.Length;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
@Entity
@Entity
@Table
(
name
=
"b_lesson_label"
)
@Table
(
name
=
"b_lesson_label"
)
...
@@ -18,11 +19,20 @@ import javax.persistence.Table;
...
@@ -18,11 +19,20 @@ import javax.persistence.Table;
public
class
ILearnLessonDTO
{
public
class
ILearnLessonDTO
{
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@ApiModelProperty
(
value
=
"是否
学完 0:未学完 1:已学完
"
)
@ApiModelProperty
(
value
=
"是否
已学完(0:未开始 1:已开始 2: 已学完)
"
)
private
String
isFinish
;
private
String
isFinish
;
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@ApiModelProperty
(
value
=
"课程类型 0 课程 1 培训"
)
@ApiModelProperty
(
value
=
"课程类型 0 课程 1 培训"
)
private
String
lessonType
;
private
String
lessonType
;
// @ApiModelProperty(value = "是否开始学习")
// private String startFlag;
@ApiModelProperty
(
value
=
"是否为指派课程(0非必修(自选) 1必修(指派))"
)
private
String
isAppoint
;
// @ApiModelProperty(value = "指派课程id")
// private String appointId;
}
}
src/main/java/org/rcisoft/business/blesson/dto/ILessonCountDTO.java
View file @
61830035
...
@@ -27,4 +27,7 @@ public class ILessonCountDTO {
...
@@ -27,4 +27,7 @@ public class ILessonCountDTO {
@ApiModelProperty
(
value
=
"我未学完课程数量"
)
@ApiModelProperty
(
value
=
"我未学完课程数量"
)
private
String
notFinishCount
;
private
String
notFinishCount
;
@ApiModelProperty
(
value
=
"我未开始课程数量"
)
private
String
notStartCount
;
}
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
61830035
...
@@ -121,5 +121,13 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -121,5 +121,13 @@ public class BLesson extends IdEntity<BLesson> {
@ApiModelProperty
(
value
=
"分类名"
)
@ApiModelProperty
(
value
=
"分类名"
)
@Transient
@Transient
private
String
courseName
;
private
String
courseName
;
@ApiModelProperty
(
value
=
"可见范围(人)多人之间用','隔开"
)
@Transient
private
String
viewRangePerson
;
@ApiModelProperty
(
value
=
"可见范围(部门)多人之间用','隔开"
)
@Transient
private
String
viewRangeDepart
;
}
}
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
61830035
...
@@ -36,7 +36,7 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -36,7 +36,7 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
learnProgress
;
private
String
learnProgress
;
@ApiModelProperty
(
value
=
"是否
学完 0:未学完 1:已学完
"
)
@ApiModelProperty
(
value
=
"是否
已学完(0:未开始 1:已开始 2: 已学完)
"
)
@NotBlank
@NotBlank
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
isFinish
;
private
String
isFinish
;
...
@@ -46,6 +46,19 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -46,6 +46,19 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
isCollect
;
private
String
isCollect
;
@ApiModelProperty
(
value
=
"指派id"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
appointId
;
// @ApiModelProperty(value = "是否开始")
// @Length(min = 1,max = 1,message = "长度最小为1,最大为1")
// private String startFlag;
@ApiModelProperty
(
value
=
"是否为指派(0自选(选修) 1指派(必修))"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
isAppoint
;
@ApiModelProperty
(
value
=
"课程名称"
)
@ApiModelProperty
(
value
=
"课程名称"
)
@Transient
@Transient
private
String
lessonName
;
private
String
lessonName
;
...
@@ -86,4 +99,6 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -86,4 +99,6 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
@Transient
private
String
lessonType
;
private
String
lessonType
;
}
}
src/main/java/org/rcisoft/business/blesson/entity/BViewrange.java
0 → 100644
View file @
61830035
package
org
.
rcisoft
.
business
.
blesson
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.hibernate.validator.constraints.Length
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"b_viewrange"
)
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
BViewrange
extends
IdEntity
<
BViewrange
>
{
@ApiModelProperty
(
value
=
"课程id"
)
@Length
(
min
=
1
,
max
=
64
,
message
=
"长度最小为1,最大为50"
)
private
String
lessonId
;
@ApiModelProperty
(
value
=
"可视范围类型(0 人 1 部门 2 人和部门)"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为50"
)
private
String
type
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonPersonService.java
View file @
61830035
package
org
.
rcisoft
.
business
.
blesson
.
service
;
package
org
.
rcisoft
.
business
.
blesson
.
service
;
import
org.rcisoft.business.blesson.dto.ILearnCountDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
...
@@ -27,10 +26,5 @@ public interface BLessonPersonService {
...
@@ -27,10 +26,5 @@ public interface BLessonPersonService {
*/
*/
List
<
BLesson
>
queryLearnBLessonsByPagination
(
PageUtil
pageUtil
,
ILearnLessonDTO
model
,
String
userId
);
List
<
BLesson
>
queryLearnBLessonsByPagination
(
PageUtil
pageUtil
,
ILearnLessonDTO
model
,
String
userId
);
/**
* 我学习的课程总数
* @param userId
* @return
*/
ILearnCountDTO
iLearnLessonCount
(
String
userId
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
61830035
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
import
org.rcisoft.business.blesson.dto.ILearnCountDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.dao.BLessonPersonRepository
;
import
org.rcisoft.business.blesson.dao.BLessonPersonRepository
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
...
@@ -38,10 +37,6 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -38,10 +37,6 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
return
bLessonPersonRepository
.
queryLearnBLessons
(
model
,
userId
);
return
bLessonPersonRepository
.
queryLearnBLessons
(
model
,
userId
);
}
}
@Override
public
ILearnCountDTO
iLearnLessonCount
(
String
userId
)
{
return
bLessonPersonRepository
.
iLearnLessonCount
(
userId
);
}
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
61830035
...
@@ -113,6 +113,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -113,6 +113,7 @@ public class BLessonServiceImpl implements BLessonService {
BLesson
model
=
new
BLesson
();
BLesson
model
=
new
BLesson
();
BeanUtils
.
copyProperties
(
addLessonDTO
,
model
);
BeanUtils
.
copyProperties
(
addLessonDTO
,
model
);
int
line
=
0
;
int
line
=
0
;
//标签集合
List
<
BLessonLabel
>
bLessonLabels
=
new
ArrayList
<>();
List
<
BLessonLabel
>
bLessonLabels
=
new
ArrayList
<>();
if
(
model
.
getBusinessId
()==
null
)
{
if
(
model
.
getBusinessId
()==
null
)
{
model
.
setDefaultUrl
(
global
.
getDEFAULT_COURSE_LOCATION
());
model
.
setDefaultUrl
(
global
.
getDEFAULT_COURSE_LOCATION
());
...
@@ -135,6 +136,12 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -135,6 +136,12 @@ public class BLessonServiceImpl implements BLessonService {
model
.
setCollectNumber
(
"0"
);
model
.
setCollectNumber
(
"0"
);
//添加课程表
//添加课程表
line
=
bLessonRepository
.
insertSelective
(
model
);
line
=
bLessonRepository
.
insertSelective
(
model
);
//添加可见范围
//添加课程标签表
//添加课程标签表
if
(
StringUtils
.
isNotEmpty
(
model
.
getLabels
())){
if
(
StringUtils
.
isNotEmpty
(
model
.
getLabels
())){
String
[]
labels
=
model
.
getLabels
().
split
(
","
);
String
[]
labels
=
model
.
getLabels
().
split
(
","
);
...
@@ -189,6 +196,11 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -189,6 +196,11 @@ public class BLessonServiceImpl implements BLessonService {
@Override
@Override
public
List
<
BLesson
>
queryHomeBLessonsByPagination
(
PageUtil
pageUtil
,
FirstPageQueryDTO
firstPageQueryDTO
,
List
<
AllCourseDTO
>
allCourse
)
{
public
List
<
BLesson
>
queryHomeBLessonsByPagination
(
PageUtil
pageUtil
,
FirstPageQueryDTO
firstPageQueryDTO
,
List
<
AllCourseDTO
>
allCourse
)
{
List
<
String
>
departs
=
new
ArrayList
<>();
departs
.
add
(
"1"
);
departs
.
add
(
"2"
);
departs
.
add
(
"3"
);
firstPageQueryDTO
.
setDeparts
(
departs
);
List
<
String
>
sonCourseIds
=
null
;
List
<
String
>
sonCourseIds
=
null
;
if
(
allCourse
!=
null
){
if
(
allCourse
!=
null
){
sonCourseIds
=
recursion
.
FindSons
(
firstPageQueryDTO
.
getCourseLevelOne
(),
allCourse
);
sonCourseIds
=
recursion
.
FindSons
(
firstPageQueryDTO
.
getCourseLevelOne
(),
allCourse
);
...
...
src/main/resources/mapper/business/blesson
person.mapper/BLes
sonMapper.xml
→
src/main/resources/mapper/business/blesson
/mapper/BLessonPer
sonMapper.xml
View file @
61830035
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
<result
column=
"learn_progress"
jdbcType=
"VARCHAR"
property=
"learnProgress"
/>
<result
column=
"learn_progress"
jdbcType=
"VARCHAR"
property=
"learnProgress"
/>
<result
column=
"is_finish"
jdbcType=
"VARCHAR"
property=
"isFinish"
/>
<result
column=
"is_finish"
jdbcType=
"VARCHAR"
property=
"isFinish"
/>
<result
column=
"is_collect"
jdbcType=
"VARCHAR"
property=
"isCollect"
/>
<result
column=
"is_collect"
jdbcType=
"VARCHAR"
property=
"isCollect"
/>
<result
column=
"appoint_id"
jdbcType=
"VARCHAR"
property=
"appointId"
/>
<!--<result column="start_flag" jdbcType="VARCHAR" property="startFlag"/>-->
<result
column=
"is_appoint"
jdbcType=
"VARCHAR"
property=
"isAppoint"
/>
</resultMap>
</resultMap>
</mapper>
</mapper>
\ No newline at end of file
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