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
6541d95a
Commit
6541d95a
authored
Oct 22, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口、添加新接口
parent
4ed4c66b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
8 deletions
+93
-8
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+15
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+57
-0
ILessonCountDTO.java
...ava/org/rcisoft/business/blesson/dto/ILessonCountDTO.java
+8
-8
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+7
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+6
-0
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
6541d95a
...
...
@@ -488,6 +488,21 @@ public class BLessonController extends PaginationController<BLesson> {
setTrainIsSignDTO
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"628 我的培训总数(学习和教学)"
,
notes
=
"我的培训总数"
)
@GetMapping
(
value
=
"/iTrainCount"
)
public
Result
iTrainCount
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
String
userId
=
curUser
.
getUserId
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
iTrainCount
(
userId
));
}
// /**
// * @author: zhangqingle
// * @param
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
6541d95a
...
...
@@ -477,40 +477,97 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
*/
@Select
({
"<script>"
,
" select (select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 0 "
+
" and lecturer_id = #{userId} and release_state is not null) publishAllCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 0 "
+
" and lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 0 "
+
" and lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 0 "
+
" and lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 0 "
+
" and blp.person_id = #{userId} and is_finish is not null ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 0 "
+
" and blp.person_id = #{userId} and is_finish = '2') finishCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 0 "
+
" and blp.person_id = #{userId} and is_finish = '1') notFinishCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 0 "
+
" and blp.person_id = #{userId} and is_finish = '0') notStartCount "
+
"</script>"
})
ILessonCountDTO
iLessonCount
(
String
userId
);
/**
* 查询我教学和我学习培训数量
* @param userId
* @return
*/
@Select
({
"<script>"
,
" select (select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 1 "
+
" and lecturer_id = #{userId} and release_state is not null) publishAllCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 1 "
+
" and lecturer_id = #{userId} and release_state = '0') notPublishCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 1 "
+
" and lecturer_id = #{userId} and release_state = '2') publishedCount, "
+
"(select COUNT(1) from b_lesson where del_flag != 1 and flag = 1 "
+
" and lesson_type = 1 "
+
" and lecturer_id = #{userId} and release_state = '4') closedCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 1 "
+
" and blp.person_id = #{userId} and train_is_sign is not null ) learnAllCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 1 "
+
" and blp.person_id = #{userId} and train_is_sign = '2') finishCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 1 "
+
" and blp.person_id = #{userId} and train_is_sign = '1') notFinishCount, "
+
"(select COUNT(1) from b_lesson_person blp "
+
" LEFT join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 and blp.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.lesson_type = 1 "
+
" and blp.person_id = #{userId} and train_is_sign = '0') notStartCount "
+
"</script>"
})
ILessonCountDTO
iTrainCount
(
String
userId
);
/**
* 重新统计在学人数
* @param lessonId
...
...
src/main/java/org/rcisoft/business/blesson/dto/ILessonCountDTO.java
View file @
6541d95a
...
...
@@ -6,28 +6,28 @@ import lombok.Data;
@Data
public
class
ILessonCountDTO
{
@ApiModelProperty
(
value
=
"我发布全部课程数量"
)
@ApiModelProperty
(
value
=
"我发布全部课程
(我教学全部培训)
数量"
)
private
String
publishAllCount
;
@ApiModelProperty
(
value
=
"我发布未发布课程数量"
)
@ApiModelProperty
(
value
=
"我发布未发布课程
(我教学未发布培训)
数量"
)
private
String
notPublishCount
;
@ApiModelProperty
(
value
=
"我发布已发布课程数量"
)
@ApiModelProperty
(
value
=
"我发布已发布课程
(我教学已发布培训)
数量"
)
private
String
publishedCount
;
@ApiModelProperty
(
value
=
"我发布已关闭课程数量"
)
@ApiModelProperty
(
value
=
"我发布已关闭课程
(我教学已关闭培训)
数量"
)
private
String
closedCount
;
@ApiModelProperty
(
value
=
"我学习全部课程数量"
)
@ApiModelProperty
(
value
=
"我学习全部课程数量
(我报名全部培训数量)
"
)
private
String
learnAllCount
;
@ApiModelProperty
(
value
=
"我学完课程数量"
)
@ApiModelProperty
(
value
=
"我学完课程数量
(我报名已参加培训数量)
"
)
private
String
finishCount
;
@ApiModelProperty
(
value
=
"我未学完课程数量"
)
@ApiModelProperty
(
value
=
"我未学完课程数量
(我报名缺勤培训数量)
"
)
private
String
notFinishCount
;
@ApiModelProperty
(
value
=
"我未开始课程数量"
)
@ApiModelProperty
(
value
=
"我未开始课程数量
(我报名待参加培训数量)
"
)
private
String
notStartCount
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
6541d95a
...
...
@@ -162,6 +162,13 @@ public interface BLessonService{
* @return
*/
ILessonCountDTO
iLessonCount
(
String
userId
);
/**
* 我发布的总数
* @author: zhangqingle
* @param userId
* @return
*/
ILessonCountDTO
iTrainCount
(
String
userId
);
/**
* 分页查询列表页全部
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
6541d95a
...
...
@@ -570,6 +570,12 @@ public class BLessonServiceImpl implements BLessonService {
return
bLessonRepository
.
iLessonCount
(
userId
);
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
ILessonCountDTO
iTrainCount
(
String
userId
)
{
return
bLessonRepository
.
iTrainCount
(
userId
);
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
BLesson
>
queryListAllLessonByPagination
(
PageUtil
pageUtil
,
FindListLessonDTO
model
,
List
<
AllCourseDTO
>
allCourse
)
{
...
...
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