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
fc1e4622
Commit
fc1e4622
authored
Oct 15, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
41338b22
f753c01b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
16 deletions
+27
-16
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+1
-1
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+2
-2
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+9
-6
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+2
-0
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+13
-7
No files found.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
fc1e4622
...
@@ -442,7 +442,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -442,7 +442,7 @@ public class BLessonController extends PaginationController<BLesson> {
// MessageConstant.MESSAGE_ALERT_ERROR,
// MessageConstant.MESSAGE_ALERT_ERROR,
// appointLessonDTO);
// appointLessonDTO);
// }
// }
//
// @ApiOperation(value="625 添加我学习的课程", notes="添加我学习的课程")
// @ApiOperation(value="625 添加我学习的课程", notes="添加我学习的课程")
// @PostMapping(value = "/addMyLearnLesson")
// @PostMapping(value = "/addMyLearnLesson")
// public Result addMyLearnLesson(CurUser curUser,@Valid AddMyLearnLessonDTO addMyLearnLessonDTO,BindingResult bindingResult) {
// public Result addMyLearnLesson(CurUser curUser,@Valid AddMyLearnLessonDTO addMyLearnLessonDTO,BindingResult bindingResult) {
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
fc1e4622
...
@@ -222,7 +222,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -222,7 +222,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@Insert
(
"<script>"
+
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
" insert into b_lesson_person("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,person_id,lesson_id "
+
" del_flag,flag,remarks,person_id,lesson_id
,
"
+
" learn_progress,is_finish,is_collect, "
+
" learn_progress,is_finish,is_collect, "
+
" is_appoint) "
+
" is_appoint) "
+
" values "
+
" values "
+
...
@@ -231,5 +231,5 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -231,5 +231,5 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" #{param.learnProgress}, #{param.isFinish},#{param.isCollect},"
+
" #{param.learnProgress}, #{param.isFinish},#{param.isCollect},"
+
" #{param.isAppoint}) "
+
" #{param.isAppoint}) "
+
"</script>"
)
"</script>"
)
int
insertB
l
essonPerson
(
@Param
(
"param"
)
BLessonPerson
param
);
int
insertB
L
essonPerson
(
@Param
(
"param"
)
BLessonPerson
param
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
fc1e4622
...
@@ -502,23 +502,26 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -502,23 +502,26 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" ,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 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" and su.corp_id = #{model.corpId} "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" and suc.corp_id = #{model.corpId} "
+
" and suc.corp_id = #{model.corpId} "
+
" left join b_viewrange bv on bl.business_id = bv.lesson_id "
+
" left join b_viewrange bv on bl.business_id = bv.lesson_id "
+
" and bv.del_flag != 1 and bv.flag = 1 "
+
" and bv.corp_id = #{model.corpId} "
+
" 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 "
+
" left join b_lesson_label bll on bl.business_id = bll.lesson_id "
+
" left join b_lesson_label bll on bl.business_id = bll.lesson_id "
+
// " left join b_label bla on bla.business_id = bll.label_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 bv.del_flag != 1 and bv.flag = 1 "
+
// " and bla.del_flag != 1 and bla.flag = 1 " +
" and bl.corp_id = #{model.corpId} "
+
" and bl.corp_id = #{model.corpId} "
+
" and su.corp_id = #{model.corpId} "
+
" and bv.corp_id = #{model.corpId} "
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.labelId !=null and model.labelId != ''\">and bll.label_id = #{model.labelId}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
" <if test=\"model.lessonType !=null and model.lessonType != ''\">and bl.lesson_type = #{model.lessonType}</if>"
+
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
fc1e4622
...
@@ -114,6 +114,8 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -114,6 +114,8 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
this
.
setIsCollect
(
"0"
);
this
.
setIsCollect
(
"0"
);
//设置不指派
//设置不指派
this
.
setIsAppoint
(
"0"
);
this
.
setIsAppoint
(
"0"
);
//设置不指派
this
.
setRemarks
(
""
);
}
}
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
fc1e4622
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.dao.BLessonPersonRepository;
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.dao.BLessonPersonRepository;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.service.BLessonPersonService
;
import
org.rcisoft.business.blesson.service.BLessonPersonService
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultExceptionEnum
;
import
org.rcisoft.core.result.ResultExceptionEnum
;
...
@@ -119,18 +120,23 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -119,18 +120,23 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
public
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
)
{
public
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
)
{
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
BLessonPerson
bLessonPerson
;
BLessonPerson
bLessonPerson
;
if
(
bLessonPersons
!=
null
&&
bLessonPersons
.
size
()>
0
){
int
line
=
0
;
//被指派未开始
if
(
bLessonPersons
!=
null
&&
bLessonPersons
.
size
()>
0
&&
"0"
.
equals
(
bLessonPersons
.
get
(
0
).
getIsFinish
())
){
bLessonPerson
=
bLessonPersons
.
get
(
0
);
bLessonPerson
=
bLessonPersons
.
get
(
0
);
bLessonPerson
.
setIsFinish
(
"1"
);
bLessonPerson
.
setIsFinish
(
"1"
);
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
}
else
{
//课程在学人数+1
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
}
else
if
(
bLessonPersons
==
null
||
bLessonPersons
.
size
()
<
1
){
//未指派
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPersonRepository
.
insertBlessonPerson
(
bLessonPerson
);
bLessonPerson
.
setPersonId
(
addMyLearnLessonDTO
.
getUserId
());
line
=
bLessonPersonRepository
.
insertBLessonPerson
(
bLessonPerson
);
//课程在学人数+1
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
}
}
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
return
new
PersistModel
(
line
);
return
null
;
}
}
}
}
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