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
8bfce930
Commit
8bfce930
authored
Oct 26, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
52ecb146
3c28d038
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
21 deletions
+56
-21
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+9
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+4
-2
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+29
-5
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+13
-14
MTCotactApiRequestClient.java
...isoft/common/util/outClient/MTCotactApiRequestClient.java
+1
-0
No files found.
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
8bfce930
...
...
@@ -227,6 +227,15 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectByPersonAndLesson
(
AddMyLearnLessonDTO
param
);
/**
* 根据课程id PersonId查询(包括已删除,停用的)
*/
@Select
(
"<script>select * from b_lesson_person where 1=1 "
+
"AND person_id = #{userId} "
+
"and lesson_id = #{lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectRealByPersonAndLesson
(
AddMyLearnLessonDTO
param
);
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
...
...
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
8bfce930
...
...
@@ -964,10 +964,11 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@Select
(
"<script>select bl.*, "
+
" blp.is_apply isApply,blp.is_appoint isAppoint,blp.train_is_sign trainIsSign,blp.sign_date signDate , blp.is_collect isCollect, "
+
" blp.is_apply isApply,blp.is_appoint isAppoint,blp.train_is_sign trainIsSign,blp.sign_date signDate , blp.is_collect isCollect,
bc.c_name courseName,
"
+
" su.name lecturerName "
+
" from b_lesson bl left join b_lesson_person blp on bl.business_id = blp.lesson_id "
+
" left join s_user su on bl.lecturer_id = su.business_id "
+
" left join b_course bc on bc.business_id = bl.course_id "
+
" where 1=1 "
+
"and blp.del_flag = 0 and blp.flag = 1 "
+
"and bl.del_flag = 0 and bl.flag = 1 "
+
...
...
@@ -975,10 +976,11 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@ResultMap
(
value
=
"TrainBaseResultMap"
)
BLesson
findOneMyTrain
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"businessId"
)
String
businessId
);
@Select
(
"<script>select bl.*, "
+
@Select
(
"<script>select bl.*,
bc.c_name courseName,
"
+
" su.name lecturerName "
+
" from b_lesson bl "
+
" left join s_user su on bl.lecturer_id = su.business_id "
+
" left join b_course bc on bc.business_id = bl.course_id "
+
" where 1=1 "
+
"and bl.del_flag = 0 and bl.flag = 1 "
+
"and bl.business_id = #{lessonId} </script>"
)
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
8bfce930
...
...
@@ -2,9 +2,11 @@ package org.rcisoft.business.blesson.service.impl;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.blesson.dao.BAppointRepository
;
import
org.rcisoft.business.blesson.dao.BHotRepository
;
import
org.rcisoft.business.blesson.dao.BLessonRepository
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BAppoint
;
import
org.rcisoft.business.blesson.entity.BHot
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.dao.BLessonPersonRepository
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
...
...
@@ -17,6 +19,7 @@ import org.rcisoft.core.exception.ServiceException;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultExceptionEnum
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.UserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -44,6 +47,9 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Autowired
private
BAppointRepository
bAppointRepository
;
@Autowired
private
BHotRepository
bHotRepository
;
@Autowired
MTCotactApiRequestClient
mtCotactApiRequestClient
;
...
...
@@ -167,18 +173,36 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
//课程在学人数+1
bLessonRepository
.
personNumberReCount
(
addMyLearnLessonDTO
.
getLessonId
());
}
else
if
(
bLessonPersons
==
null
||
bLessonPersons
.
size
()
<
1
){
//未指派
return
new
PersistModel
(
line
);
}
if
(
bLessonPersons
==
null
||
bLessonPersons
.
size
()
<
1
){
//未指派
//查询是否已有已删除
List
<
BLessonPerson
>
bLessonPersonReals
=
bLessonPersonRepository
.
selectRealByPersonAndLesson
(
addMyLearnLessonDTO
);
if
(
bLessonPersonReals
!=
null
&&
bLessonPersonReals
.
size
()>
0
){
BLessonPerson
bLessonPersonReal
=
bLessonPersonReals
.
get
(
0
);
bLessonPersonReal
.
setFlag
(
"1"
);
bLessonPersonReal
.
setDelFlag
(
"0"
);
UserUtil
.
setCurrentMergeOperation
(
bLessonPersonReal
);
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPersonReal
);
return
new
PersistModel
(
line
);
}
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setIsFinish
(
"1"
);
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPerson
.
setPersonId
(
addMyLearnLessonDTO
.
getUserId
());
line
=
bLessonPersonRepository
.
insertBLessonPerson
(
bLessonPerson
);
//
课程在学人数+1
//
重新统计在学人数
bLessonRepository
.
personNumberReCount
(
addMyLearnLessonDTO
.
getLessonId
());
}
else
if
(
bLessonPersons
!=
null
&&
bLessonPersons
.
size
()>
0
){
line
=
1
;
return
new
PersistModel
(
line
);
}
return
new
PersistModel
(
line
);
// if (bLessonPersons != null && bLessonPersons.size()>0){
// line = 1;
// return new PersistModel(line);
// }
//添加至b_hot表 并重新同级热度
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
addMyLearnLessonDTO
.
getUserId
(),
addMyLearnLessonDTO
.
getLessonId
()));
bLessonRepository
.
hotNumberReCount
(
addMyLearnLessonDTO
.
getLessonId
());
return
new
PersistModel
(
1
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
8bfce930
...
...
@@ -121,10 +121,10 @@ public class BLessonServiceImpl implements BLessonService {
}
//客户端 手机端 每次点击插入热度表 并重新统计课程热度
if
(
"1"
.
equals
(
bLesson
.
getIsCollect
())){
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
curUser
.
getUserId
(),
bLesson
.
getBusinessId
()));
bLessonRepository
.
hotNumberReCount
(
bLesson
.
getBusinessId
());
}
//
if ("1".equals(bLesson.getIsCollect())){
bHotRepository
.
insertSelective
(
new
BHot
(
IdGen
.
uuid
(),
curUser
.
getUserId
(),
bLesson
.
getBusinessId
()));
bLessonRepository
.
hotNumberReCount
(
bLesson
.
getBusinessId
());
//
}
return
bLesson
;
}
...
...
@@ -248,10 +248,9 @@ public class BLessonServiceImpl implements BLessonService {
// BMaterial bMaterial = new BMaterial();
// }
int
line
=
0
;
if
(
model
.
getBusinessId
()
==
null
)
{
if
(
StringUtils
.
isEmpty
(
model
.
getBusinessId
())
)
{
if
(
StringUtils
.
isEmpty
(
model
.
getLessonType
()))
{
throw
new
ServiceException
(
ResultServiceEnums
.
MUST_NOT_FILLED
);
}
...
...
@@ -320,7 +319,6 @@ public class BLessonServiceImpl implements BLessonService {
bViewrangeRepository
.
insertBViewrangeSons
(
bViewrangeSons
);
}
bLessonRepository
.
removeLabelByLessonId
(
model
);
//删除原标签添,加课程标签表
if
(
StringUtils
.
isNotEmpty
(
model
.
getLabels
()))
{
...
...
@@ -328,10 +326,8 @@ public class BLessonServiceImpl implements BLessonService {
List
<
BLessonLabel
>
bLessonLabels
=
addLabel
(
model
);
bLessonRepository
.
insertLessonLabel
(
bLessonLabels
);
}
//删除原有文件
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
}
//转换json
if
(
StringUtils
.
isNotEmpty
(
addLessonDTO
.
getTrainFileJson
())){
...
...
@@ -388,9 +384,6 @@ public class BLessonServiceImpl implements BLessonService {
}
//更新
//获取
}
return
new
PersistModel
(
line
,
model
);
}
...
...
@@ -956,9 +949,9 @@ public class BLessonServiceImpl implements BLessonService {
}
int
collectCount
=
bCollectRepository
.
selectCountbyLessonAndUser
(
curUser
,
bLesson
.
getBusinessId
());
if
(
collectCount
>
0
){
bLesson
.
setIs
Apply
(
"1"
);
bLesson
.
setIs
Collect
(
"1"
);
}
else
{
bLesson
.
setIs
Apply
(
"0"
);
bLesson
.
setIs
Collect
(
"0"
);
}
return
bLesson
;
}
...
...
@@ -976,6 +969,12 @@ public class BLessonServiceImpl implements BLessonService {
}
else
{
bLesson
.
setApplyIsFull
(
"0"
);
}
int
collectCount
=
bCollectRepository
.
selectCountbyLessonAndUser
(
curUser
,
bLesson
.
getBusinessId
());
if
(
collectCount
>
0
){
bLesson
.
setIsCollect
(
"1"
);
}
else
{
bLesson
.
setIsCollect
(
"0"
);
}
return
bLesson
;
}
...
...
src/main/java/org/rcisoft/common/util/outClient/MTCotactApiRequestClient.java
View file @
8bfce930
...
...
@@ -511,6 +511,7 @@ public class MTCotactApiRequestClient {
return
new
ArrayList
<>();
}
GetUserByDeptIdReqDTO
getUserByDeptIdReqDTO
=
new
GetUserByDeptIdReqDTO
();
getUserByDeptIdReqDTO
.
setCorpId
(
Long
.
parseLong
(
corpId
));
List
<
Long
>
deptIdList
=
new
ArrayList
<>();
for
(
String
deptId
:
deptIdSet
)
{
deptIdList
.
add
(
Long
.
parseLong
(
deptId
));
...
...
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