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
20af146c
Commit
20af146c
authored
Sep 27, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页接口
parent
59afbbbe
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
174 additions
and
93 deletions
+174
-93
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+10
-7
BLessonPersonController.java
.../business/blesson/controller/BLessonPersonController.java
+0
-33
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+3
-2
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+121
-29
ILearnCountDTO.java
...java/org/rcisoft/business/blesson/dto/ILearnCountDTO.java
+0
-8
ILessonCountDTO.java
...ava/org/rcisoft/business/blesson/dto/ILessonCountDTO.java
+11
-1
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+4
-4
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+25
-9
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
20af146c
...
@@ -117,7 +117,8 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -117,7 +117,8 @@ 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
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
());
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryPersonMoreByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
@@ -125,7 +126,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -125,7 +126,7 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
gridModel
);
}
}
@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
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
String
userId
=
curUser
.
getUserId
();
String
userId
=
curUser
.
getUserId
();
...
@@ -140,7 +141,8 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -140,7 +141,8 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"608 分页查询最受关注"
,
notes
=
"分页查询最受关注"
)
@ApiOperation
(
value
=
"608 分页查询最受关注"
,
notes
=
"分页查询最受关注"
)
@GetMapping
(
value
=
"/queryConcernByPagination"
)
@GetMapping
(
value
=
"/queryConcernByPagination"
)
public
Result
queryConcernByPagination
(
CurUser
curUser
)
{
public
Result
queryConcernByPagination
(
CurUser
curUser
)
{
bLessonService
.
queryConcernByPagination
(
getPaginationUtility
());
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryConcernByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
@@ -152,7 +154,8 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -152,7 +154,8 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation
(
value
=
"609 分页查询可能感兴趣"
,
notes
=
"分页查询可能感兴趣"
)
@ApiOperation
(
value
=
"609 分页查询可能感兴趣"
,
notes
=
"分页查询可能感兴趣"
)
@GetMapping
(
value
=
"/queryInterestedByPagination"
)
@GetMapping
(
value
=
"/queryInterestedByPagination"
)
public
Result
queryInterestedByPagination
(
CurUser
curUser
)
{
public
Result
queryInterestedByPagination
(
CurUser
curUser
)
{
bLessonService
.
queryInterestedByPagination
(
getPaginationUtility
());
String
userId
=
curUser
.
getUserId
();
bLessonService
.
queryInterestedByPagination
(
getPaginationUtility
(),
userId
);
GridModel
gridModel
=
getGridModelResponse
();
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
...
@@ -199,13 +202,13 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -199,13 +202,13 @@ public class BLessonController extends PaginationController<BLesson> {
}
}
@ApiOperation
(
value
=
"613 我发布的课程总数"
,
notes
=
"我发布的课程总数"
)
@ApiOperation
(
value
=
"613 我发布的课程总数"
,
notes
=
"我发布的课程总数"
)
@GetMapping
(
value
=
"/i
Publish
Count"
)
@GetMapping
(
value
=
"/i
Lesson
Count"
)
public
Result
iPublishCount
(
CurUser
curUser
)
{
public
Result
ILessonCountDTO
(
CurUser
curUser
)
{
String
userId
=
curUser
.
getUserId
();
String
userId
=
curUser
.
getUserId
();
return
Result
.
builder
(
new
PersistModel
(
1
),
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
i
Publish
Count
(
userId
));
bLessonService
.
i
Lesson
Count
(
userId
));
}
}
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonPersonController.java
deleted
100644 → 0
View file @
59afbbbe
package
org
.
rcisoft
.
business
.
blesson
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.dto.ILearnLessonDTO
;
import
org.rcisoft.business.blesson.service.BLessonPersonService
;
import
org.rcisoft.common.controller.PaginationController
;
import
org.rcisoft.common.model.GridModel
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.Result
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
@Api
(
tags
=
"9 学生-课程"
)
@RestController
@RequestMapping
(
"/BLessonPerson"
)
@Slf4j
public
class
BLessonPersonController
extends
PaginationController
<
BLesson
>
{
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
20af146c
...
@@ -40,9 +40,10 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
...
@@ -40,9 +40,10 @@ public interface BLessonPersonRepository extends BaseMapper<BLabel> {
int
quit
(
String
id
);
int
quit
(
String
id
);
@Select
({
"<script>"
,
@Select
({
"<script>"
,
" select (select COUNT(1) from b_lesson_person where person_id = #{userId} ) learnAllCount, "
+
" 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 = '1') 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 = '0') notFinishCount "
+
"</script>"
})
"</script>"
})
ILearnCountDTO
iLearnLessonCount
(
String
userId
);
ILearnCountDTO
iLearnLessonCount
(
String
userId
);
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
20af146c
...
@@ -2,11 +2,9 @@ package org.rcisoft.business.blesson.dao;
...
@@ -2,11 +2,9 @@ package org.rcisoft.business.blesson.dao;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.blabel.dto.QueryLabelResDTO
;
import
org.rcisoft.business.blabel.dto.QueryLabelResDTO
;
import
org.rcisoft.business.blabel.entity.BLabel
;
import
org.rcisoft.business.blesson.dto.BLessonIPublishDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.blesson.dto.FindAllLessonDTO
;
import
org.rcisoft.business.blesson.dto.FirstPageQueryDTO
;
import
org.rcisoft.business.blesson.dto.FirstPageQueryDTO
;
import
org.rcisoft.business.blesson.dto.I
Publish
CountDTO
;
import
org.rcisoft.business.blesson.dto.I
Lesson
CountDTO
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
...
@@ -133,74 +131,165 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -133,74 +131,165 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" 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_type " +
// " left join b_course bc on bc.business_id = bl.course_type " +
" 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 "
+
" order by bl.person_number desc "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') "
+
//ZXRS 在学人数
" order by bl.person_number,bl.release_date desc "
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryPersonMore
();
List
<
BLesson
>
queryPersonMore
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
/**
/**
* 按学习人数降序查询推荐
* 按学习人数降序查询推荐
* @param
* @param
* @return
* @return
*/
*/
// @Select(" <script> select bl.* " +
// " ,su.name lecturerName " +
// " ,suc.name createByName " +
// " from b_recommend br " +
// " left join b_lesson bl on br.lesson_id = bl.business_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 " +
// " where bl.del_flag != 1 and bl.flag = 1 " +
// " and su.del_flag != 1 and su.flag = 1 " +
// " and suc.del_flag != 1 and suc.flag = 1 " +
// " and bl.release_state = 2 " +
// " and br.person_id = #{userId} " +
// " order by bl.recommend_time desc " +
// "</script>")
@Select
(
" <script> select bl.* "
+
@Select
(
" <script> select bl.* "
+
" ,su.name lecturerName "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" ,suc.name createByName "
+
" from b_recommend br "
+
" from b_lesson bl "
+
" left join b_lesson bl on br.lesson_id = bl.business_id "
+
" 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_recommend br on bl.business_id = br.lesson_id "
+
" left join b_recommend_son brs on br.business_id = brs.recommend_id "
+
// " left join b_course bc on bc.business_id = bl.course_type " +
" 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 br.del_flag != 1 and br.flag = 1 "
+
" and bl.release_state = 2 "
+
" and bl.release_state = 2 "
+
" and br.person_id = #{userId} "
+
" and ((brs.type = 0 and brs.target_id = #{userId}) "
+
" order by bl.person_number desc "
+
" or (brs.type = 1 and brs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" order by br.update_date "
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryRecommend
(
String
userId
);
List
<
BLesson
>
queryRecommend
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
/**
/**
* 按学习人数降序查询
* 按学习人数降序查询
* @param
* @param
* @return
* @return
*/
*/
// @Select(" <script> select bl.* " +
// " ,su.name lecturerName " +
// " ,suc.name createByName " +
// " from b_lesson bl " +
// " left join s_user su on su.business_id = bl.lecturer_id " +
//
// //" and su.COP == " //企业id
//
// " left join s_user suc on suc.business_id = bl.create_by " +
//// " left join b_course bc on bc.business_id = bl.course_type " +
// " where bl.del_flag != 1 and bl.flag = 1 " +
//
// //" and COP == " //企业id
//
// " and su.del_flag != 1 and su.flag = 1 " +
// " and suc.del_flag != 1 and suc.flag = 1 " +
// " and bl.release_state = 2 " +
// " order by bl.collect_number desc " +
// "</script>")
@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_type " +
// " left join b_course bc on bc.business_id = bl.course_type " +
" 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 "
+
" order by bl.collect_number desc "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') "
+
//ZXRS 关注人数
" order by bl.collect_number,bl.release_date desc "
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLesson
>
queryConcern
();
List
<
BLesson
>
queryConcern
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
@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_course bc on bc.business_id = bl.course_type " +
//// " left join b_course bc on bc.business_id = bl.course_type " +
" 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 bl.release_state = 2 "
+
// " and bl.release_state = 2 " +
" order by bl.hot_number desc "
+
// " order by bl.hot_number desc " +
"</script>"
)
// "</script>")
@ResultMap
(
value
=
"BaseResultMap"
)
// @ResultMap(value = "BaseResultMap")
List
<
BLesson
>
queryInterested
();
@Select
(
" <script> SELECT b.* "
+
" ,su.name lecturerName "
+
" ,suc.name createByName "
+
" FROM "
+
" b_lesson b "
+
" LEFT JOIN b_lesson_label bl ON b.business_id = bl.lesson_id"
+
" inner JOIN ( "
+
" SELECT "
+
" bla.business_id AS bussinessId, "
+
" count( 1 ) AS bsum "
+
" FROM "
+
" b_label bla "
+
" 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_person bp ON b.business_id = bp.lesson_id "
+
" WHERE "
+
" bp.person_id = #{userId} "
+
" and b.del_flag != 1 and b.flag = 1 "
+
" and bp.del_flag != 1 and bp.flag = 1 "
+
" GROUP BY "
+
" bla.business_id "
+
" ) T ON T.bussinessId = bl.label_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 b_viewrange bv on bl.business_id = bv.lesson_id "
+
" left join b_viewrange_son bvs on bv.business_id = bvs.viewrange_id "
+
" where b.del_flag != 1 and b.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" 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 "
+
" where blp.person_id = #{userId} ) "
+
" and b.release_state = 2 "
+
" and ((bvs.type = 0 and bvs.target_id = #{userId}) "
+
" or (bvs.type = 1 and bvs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)) "
+
" order by T.bsum , b.collect_number "
+
"</script>"
)
List
<
BLesson
>
queryInterested
(
@Param
(
"userId"
)
String
userId
,
@Param
(
"departs"
)
List
<
String
>
departs
);
//查询课程中的标签
//查询课程中的标签
@Select
(
" <script> select blb.business_id businessId,blb.l_name lName"
+
@Select
(
" <script> select blb.business_id businessId,blb.l_name lName"
+
...
@@ -255,9 +344,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -255,9 +344,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" select (select COUNT(1) from b_lesson where lecturer_id = #{userId} ) publishAllCount, "
+
" select (select COUNT(1) from b_lesson where lecturer_id = #{userId} ) publishAllCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(select COUNT(1) from b_lesson where lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(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} and is_finish = '1') finishCount, "
+
"(select COUNT(1) from b_lesson_person where person_id = #{userId} and is_finish = '0') notFinishCount "
+
"</script>"
})
"</script>"
})
I
PublishCountDTO
iPublish
Count
(
String
userId
);
I
LessonCountDTO
iLesson
Count
(
String
userId
);
}
}
src/main/java/org/rcisoft/business/blesson/dto/ILearnCountDTO.java
View file @
20af146c
...
@@ -6,13 +6,5 @@ import lombok.Data;
...
@@ -6,13 +6,5 @@ import lombok.Data;
@Data
@Data
public
class
ILearnCountDTO
{
public
class
ILearnCountDTO
{
@ApiModelProperty
(
value
=
"我学习全部课程数量"
)
private
String
learnAllCount
;
@ApiModelProperty
(
value
=
"我学完课程数量"
)
private
String
finishCount
;
@ApiModelProperty
(
value
=
"我未学完课程数量"
)
private
String
notFinishCount
;
}
}
src/main/java/org/rcisoft/business/blesson/dto/I
Publish
CountDTO.java
→
src/main/java/org/rcisoft/business/blesson/dto/I
Lesson
CountDTO.java
View file @
20af146c
...
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
I
Publish
CountDTO
{
public
class
I
Lesson
CountDTO
{
@ApiModelProperty
(
value
=
"我发布全部课程数量"
)
@ApiModelProperty
(
value
=
"我发布全部课程数量"
)
private
String
publishAllCount
;
private
String
publishAllCount
;
...
@@ -17,4 +17,14 @@ public class IPublishCountDTO {
...
@@ -17,4 +17,14 @@ public class IPublishCountDTO {
@ApiModelProperty
(
value
=
"我发布已关闭课程数量"
)
@ApiModelProperty
(
value
=
"我发布已关闭课程数量"
)
private
String
closedCount
;
private
String
closedCount
;
@ApiModelProperty
(
value
=
"我学习全部课程数量"
)
private
String
learnAllCount
;
@ApiModelProperty
(
value
=
"我学完课程数量"
)
private
String
finishCount
;
@ApiModelProperty
(
value
=
"我未学完课程数量"
)
private
String
notFinishCount
;
}
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
20af146c
...
@@ -50,7 +50,7 @@ public interface BLessonService{
...
@@ -50,7 +50,7 @@ public interface BLessonService{
* @param
* @param
* @return
* @return
*/
*/
List
<
BLesson
>
queryPersonMoreByPagination
(
PageUtil
pageUtil
);
List
<
BLesson
>
queryPersonMoreByPagination
(
PageUtil
pageUtil
,
String
userId
);
/**
/**
* 分页查找推荐
* 分页查找推荐
...
@@ -66,7 +66,7 @@ public interface BLessonService{
...
@@ -66,7 +66,7 @@ public interface BLessonService{
* @param
* @param
* @return
* @return
*/
*/
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
);
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
,
String
userId
);
/**
/**
* 分页查找可能感兴趣的
* 分页查找可能感兴趣的
...
@@ -74,7 +74,7 @@ public interface BLessonService{
...
@@ -74,7 +74,7 @@ public interface BLessonService{
* @param
* @param
* @return
* @return
*/
*/
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
);
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
,
String
userId
);
/**
/**
* 插入
* 插入
...
@@ -116,6 +116,6 @@ public interface BLessonService{
...
@@ -116,6 +116,6 @@ public interface BLessonService{
* @param userId
* @param userId
* @return
* @return
*/
*/
I
PublishCountDTO
iPublish
Count
(
String
userId
);
I
LessonCountDTO
iLesson
Count
(
String
userId
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
20af146c
...
@@ -73,21 +73,37 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -73,21 +73,37 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
public
List
<
BLesson
>
queryPersonMoreByPagination
(
PageUtil
pageUtil
)
{
public
List
<
BLesson
>
queryPersonMoreByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
return
bLessonRepository
.
queryPersonMore
();
List
<
String
>
departs
=
new
ArrayList
<>();
departs
.
add
(
"1"
);
departs
.
add
(
"2"
);
departs
.
add
(
"3"
);
return
bLessonRepository
.
queryPersonMore
(
userId
,
departs
);
}
}
@Override
@Override
public
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
public
List
<
BLesson
>
queryRecommendByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
return
bLessonRepository
.
queryRecommend
(
userId
);
List
<
String
>
departs
=
new
ArrayList
<>();
departs
.
add
(
"1"
);
departs
.
add
(
"2"
);
departs
.
add
(
"3"
);
return
bLessonRepository
.
queryRecommend
(
userId
,
departs
);
}
}
@Override
@Override
public
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
)
{
public
List
<
BLesson
>
queryConcernByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
return
bLessonRepository
.
queryConcern
();
List
<
String
>
departs
=
new
ArrayList
<>();
departs
.
add
(
"1"
);
departs
.
add
(
"2"
);
departs
.
add
(
"3"
);
return
bLessonRepository
.
queryConcern
(
userId
,
departs
);
}
}
@Override
@Override
public
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
)
{
public
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
,
String
userId
)
{
return
bLessonRepository
.
queryInterested
();
List
<
String
>
departs
=
new
ArrayList
<>();
departs
.
add
(
"1"
);
departs
.
add
(
"2"
);
departs
.
add
(
"3"
);
return
bLessonRepository
.
queryInterested
(
userId
,
departs
);
}
}
...
@@ -196,8 +212,8 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -196,8 +212,8 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
public
I
PublishCountDTO
iPublish
Count
(
String
userId
)
{
public
I
LessonCountDTO
iLesson
Count
(
String
userId
)
{
return
bLessonRepository
.
i
Publish
Count
(
userId
);
return
bLessonRepository
.
i
Lesson
Count
(
userId
);
}
}
}
}
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