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
d61e4eb1
Commit
d61e4eb1
authored
Oct 11, 2019
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
159b1932
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
184 deletions
+195
-184
BBannerController.java
...cisoft/business/bbanner/controller/BBannerController.java
+0
-21
BBannerService.java
.../org/rcisoft/business/bbanner/service/BBannerService.java
+5
-17
BBannerServiceImpl.java
...oft/business/bbanner/service/impl/BBannerServiceImpl.java
+0
-29
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+105
-13
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+9
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+2
-2
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+13
-1
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+54
-67
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+7
-34
No files found.
src/main/java/org/rcisoft/business/bbanner/controller/BBannerController.java
View file @
d61e4eb1
...
...
@@ -86,27 +86,6 @@ public class BBannerController extends PaginationController<BBanner> {
gridModel
);
}
/*
@ApiOperation(value="105 Banner向上调顺序", notes="Banner向上调顺序")
@PostMapping(value = "/updateTopBanner")
public Result updateTopBanner(CurUser curUser, @Valid TopDownDTO topDownDTO, BindingResult bindingResult){
int data = bBannerService.updateTopChapter(topDownDTO);
return Result.builder(new PersistModel(data),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
topDownDTO);
}*/
/*@ApiOperation(value="106 Banner向下调顺序", notes="Banner向下调顺序")
@PostMapping(value = "/updateDownBanner")
public Result updateDownBanner( CurUser curUser, @Valid TopDownDTO topDownDTO, BindingResult bindingResult){
int data = bBannerService.updateDownChapter(topDownDTO);
return Result.builder(new PersistModel(data),
MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR,
topDownDTO);
}*/
@ApiOperation
(
value
=
"105 Banner重新排序"
,
notes
=
"Banner重新排序"
)
@PostMapping
(
value
=
"/updateBannerOrder"
)
public
Result
updateBannerOrder
(
CurUser
curUser
,
@Param
(
"bannerOrderMap"
)
String
bannerOrderMap
,
BindingResult
bindingResult
){
...
...
src/main/java/org/rcisoft/business/bbanner/service/BBannerService.java
View file @
d61e4eb1
...
...
@@ -18,6 +18,7 @@ public interface BBannerService {
/**
* 插入/修改
* @author: zhangqingle
* @param addOrUpdateDTO
* @return
*/
...
...
@@ -25,6 +26,7 @@ public interface BBannerService {
/**
* 逻辑删除
* @author: zhangqingle
* @param id
* @return
*/
...
...
@@ -32,13 +34,15 @@ public interface BBannerService {
/**
* 唯一查找
* @author: zhangqingle
* @param businessId
* @return
*/
BannerInfoRspDTO
selectOne
(
String
businessId
);
/**
* 获取图片分页
* 获取Banner分页
* @author: zhangqingle
* @param pageUtil
* @param model
* @return
...
...
@@ -46,22 +50,6 @@ public interface BBannerService {
List
<
BBanner
>
queryBannerByPagination
(
PageUtil
pageUtil
,
FindBannerPaginDTO
model
);
/**
* Banner向上调顺序
* @param topDownDTO
* @return
*/
int
updateTopChapter
(
TopDownDTO
topDownDTO
);
/**
* Banner向下调顺序
* @param topDownDTO
* @return
*/
int
updateDownChapter
(
TopDownDTO
topDownDTO
);
/**
* @author: jiangpengpeng
* @description: TODO
...
...
src/main/java/org/rcisoft/business/bbanner/service/impl/BBannerServiceImpl.java
View file @
d61e4eb1
...
...
@@ -96,35 +96,6 @@ public class BBannerServiceImpl implements BBannerService {
return
bBannerRepository
.
queryBanners
(
model
);
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
int
updateTopChapter
(
TopDownDTO
topDownDTO
)
{
int
result
=
0
;
BBanner
lessBanner
=
bBannerRepository
.
getlessChapter
(
topDownDTO
);
int
sort
=
topDownDTO
.
getBannerSort
();
int
lessSort
=
lessBanner
.
getBannerSort
();
int
data
=
bBannerRepository
.
updateSortById
(
topDownDTO
.
getBusinessId
(),
lessSort
);
int
data2
=
bBannerRepository
.
updateSortById
(
lessBanner
.
getBusinessId
(),
sort
);
if
(
data
==
data2
)
{
result
=
1
;
}
return
result
;
}
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Override
public
int
updateDownChapter
(
TopDownDTO
topDownDTO
)
{
int
result
=
0
;
BBanner
bigBanner
=
bBannerRepository
.
getBigChapter
(
topDownDTO
);
int
sort
=
topDownDTO
.
getBannerSort
();
int
bigSort
=
bigBanner
.
getBannerSort
();
int
data
=
bBannerRepository
.
updateSortById
(
topDownDTO
.
getBusinessId
(),
bigSort
);
int
data2
=
bBannerRepository
.
updateSortById
(
bigBanner
.
getBusinessId
(),
sort
);
if
(
data
==
data2
)
{
result
=
1
;
}
return
result
;
}
/**
* @param bannerOrderMap
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
d61e4eb1
...
...
@@ -50,6 +50,11 @@ public class BLessonController extends PaginationController<BLesson> {
private
Global
global
;
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"601 添加/编辑课程"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
AddLessonDTO
addLessonDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -63,6 +68,11 @@ public class BLessonController extends PaginationController<BLesson> {
addLessonDTO
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"602 删除课程"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/remove"
)
...
...
@@ -74,7 +84,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"603 唯一查找"
,
notes
=
"根据ID查找一条记录"
,
response
=
BLesson
.
class
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/one"
)
...
...
@@ -85,7 +99,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
selectOne
(
businessId
));
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"604 分页查询我发布的课程"
,
notes
=
"分页查询我发布的课程"
,
response
=
BLesson
.
class
)
@ApiImplicitParam
(
name
=
"releaseState"
,
value
=
"发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)"
,
required
=
false
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/queryBLessonsByPagination"
)
...
...
@@ -99,8 +117,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"605 根据条件分页查询全部课程"
,
notes
=
"根据条件分页查询全部课程"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryAllBLessonsByPagination"
)
public
Result
queryAllBLessonsByPagination
(
CurUser
curUser
,
@Valid
FindAllLessonDTO
findAllLessonDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -113,6 +134,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"606 分页查询大家都在学"
,
notes
=
"分页查询大家都在学"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryPersonMoreByPagination"
)
public
Result
queryPersonMoreByPagination
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
...
...
@@ -124,6 +150,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"607 分页查询企业推荐"
,
notes
=
"分页查询企业推荐"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryRecommendByPagination"
)
public
Result
queryRecommendByPagination
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
...
...
@@ -135,6 +166,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"608 分页查询最受关注"
,
notes
=
"分页查询最受关注"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryConcernByPagination"
)
public
Result
queryConcernByPagination
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
...
...
@@ -147,6 +183,11 @@ public class BLessonController extends PaginationController<BLesson> {
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"609 分页查询可能感兴趣"
,
notes
=
"分页查询可能感兴趣"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryInterestedByPagination"
)
public
Result
queryInterestedByPagination
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
...
...
@@ -158,6 +199,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"610 首页分页查询全部课程"
,
notes
=
"根据条件分页查询全部课程"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryHomeBLessonsByPagination"
)
public
Result
queryHomeBLessonsByPagination
(
CurUser
curUser
,
@Valid
FirstPageQueryDTO
firstPageQueryDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -173,6 +219,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"611 关闭课程"
,
notes
=
"根据ID关闭一个课程"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/close"
)
...
...
@@ -184,6 +235,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"612 课程培训条件查询"
,
notes
=
"课程培训条件查询(Banner内部资源)"
,
response
=
BLesson
.
class
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/findLessonAtBanner"
)
...
...
@@ -196,6 +252,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
findLessonAtBanner
(
lessonTrainDTO
));
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"613 我的课程总数(学习和发布)"
,
notes
=
"我的课程总数"
)
@GetMapping
(
value
=
"/iLessonCount"
)
public
Result
ILessonCountDTO
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
...
...
@@ -206,6 +267,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
iLessonCount
(
userId
));
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"614 退出课程"
,
notes
=
"根据ID停用一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"退出课程的选课id"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/quit"
)
...
...
@@ -217,6 +283,11 @@ public class BLessonController extends PaginationController<BLesson> {
quitLessonDTO
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"615 分页查询我学习"
,
notes
=
"分页查询我学习"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryLearnBLessonsByPagination"
)
public
Result
queryLearnBLessonsByPagination
(
CurUser
curUser
,
@Valid
ILearnLessonDTO
param
,
BindingResult
bindingResult
)
{
...
...
@@ -229,6 +300,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"616 列表页分页查询课程"
,
notes
=
"分页查询列表页全部"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryListAllLessonByPagination"
)
public
Result
queryListAllLessonByPagination
(
CurUser
curUser
,
@Valid
FindListLessonDTO
param
,
BindingResult
bindingResult
)
{
...
...
@@ -264,6 +340,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"618 发布课程"
,
notes
=
"根据ID发布一个课程"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PostMapping
(
value
=
"/release"
)
...
...
@@ -275,6 +356,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"619 线上课程学员跟踪图表"
,
notes
=
"线上课程学员跟踪图表"
)
@GetMapping
(
value
=
"/studentTrackingChart"
)
public
Result
studentTrackingChart
(
CurUser
curUser
,
@Valid
StudentTrackingChartDTO
studentTrackingChartDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -286,6 +372,11 @@ public class BLessonController extends PaginationController<BLesson> {
model
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"620 线上课程学员跟踪"
,
notes
=
"线上课程学员跟踪"
)
@GetMapping
(
value
=
"/studentTrackingByPagination"
)
public
Result
studentTrackingByPagination
(
CurUser
curUser
,
@Valid
StudentTrackingDTO
studentTrackingDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -297,6 +388,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel
);
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"621 取消指派"
,
notes
=
"取消指派"
)
@PostMapping
(
value
=
"/cancelAppoint"
)
public
Result
cancelAppoint
(
CurUser
curUser
,
@Valid
CancelAppointDTO
cancelAppointDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -308,6 +404,11 @@ public class BLessonController extends PaginationController<BLesson> {
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"622 推荐课程"
,
notes
=
"根据ID推荐课程"
)
@PostMapping
(
value
=
"/recommend"
)
public
Result
recommend
(
CurUser
curUser
,
@Valid
RecommendLessonDTO
recommendLessonDTO
,
BindingResult
bindingResult
)
{
...
...
@@ -318,13 +419,4 @@ public class BLessonController extends PaginationController<BLesson> {
recommendLessonDTO
);
}
@ApiOperation
(
value
=
"623 指派课程"
,
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
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
d61e4eb1
...
...
@@ -117,4 +117,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
*/
@Select
(
"<script>select is_finish from b_lesson_person where business_id = #{businessId}</script>"
)
String
selectIsFinish
(
CancelAppointDTO
param
);
/**
* 根据课程id查询学生id
* @param LessonId
* @return
*/
@Select
(
"<script>select business_id,person_id from b_lesson_person where lesson_id = #{LessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectPersonIdByLessonId
(
String
LessonId
);
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
d61e4eb1
...
...
@@ -74,11 +74,11 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" ,bc.c_name courseName "
+
" from b_lesson bl "
+
" left join s_user su on su.business_id = bl.lecturer_id "
+
" and su.del_flag != 1 and su.flag = 1 "
+
" left join s_user suc on suc.business_id = bl.create_by "
+
" and suc.del_flag != 1 and suc.flag = 1 "
+
" left join b_course bc on bc.business_id = bl.course_id "
+
" 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.business_id = #{businessId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
d61e4eb1
...
...
@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
import
org.hibernate.validator.constraints.Length
;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.util.UserUtil
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
...
...
@@ -99,6 +100,17 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
private
String
lessonType
;
//初始化
public
void
initModel
(){
UserUtil
.
setCurrentPersistOperation
(
this
);
//学习进度为0
this
.
setLearnProgress
(
"0"
);
//设置正在学
this
.
setIsFinish
(
"1"
);
//设置不收藏
this
.
setIsCollect
(
"0"
);
//设置不指派
this
.
setIsAppoint
(
"0"
);
}
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
d61e4eb1
...
...
@@ -16,6 +16,7 @@ public interface BLessonService{
/**
* 根据主键唯一查找
* @author: zhangqingle
* @param businessId
* @return
*/
...
...
@@ -31,6 +32,7 @@ public interface BLessonService{
int
updateByPrimaryKeySelective
(
BLesson
bLesson
);
/**
* 根据条件分页查找
* @author: zhangqingle
* @param pageUtil
* @param releaseState
* @return
...
...
@@ -39,6 +41,7 @@ public interface BLessonService{
/**
* 根据条件分页查找
* @author: zhangqingle
* @param pageUtil
* @param findAllLessonDTO
* @return
...
...
@@ -47,6 +50,7 @@ public interface BLessonService{
/**
* 分页查找大家都在学
* @author: zhangqingle
* @param pageUtil
* @param
* @return
...
...
@@ -55,6 +59,7 @@ public interface BLessonService{
/**
* 分页查找推荐
* @author: zhangqingle
* @param pageUtil
* @param
* @return
...
...
@@ -63,6 +68,7 @@ public interface BLessonService{
/**
* 分页查找最受关注
* @author: zhangqingle
* @param pageUtil
* @param
* @return
...
...
@@ -71,6 +77,7 @@ public interface BLessonService{
/**
* 分页查找可能感兴趣的
* @author: zhangqingle
* @param pageUtil
* @param
* @return
...
...
@@ -78,13 +85,15 @@ public interface BLessonService{
List
<
BLesson
>
queryInterestedByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
);
/**
* 插入
* 插入/更新课程
* @author: zhangqingle
* @param model
* @return
*/
PersistModel
persist
(
AddLessonDTO
model
);
/**
* @author: zhangqingle
* 逻辑删除
* @param id
* @return
...
...
@@ -92,6 +101,7 @@ public interface BLessonService{
PersistModel
removeBLesson
(
String
id
);
/**
* @author: zhangqingle
* 首页条件查询全部课程
* @return
*/
...
...
@@ -99,6 +109,7 @@ public interface BLessonService{
/**
* 关闭课程
* @author: zhangqingle
* @param id
* @return
*/
...
...
@@ -106,6 +117,7 @@ public interface BLessonService{
/**
* 发布课程
* @author: zhangqingle
* @param id
* @return
*/
...
...
@@ -113,20 +125,16 @@ public interface BLessonService{
/**
* 推荐课程
* @author: zhangqingle
* @param recommendLessonDTO
* @return
*/
PersistModel
recommendBLesson
(
RecommendLessonDTO
recommendLessonDTO
);
/**
* 指派课程
* @param appointLessonDTO
* @return
*/
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
);
/**
* 课程培训条件查询
* @author: zhangqingle
* @param lessonTrainDTO
* @return
*/
...
...
@@ -134,6 +142,7 @@ public interface BLessonService{
/**
* 我发布的总数
* @author: zhangqingle
* @param userId
* @return
*/
...
...
@@ -141,6 +150,7 @@ public interface BLessonService{
/**
* 分页查询列表页全部
* @author: zhangqingle
* @param pageUtil
* @param model
* @return
...
...
@@ -156,27 +166,4 @@ public interface BLessonService{
*/
List
<
BLesson
>
theLessonMangageByPagination
(
PageUtil
pageUtil
,
CurUser
curUser
,
BLesson
bLesson
);
// /**
// * 分页查询列表页推荐
// * @param pageUtil
// * @param model
// * @return
// */
// List<BLesson> queryRecommendListByPagination(PageUtil pageUtil, FindListLessonDTO model, List<AllCourseDTO> allCourse);
//
// /**
// * 分页查询列表页在学
// * @param pageUtil
// * @param model
// * @return
// */
// List<BLesson> queryLearnListByPagination(PageUtil pageUtil, FindListLessonDTO model);
//
// /**
// * 分页查询列表页收藏
// * @param pageUtil
// * @param model
// * @return
// */
// List<BLesson> queryCollectListByPagination(PageUtil pageUtil, FindListLessonDTO model);
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
d61e4eb1
...
...
@@ -6,14 +6,11 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.blesson.dao.BAppointRepository
;
import
org.rcisoft.business.blesson.dao.BLessonRepository
;
import
org.rcisoft.business.blesson.dao.BRecommendRepository
;
import
org.rcisoft.business.blesson.dao.*
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.*
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
...
...
@@ -36,6 +33,8 @@ import java.util.List;
import
java.lang.reflect.Array
;
import
java.util.*
;
import
static
java
.
util
.
Arrays
.
asList
;
/**
* Created by CodeGenerator on 2017/07/12.
...
...
@@ -47,6 +46,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
private
BLessonRepository
bLessonRepository
;
@Autowired
private
BLessonPersonRepository
bLessonPersonRepository
;
@Autowired
private
BCourseRepository
bCourseRepository
;
...
...
@@ -294,7 +296,7 @@ public class BLessonServiceImpl implements BLessonService {
//查询是否存在该课程推荐
List
<
String
>
recommendIds
=
bRecommendRepository
.
selectIdByLessonId
(
bRecommend
.
getLessonId
());
if
(
recommendIds
==
null
||
recommendIds
.
size
()<
1
){
//课程表----
//插入推荐表
UserUtil
.
setCurrentPersistOperation
(
bRecommend
);
...
...
@@ -326,35 +328,6 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
)
{
if
(
StringUtils
.
isEmpty
(
appointLessonDTO
.
getAppointPerson
())){
throw
new
ServiceException
(
ResultExceptionEnum
.
INVALID_PARAMETER_VALUE
);
}
//按课程查询指派表是否为空
//插入指派表
BAppoint
bAppoint
=
new
BAppoint
();
bAppoint
.
setLessonId
(
appointLessonDTO
.
getLessonId
());
bAppoint
.
setAppointerId
(
appointLessonDTO
.
getUserId
());
bAppoint
.
setDesignatedId
(
appointLessonDTO
.
getAppointPerson
());
UserUtil
.
setCurrentPersistOperation
(
bAppoint
);
// bAppointRepository.insertSelective(bAppoint);
//插入b_lesson_person表
//查询已学该课程的学习business_id
//更新b_lesson_person表
//从学生Id中删除已更新的学生id
//剩余学生添加至b_lesson_person表
return
null
;
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
...
...
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