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
41338b22
Commit
41338b22
authored
Oct 15, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
b1c93b23
27880130
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
483 additions
and
94 deletions
+483
-94
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+15
-14
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+21
-1
BAppointRepository.java
.../org/rcisoft/business/blesson/dao/BAppointRepository.java
+14
-1
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+109
-3
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+61
-40
AddMyLearnLessonDTO.java
...org/rcisoft/business/blesson/dto/AddMyLearnLessonDTO.java
+15
-0
AppointLessonDTO.java
...va/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
+6
-1
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+3
-0
BLessonPersonService.java
...cisoft/business/blesson/service/BLessonPersonService.java
+9
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+6
-1
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+18
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+94
-32
BMaterialController.java
...ft/business/bmaterial/controller/BMaterialController.java
+1
-1
application-mt.yml
src/main/resources/application-mt.yml
+103
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+8
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
41338b22
...
@@ -166,21 +166,22 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -166,21 +166,22 @@ public class BChapterServiceImpl implements BChapterService {
line
=
bChapterRepository
.
updateByPrimaryKeySelective
(
model
);
line
=
bChapterRepository
.
updateByPrimaryKeySelective
(
model
);
}
}
//插入资料表
//不是为添加章时插入资料表
BMaterial
bMaterial
=
new
BMaterial
();
if
(
StringUtils
.
isNotEmpty
(
model
.
getIsTest
())){
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
BMaterial
bMaterial
=
new
BMaterial
();
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
bMaterial
.
setFileName
(
dto
.
getFileName
());
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
if
(
Integer
.
parseInt
(
model
.
getIsTest
())<
4
){
bMaterial
.
setFileName
(
dto
.
getFileName
());
bMaterial
.
setFileUrl
(
model
.
getVideoUrl
());
if
(
Integer
.
parseInt
(
model
.
getIsTest
())<
4
){
}
else
if
(
Integer
.
parseInt
(
model
.
getIsTest
())>=
4
){
bMaterial
.
setFileUrl
(
model
.
getVideoUrl
());
bMaterial
.
setFileUrl
(
model
.
getFileUrl
());
}
else
if
(
Integer
.
parseInt
(
model
.
getIsTest
())>=
4
){
bMaterial
.
setFileUrl
(
model
.
getFileUrl
());
}
bMaterial
.
setType
(
model
.
getIsTest
());
bMaterial
.
setUploadType
(
"1"
);
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
bMaterialRepository
.
insertMaterial
(
bMaterial
);
}
}
bMaterial
.
setType
(
model
.
getIsTest
());
bMaterial
.
setUploadType
(
"1"
);
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
bMaterialRepository
.
insertMaterial
(
bMaterial
);
return
new
PersistModel
(
line
);
return
new
PersistModel
(
line
);
}
}
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
41338b22
...
@@ -65,7 +65,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -65,7 +65,7 @@ public class BLessonController extends PaginationController<BLesson> {
return
Result
.
builder
(
data
,
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
addLessonDTO
);
data
.
getResult
()
);
}
}
/**
/**
...
@@ -433,4 +433,24 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -433,4 +433,24 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
queryRecommendByLessonId
(
param
));
bLessonService
.
queryRecommendByLessonId
(
param
));
}
}
// @ApiOperation(value="624 指派课程", notes="根据ID指派课程")
// @PostMapping(value = "/appointLessonToPerson")
// public Result appointLessonToPerson(CurUser curUser,@Valid AppointLessonDTO appointLessonDTO,BindingResult bindingResult) {
// PersistModel data = bLessonService.appointLessonToPerson(appointLessonDTO);
// return Result.builder(data,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// appointLessonDTO);
// }
// @ApiOperation(value="625 添加我学习的课程", notes="添加我学习的课程")
// @PostMapping(value = "/addMyLearnLesson")
// public Result addMyLearnLesson(CurUser curUser,@Valid AddMyLearnLessonDTO addMyLearnLessonDTO,BindingResult bindingResult) {
// PersistModel data = bLessonPersonService.addMyLearnLesson(addMyLearnLessonDTO);
// return Result.builder(data,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// addMyLearnLessonDTO);
// }
}
}
src/main/java/org/rcisoft/business/blesson/dao/BAppointRepository.java
View file @
41338b22
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
import
org.rcisoft.business.blesson.dto.AppointLessonDTO
;
import
org.rcisoft.business.blesson.dto.CancelAppointDTO
;
import
org.rcisoft.business.blesson.dto.CancelAppointDTO
;
import
org.rcisoft.business.blesson.entity.BAppoint
;
import
org.rcisoft.business.blesson.entity.BAppoint
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
...
@@ -19,7 +20,7 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
...
@@ -19,7 +20,7 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
/**
/**
*
按课程
Id 查询 bAppoint
* Id 查询 bAppoint
*
*
*/
*/
@Select
(
"<script>select * from b_appoint where 1=1 "
@Select
(
"<script>select * from b_appoint where 1=1 "
...
@@ -29,5 +30,17 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
...
@@ -29,5 +30,17 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
+
"</script>"
)
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BAppoint
selectById
(
String
bAppointId
);
BAppoint
selectById
(
String
bAppointId
);
/**
* 按课程Id 查询 bAppoint
*
*/
@Select
(
"<script>select * from b_appoint where 1=1 "
+
"and del_flag != 1 "
+
"and flag = 1 "
+
"and lesson_id = #{lessonId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BAppoint
>
selectByLessonId
(
AppointLessonDTO
param
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
41338b22
...
@@ -120,10 +120,116 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -120,10 +120,116 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
/**
/**
* 根据课程id查询学生id
* 根据课程id查询学生id
* @param LessonId
* @param param
* @return
*/
@Select
(
"<script>select business_id,person_id from b_lesson_person where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"AND person_id IN"
+
"<foreach item='item' index='index' collection='appointPersonList' open='(' close=')' separator=','> "
+
"#{item} "
+
"</foreach>"
+
"and lesson_id = #{lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectPersonIdByLessonId
(
AppointLessonDTO
param
);
/**
* 按课程id删除指派未开始
* @param param
* @return
*/
@Update
(
"<script> update b_lesson_person blp left join b_appoint ba"
+
" on blp.appoint_id = ba.business_id "
+
" and ba.del_flag != 1 and ba.flag = 1 "
+
" set blp.flag = '0' "
+
" where 1=1 "
+
" and blp.is_finish = '0' "
+
" and ba.lesson_id = #{lessonId} "
+
"</script>"
)
int
deleteNotStartByLessonId
(
AppointLessonDTO
param
);
/**
* 已学习的取消指派
* @param param
* @return
* @return
*/
*/
@Select
(
"<script>select business_id,person_id from b_lesson_person where lesson_id = #{LessonId}</script>"
)
@Update
(
"<script> update b_lesson_person blp left join b_appoint ba"
+
" on blp.appoint_id = ba.business_id "
+
" and ba.del_flag != 1 and ba.flag = 1 "
+
" set blp.flag = '0' "
+
" <set>"
+
" <if test=\"updateBy != null and updateBy != ''\">update_by=#{updateBy},</if>"
+
" <if test=\"updateDate != null and updateDate != ''\">update_date=#{updateDate},</if>"
+
" <if test=\"delFlag != null and delFlag != ''\">del_flag=#{delFlag},</if>"
+
" <if test=\"flag != null and flag != ''\">flag=#{flag},</if>"
+
" <if test=\"remarks != null and remarks != ''\">remarks=#{remarks},</if>"
+
" <if test=\"isAppoint != null and isAppoint != ''\">is_appoint=#{isAppoint},</if>"
+
" appoint_id=#{appointId},"
+
" </set>"
+
" where 1=1 "
+
" and blp.is_finish != '0' "
+
" and ba.lesson_id = #{lessonId} "
+
"</script>"
)
int
cancelAppointByPersons
(
BLessonPerson
param
);
/**
* 按Id批量更新
* @param param
* @return
*/
@Update
(
"<script>"
+
" <foreach collection='param' item='item' index='index' separator=';'> "
+
" update b_lesson_person "
+
" <set> "
+
" <if test=\"item.updateBy != null and item.updateBy != ''\">update_by=#{item.updateBy},</if>"
+
" <if test=\"item.updateDate != null and item.updateDate != ''\">update_date=#{item.updateDate},</if>"
+
" appoint_id=#{item.appointId}, "
+
" is_appoint=#{item.isAppoint}, "
+
" </set> "
+
" where business_id=#{item.businessId} "
+
" </foreach>"
+
"</script>"
)
int
updateList
(
@Param
(
"param"
)
List
<
BLessonPerson
>
param
);
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,person_id,lesson_id "
+
" learn_progress,is_finish,finish_date,is_collect,appoint_id, "
+
" is_appoint) "
+
" values "
+
" <foreach collection='list' index='index' item='item' separator=','> "
+
" #{item.businessId}, #{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate}, "
+
" #{item.delFlag}, #{item.flag},#{item.remarks},#{item.personId},#{item.lessonId}, "
+
" #{item.learnProgress}, #{item.isFinish},#{item.finishDate},#{item.isCollect},#{item.appointId}, "
+
" #{item.isAppoint}) "
+
" </foreach>"
+
"</script>"
)
int
insertList
(
@Param
(
"param"
)
List
<
BLessonPerson
>
param
);
/**
* 根据课程id PersonId查询
*/
@Select
(
"<script>select * from b_lesson_person where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"AND person_id = #{userId} "
+
"and lesson_id = #{lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectPersonIdByLessonId
(
String
LessonId
);
List
<
BLessonPerson
>
selectByPersonAndLesson
(
AddMyLearnLessonDTO
param
);
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,person_id,lesson_id "
+
" learn_progress,is_finish,is_collect, "
+
" is_appoint) "
+
" values "
+
" (#{param.businessId}, #{param.createBy},#{param.createDate},#{param.updateBy},#{param.updateDate}, "
+
" #{param.delFlag}, #{param.flag},#{param.remarks},#{param.personId},#{param.lessonId}, "
+
" #{param.learnProgress}, #{param.isFinish},#{param.isCollect},"
+
" #{param.isAppoint}) "
+
"</script>"
)
int
insertBlessonPerson
(
@Param
(
"param"
)
BLessonPerson
param
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
41338b22
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/blesson/dto/AddMyLearnLessonDTO.java
0 → 100644
View file @
41338b22
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
AddMyLearnLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
String
corpId
;
private
String
userId
;
}
src/main/java/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
View file @
41338b22
...
@@ -3,15 +3,20 @@ package org.rcisoft.business.blesson.dto;
...
@@ -3,15 +3,20 @@ package org.rcisoft.business.blesson.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
@Data
@Data
public
class
AppointLessonDTO
{
public
class
AppointLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
String
lessonId
;
@ApiModelProperty
(
value
=
"
推荐范围(人
)多人之间用','隔开"
,
required
=
true
)
@ApiModelProperty
(
value
=
"
指派范围(人id
)多人之间用','隔开"
,
required
=
true
)
private
String
appointPerson
;
private
String
appointPerson
;
//指派人id集合
private
List
<
String
>
appointPersonList
;
private
String
userId
;
private
String
userId
;
private
String
corpId
;
private
String
corpId
;
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
41338b22
...
@@ -100,6 +100,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -100,6 +100,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
@Transient
private
String
lessonType
;
private
String
lessonType
;
@Transient
private
String
corpId
;
//初始化
//初始化
public
void
initModel
(){
public
void
initModel
(){
UserUtil
.
setCurrentPersistOperation
(
this
);
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
src/main/java/org/rcisoft/business/blesson/service/BLessonPersonService.java
View file @
41338b22
...
@@ -47,4 +47,13 @@ public interface BLessonPersonService {
...
@@ -47,4 +47,13 @@ public interface BLessonPersonService {
* @return
* @return
*/
*/
PersistModel
cancelAppoint
(
CancelAppointDTO
cancelAppointDTO
);
PersistModel
cancelAppoint
(
CancelAppointDTO
cancelAppointDTO
);
/**
* 添加我学习课程
* @author: zhangqingle
* @param addMyLearnLessonDTO
* @return
*/
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
);
}
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
41338b22
...
@@ -6,7 +6,6 @@ import org.rcisoft.business.blesson.entity.BLesson;
...
@@ -6,7 +6,6 @@ import org.rcisoft.business.blesson.entity.BLesson;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
java.util.List
;
import
java.util.List
;
...
@@ -141,6 +140,12 @@ public interface BLessonService{
...
@@ -141,6 +140,12 @@ public interface BLessonService{
*/
*/
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
);
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
);
/**
* 指派课程
* @param appointLessonDTO
* @return
*/
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
);
/**
/**
* 课程培训条件查询
* 课程培训条件查询
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
41338b22
...
@@ -115,4 +115,22 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
...
@@ -115,4 +115,22 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
return
new
PersistModel
(
1
,
result
);
return
new
PersistModel
(
1
,
result
);
}
}
@Override
public
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
)
{
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
BLessonPerson
bLessonPerson
;
if
(
bLessonPersons
!=
null
&&
bLessonPersons
.
size
()>
0
){
bLessonPerson
=
bLessonPersons
.
get
(
0
);
bLessonPerson
.
setIsFinish
(
"1"
);
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
}
else
{
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPersonRepository
.
insertBlessonPerson
(
bLessonPerson
);
}
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
return
null
;
}
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
41338b22
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.sun.org.apache.regexp.internal.RE
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
...
@@ -20,13 +18,10 @@ import org.rcisoft.core.constant.MessageConstant;
...
@@ -20,13 +18,10 @@ 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
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.IdGen
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dao.SysUserMapper
;
import
org.rcisoft.sys.user.dao.SysUserMapper
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -35,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -35,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.lang.reflect.Array
;
import
java.util.*
;
import
java.util.*
;
import
static
java
.
util
.
Arrays
.
asList
;
import
static
java
.
util
.
Arrays
.
asList
;
...
@@ -232,7 +226,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -232,7 +226,7 @@ public class BLessonServiceImpl implements BLessonService {
bLessonRepository
.
insertLessonLabel
(
bLessonLabels
);
bLessonRepository
.
insertLessonLabel
(
bLessonLabels
);
}
}
}
}
return
new
PersistModel
(
line
);
return
new
PersistModel
(
line
,
model
);
}
}
...
@@ -383,6 +377,73 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -383,6 +377,73 @@ public class BLessonServiceImpl implements BLessonService {
return
findLessonPersonRecommend
;
return
findLessonPersonRecommend
;
}
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
)
{
if
(
StringUtils
.
isEmpty
(
appointLessonDTO
.
getAppointPerson
())){
throw
new
ServiceException
(
ResultExceptionEnum
.
INVALID_PARAMETER_VALUE
);
}
//按课程查询指派表是否为空
List
<
BAppoint
>
bAppoints
=
bAppointRepository
.
selectByLessonId
(
appointLessonDTO
);
//将指派人截取翻入List中
List
<
String
>
userIds
=
asList
(
StringUtils
.
split
(
appointLessonDTO
.
getAppointPerson
(),
","
));
BAppoint
bAppoint
;
if
(
bAppoints
==
null
||
bAppoints
.
size
()
==
0
){
//插入指派表
bAppoint
=
new
BAppoint
();
bAppoint
.
setLessonId
(
appointLessonDTO
.
getLessonId
());
bAppoint
.
setAppointerId
(
appointLessonDTO
.
getUserId
());
bAppoint
.
setDesignatedId
(
appointLessonDTO
.
getAppointPerson
());
UserUtil
.
setCurrentPersistOperation
(
bAppoint
);
bAppointRepository
.
insertSelective
(
bAppoint
);
}
else
{
bAppoint
=
bAppoints
.
get
(
0
);
bAppoint
.
setAppointerId
(
appointLessonDTO
.
getUserId
());
bAppoint
.
setDesignatedId
(
appointLessonDTO
.
getAppointPerson
());
UserUtil
.
setCurrentMergeOperation
(
bAppoint
);
bAppointRepository
.
updateByPrimaryKeySelective
(
bAppoint
);
//删除指派未开始
bLessonPersonRepository
.
deleteNotStartByLessonId
(
appointLessonDTO
);
//指派已开始更新为不指派
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setIsAppoint
(
"0"
);
bLessonPerson
.
setAppointId
(
""
);
bLessonPerson
.
setLessonId
(
appointLessonDTO
.
getLessonId
());
UserUtil
.
setCurrentMergeOperation
(
bLessonPerson
);
bLessonPersonRepository
.
cancelAppointByPersons
(
bLessonPerson
);
}
//插入b_lesson_person表
appointLessonDTO
.
setAppointPersonList
(
userIds
);
//查询已学该课程的学习business_id
List
<
BLessonPerson
>
inLessonPersons
=
bLessonPersonRepository
.
selectPersonIdByLessonId
(
appointLessonDTO
);
List
<
String
>
inLessonIds
=
new
ArrayList
<>();
for
(
BLessonPerson
inLessonPerson
:
inLessonPersons
)
{
UserUtil
.
setCurrentMergeOperation
(
inLessonPerson
);
inLessonPerson
.
setIsAppoint
(
"1"
);
inLessonPerson
.
setAppointId
(
bAppoint
.
getBusinessId
());
inLessonIds
.
add
(
inLessonPerson
.
getPersonId
());
}
//更新b_lesson_person表
bLessonPersonRepository
.
updateList
(
inLessonPersons
);
//从学生Id中删除已更新的学生id
userIds
.
removeAll
(
inLessonIds
);
//剩余学生添加至b_lesson_person表
List
<
BLessonPerson
>
bLessonPersonOthers
=
new
ArrayList
<>();
userIds
.
forEach
(
userId
->{
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setAppointId
(
bAppoint
.
getBusinessId
());
bLessonPerson
.
setIsAppoint
(
"1"
);
bLessonPerson
.
setIsFinish
(
"0"
);
bLessonPerson
.
setLessonId
(
appointLessonDTO
.
getLessonId
());
bLessonPerson
.
setPersonId
(
userId
);
bLessonPersonOthers
.
add
(
bLessonPerson
);
});
int
line
=
bLessonPersonRepository
.
insertList
(
bLessonPersonOthers
);
return
new
PersistModel
(
line
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
);
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
...
@@ -434,6 +495,31 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -434,6 +495,31 @@ public class BLessonServiceImpl implements BLessonService {
return
ListAllLesson
;
return
ListAllLesson
;
}
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
BLesson
>
theLessonMangageByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
BLesson
bLesson
)
{
//查询当前登录人所在的企业
String
corpId
=
curUser
.
getCorpId
();
String
userId
=
curUser
.
getUserId
();
//查询当前登录人有什么角色
List
<
String
>
roleList
=
sysUserMapper
.
queryRoleTypeByUserId
(
userId
);
boolean
isAdmin
=
false
;
Set
<
CurUser
>
uids
=
new
HashSet
<>();
for
(
String
role
:
roleList
)
{
if
(
"1"
.
equals
(
role
))
{
isAdmin
=
true
;
break
;
}
else
if
(
"2"
.
equals
(
role
))
{
// 调用 feign 获取当前部门及子部门 --->所有人
uids
.
addAll
(
Arrays
.
asList
(
new
CurUser
(),
new
CurUser
()));
}
}
//自己
uids
.
add
(
curUser
);
//查讯课程的语句
List
<
BLesson
>
bLessons
=
bLessonRepository
.
selectAllManageLesson
(
uids
,
bLesson
,
isAdmin
,
corpId
);
return
bLessons
;
}
//遍历标签放入List中
//遍历标签放入List中
List
<
BLessonLabel
>
addLabel
(
BLesson
model
){
List
<
BLessonLabel
>
addLabel
(
BLesson
model
){
...
@@ -493,30 +579,6 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -493,30 +579,6 @@ public class BLessonServiceImpl implements BLessonService {
return
bViewrange
;
return
bViewrange
;
}
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
BLesson
>
theLessonMangageByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
BLesson
bLesson
)
{
//查询当前登录人所在的企业
String
corpId
=
curUser
.
getCorpId
();
String
userId
=
curUser
.
getUserId
();
//查询当前登录人有什么角色
List
<
String
>
roleList
=
sysUserMapper
.
queryRoleTypeByUserId
(
userId
);
boolean
isAdmin
=
false
;
Set
<
CurUser
>
uids
=
new
HashSet
<>();
for
(
String
role
:
roleList
)
{
if
(
"1"
.
equals
(
role
))
{
isAdmin
=
true
;
break
;
}
else
if
(
"2"
.
equals
(
role
))
{
// 调用 feign 获取当前部门及子部门 --->所有人
uids
.
addAll
(
Arrays
.
asList
(
new
CurUser
(),
new
CurUser
()));
}
}
//自己
uids
.
add
(
curUser
);
//查讯课程的语句
List
<
BLesson
>
bLessons
=
bLessonRepository
.
selectAllManageLesson
(
uids
,
bLesson
,
isAdmin
,
corpId
);
return
bLessons
;
}
}
}
src/main/java/org/rcisoft/business/bmaterial/controller/BMaterialController.java
View file @
41338b22
...
@@ -35,7 +35,7 @@ public class BMaterialController extends PaginationController<BMaterial> {
...
@@ -35,7 +35,7 @@ public class BMaterialController extends PaginationController<BMaterial> {
private
BMaterialService
bMaterialServiceImpl
;
private
BMaterialService
bMaterialServiceImpl
;
@ApiOperation
(
value
=
"1301 添加
"
,
notes
=
"添加
"
)
@ApiOperation
(
value
=
"1301 添加
保存资料"
,
notes
=
"保存资料
"
)
@PostMapping
(
value
=
"/add"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
BMaterial
bMaterial
,
BindingResult
bindingResult
)
{
public
Result
add
(
CurUser
curUser
,
@Valid
BMaterial
bMaterial
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bMaterialServiceImpl
.
save
(
bMaterial
);
PersistModel
data
=
bMaterialServiceImpl
.
save
(
bMaterial
);
...
...
src/main/resources/application-mt.yml
0 → 100644
View file @
41338b22
server
:
port
:
8081
tomcat
:
max-threads
:
300
servlet
:
context-path
:
/
#uri-encoding: UTF-8
type
:
dev1
maxHttpHeaderSize
:
102400
#logging:
# level:
# root: INFO
# org.springframework.web: DEBUG
druid
:
url
:
jdbc:mysql://mt_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
password
:
91isoft
initial-size
:
1
min-idle
:
1
max-active
:
20
test-on-borrow
:
true
initial-size
:
1
min-idle
:
1
max-active
:
20
test-on-borrow
:
true
mybatis
:
mapper-locations
:
classpath:mapper/**/**/*.xml
mapper
:
mappers
:
-
org.rcisoft.core.base.BaseMapper
not-empty
:
false
identity
:
MYSQL
pagehelper
:
helperDialect
:
mysql
reasonable
:
true
supportMethodsArguments
:
true
params
:
count=countSql
spring
:
jackson
:
default-property-inclusion
:
non_null
date-format
:
yyyy-MM-dd
time-zone
:
GMT+8
mvc
:
throw-exception-if-no-handler-found
:
true
resources
:
add-mappings
:
false
freemarker
:
charset
:
UTF-8
suffix
:
.ftl
template-loader-path
:
classpath:/templates/
servlet
:
multipart
:
max-file-size
:
100MB
max-request-size
:
100MB
global
:
lk
:
publicalias
:
publiccert
storePwd
:
rcrtcyedu2
subject
:
edu2
licPath
:
/lk/license.lic
pubPath
:
/lk/publicCerts.store
path
:
base_upload_server_location
:
/working/resource/eduServer/
course_location
:
course
lesson_location
:
lesson
sl_location
:
sl
image_location
:
/upload
video_location
:
video
audio_location
:
audio
temp_location
:
temp
file_location
:
file
ppt_location
:
ppt
pdf_location
:
pdf
cut_pdf_location
:
cutPdf
cource_logo_location
:
/course/logo
other
:
is_server_linux
:
5
cut_pdf_num
:
30
libreoffice
:
ip
:
192.168.1.125
port
:
10188
mt
:
api
:
http://221.239.114.20:6789/api/
eureka
:
instance
:
hostname
:
localhost
client
:
register-with-eureka
:
false
fetch-registry
:
false
\ No newline at end of file
src/main/resources/logback-spring.xml
View file @
41338b22
...
@@ -72,4 +72,12 @@
...
@@ -72,4 +72,12 @@
</root>
</root>
</springProfile>
</springProfile>
<springProfile
name=
"mt"
>
<root
level=
"info"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
</root>
</springProfile>
</configuration>
</configuration>
\ 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