Commit d61e4eb1 authored by root's avatar root

修改接口

parent 159b1932
...@@ -86,27 +86,6 @@ public class BBannerController extends PaginationController<BBanner> { ...@@ -86,27 +86,6 @@ public class BBannerController extends PaginationController<BBanner> {
gridModel); 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重新排序") @ApiOperation(value = "105 Banner重新排序", notes = "Banner重新排序")
@PostMapping(value = "/updateBannerOrder") @PostMapping(value = "/updateBannerOrder")
public Result updateBannerOrder(CurUser curUser, @Param("bannerOrderMap") String bannerOrderMap,BindingResult bindingResult){ public Result updateBannerOrder(CurUser curUser, @Param("bannerOrderMap") String bannerOrderMap,BindingResult bindingResult){
......
...@@ -18,6 +18,7 @@ public interface BBannerService { ...@@ -18,6 +18,7 @@ public interface BBannerService {
/** /**
* 插入/修改 * 插入/修改
* @author: zhangqingle
* @param addOrUpdateDTO * @param addOrUpdateDTO
* @return * @return
*/ */
...@@ -25,6 +26,7 @@ public interface BBannerService { ...@@ -25,6 +26,7 @@ public interface BBannerService {
/** /**
* 逻辑删除 * 逻辑删除
* @author: zhangqingle
* @param id * @param id
* @return * @return
*/ */
...@@ -32,13 +34,15 @@ public interface BBannerService { ...@@ -32,13 +34,15 @@ public interface BBannerService {
/** /**
* 唯一查找 * 唯一查找
* @author: zhangqingle
* @param businessId * @param businessId
* @return * @return
*/ */
BannerInfoRspDTO selectOne(String businessId); BannerInfoRspDTO selectOne(String businessId);
/** /**
* 获取图片分页 * 获取Banner分页
* @author: zhangqingle
* @param pageUtil * @param pageUtil
* @param model * @param model
* @return * @return
...@@ -46,22 +50,6 @@ public interface BBannerService { ...@@ -46,22 +50,6 @@ public interface BBannerService {
List<BBanner> queryBannerByPagination(PageUtil pageUtil, FindBannerPaginDTO model); 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 * @author: jiangpengpeng
* @description: TODO * @description: TODO
......
...@@ -96,35 +96,6 @@ public class BBannerServiceImpl implements BBannerService { ...@@ -96,35 +96,6 @@ public class BBannerServiceImpl implements BBannerService {
return bBannerRepository.queryBanners(model); 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 * @param bannerOrderMap
......
...@@ -50,6 +50,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -50,6 +50,11 @@ public class BLessonController extends PaginationController<BLesson> {
private Global global; private Global global;
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="601 添加/编辑课程", notes="businessId为空时是添加方法,不为空时是修改方法") @ApiOperation(value="601 添加/编辑课程", notes="businessId为空时是添加方法,不为空时是修改方法")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result add(CurUser curUser, @Valid AddLessonDTO addLessonDTO, BindingResult bindingResult) { public Result add(CurUser curUser, @Valid AddLessonDTO addLessonDTO, BindingResult bindingResult) {
...@@ -63,6 +68,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -63,6 +68,11 @@ public class BLessonController extends PaginationController<BLesson> {
addLessonDTO); addLessonDTO);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="602 删除课程", notes="根据ID删除一条记录") @ApiOperation(value="602 删除课程", notes="根据ID删除一条记录")
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/remove") @PostMapping(value = "/remove")
...@@ -74,7 +84,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -74,7 +84,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId); businessId);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="603 唯一查找", notes="根据ID查找一条记录", response = BLesson.class) @ApiOperation(value="603 唯一查找", notes="根据ID查找一条记录", response = BLesson.class)
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@GetMapping(value = "/one") @GetMapping(value = "/one")
...@@ -85,7 +99,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -85,7 +99,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService.selectOne(businessId)); bLessonService.selectOne(businessId));
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="604 分页查询我发布的课程", notes="分页查询我发布的课程", response = BLesson.class) @ApiOperation(value="604 分页查询我发布的课程", notes="分页查询我发布的课程", response = BLesson.class)
@ApiImplicitParam(name = "releaseState", value = "发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)", required = false, dataType = "varchar") @ApiImplicitParam(name = "releaseState", value = "发布状态(0:待发布 1:审核中 2:已发布 3:已驳回 4:已关闭)", required = false, dataType = "varchar")
@GetMapping(value = "/queryBLessonsByPagination") @GetMapping(value = "/queryBLessonsByPagination")
...@@ -99,8 +117,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -99,8 +117,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="605 根据条件分页查询全部课程", notes="根据条件分页查询全部课程", response = BLesson.class) @ApiOperation(value="605 根据条件分页查询全部课程", notes="根据条件分页查询全部课程", response = BLesson.class)
@GetMapping(value = "/queryAllBLessonsByPagination") @GetMapping(value = "/queryAllBLessonsByPagination")
public Result queryAllBLessonsByPagination(CurUser curUser, @Valid FindAllLessonDTO findAllLessonDTO, BindingResult bindingResult) { public Result queryAllBLessonsByPagination(CurUser curUser, @Valid FindAllLessonDTO findAllLessonDTO, BindingResult bindingResult) {
...@@ -113,6 +134,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -113,6 +134,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="606 分页查询大家都在学", notes="分页查询大家都在学", response = BLesson.class) @ApiOperation(value="606 分页查询大家都在学", notes="分页查询大家都在学", response = BLesson.class)
@GetMapping(value = "/queryPersonMoreByPagination") @GetMapping(value = "/queryPersonMoreByPagination")
public Result queryPersonMoreByPagination(CurUser curUser, BindingResult bindingResult) { public Result queryPersonMoreByPagination(CurUser curUser, BindingResult bindingResult) {
...@@ -124,6 +150,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -124,6 +150,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="607 分页查询企业推荐", notes="分页查询企业推荐", response = BLesson.class) @ApiOperation(value="607 分页查询企业推荐", notes="分页查询企业推荐", response = BLesson.class)
@GetMapping(value = "/queryRecommendByPagination") @GetMapping(value = "/queryRecommendByPagination")
public Result queryRecommendByPagination(CurUser curUser, BindingResult bindingResult) { public Result queryRecommendByPagination(CurUser curUser, BindingResult bindingResult) {
...@@ -135,6 +166,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -135,6 +166,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="608 分页查询最受关注", notes="分页查询最受关注", response = BLesson.class) @ApiOperation(value="608 分页查询最受关注", notes="分页查询最受关注", response = BLesson.class)
@GetMapping(value = "/queryConcernByPagination") @GetMapping(value = "/queryConcernByPagination")
public Result queryConcernByPagination(CurUser curUser, BindingResult bindingResult) { public Result queryConcernByPagination(CurUser curUser, BindingResult bindingResult) {
...@@ -147,6 +183,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -147,6 +183,11 @@ public class BLessonController extends PaginationController<BLesson> {
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="609 分页查询可能感兴趣", notes="分页查询可能感兴趣", response = BLesson.class) @ApiOperation(value="609 分页查询可能感兴趣", notes="分页查询可能感兴趣", response = BLesson.class)
@GetMapping(value = "/queryInterestedByPagination") @GetMapping(value = "/queryInterestedByPagination")
public Result queryInterestedByPagination(CurUser curUser, BindingResult bindingResult) { public Result queryInterestedByPagination(CurUser curUser, BindingResult bindingResult) {
...@@ -158,6 +199,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -158,6 +199,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="610 首页分页查询全部课程", notes="根据条件分页查询全部课程", response = BLesson.class) @ApiOperation(value="610 首页分页查询全部课程", notes="根据条件分页查询全部课程", response = BLesson.class)
@GetMapping(value = "/queryHomeBLessonsByPagination") @GetMapping(value = "/queryHomeBLessonsByPagination")
public Result queryHomeBLessonsByPagination(CurUser curUser, @Valid FirstPageQueryDTO firstPageQueryDTO, BindingResult bindingResult) { public Result queryHomeBLessonsByPagination(CurUser curUser, @Valid FirstPageQueryDTO firstPageQueryDTO, BindingResult bindingResult) {
...@@ -173,6 +219,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -173,6 +219,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="611 关闭课程", notes="根据ID关闭一个课程") @ApiOperation(value="611 关闭课程", notes="根据ID关闭一个课程")
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/close") @PostMapping(value = "/close")
...@@ -184,6 +235,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -184,6 +235,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId); businessId);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="612 课程培训条件查询", notes="课程培训条件查询(Banner内部资源)", response = BLesson.class) @ApiOperation(value="612 课程培训条件查询", notes="课程培训条件查询(Banner内部资源)", response = BLesson.class)
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@GetMapping(value = "/findLessonAtBanner") @GetMapping(value = "/findLessonAtBanner")
...@@ -196,6 +252,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -196,6 +252,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService.findLessonAtBanner(lessonTrainDTO)); bLessonService.findLessonAtBanner(lessonTrainDTO));
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="613 我的课程总数(学习和发布)", notes="我的课程总数") @ApiOperation(value="613 我的课程总数(学习和发布)", notes="我的课程总数")
@GetMapping(value = "/iLessonCount") @GetMapping(value = "/iLessonCount")
public Result ILessonCountDTO(CurUser curUser, BindingResult bindingResult ) { public Result ILessonCountDTO(CurUser curUser, BindingResult bindingResult ) {
...@@ -206,6 +267,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -206,6 +267,11 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService.iLessonCount(userId)); bLessonService.iLessonCount(userId));
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="614 退出课程", notes="根据ID停用一条记录") @ApiOperation(value="614 退出课程", notes="根据ID停用一条记录")
@ApiImplicitParam(name = "businessId", value = "退出课程的选课id", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "退出课程的选课id", required = true, dataType = "varchar")
@PostMapping(value = "/quit") @PostMapping(value = "/quit")
...@@ -217,6 +283,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -217,6 +283,11 @@ public class BLessonController extends PaginationController<BLesson> {
quitLessonDTO); quitLessonDTO);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="615 分页查询我学习", notes="分页查询我学习", response = BLesson.class) @ApiOperation(value="615 分页查询我学习", notes="分页查询我学习", response = BLesson.class)
@GetMapping(value = "/queryLearnBLessonsByPagination") @GetMapping(value = "/queryLearnBLessonsByPagination")
public Result queryLearnBLessonsByPagination(CurUser curUser, @Valid ILearnLessonDTO param, BindingResult bindingResult) { public Result queryLearnBLessonsByPagination(CurUser curUser, @Valid ILearnLessonDTO param, BindingResult bindingResult) {
...@@ -229,6 +300,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -229,6 +300,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="616 列表页分页查询课程", notes="分页查询列表页全部", response = BLesson.class) @ApiOperation(value="616 列表页分页查询课程", notes="分页查询列表页全部", response = BLesson.class)
@GetMapping(value = "/queryListAllLessonByPagination") @GetMapping(value = "/queryListAllLessonByPagination")
public Result queryListAllLessonByPagination(CurUser curUser, @Valid FindListLessonDTO param, BindingResult bindingResult) { public Result queryListAllLessonByPagination(CurUser curUser, @Valid FindListLessonDTO param, BindingResult bindingResult) {
...@@ -264,6 +340,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -264,6 +340,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="618 发布课程", notes="根据ID发布一个课程") @ApiOperation(value="618 发布课程", notes="根据ID发布一个课程")
@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar") @ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")
@PostMapping(value = "/release") @PostMapping(value = "/release")
...@@ -275,6 +356,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -275,6 +356,11 @@ public class BLessonController extends PaginationController<BLesson> {
businessId); businessId);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="619 线上课程学员跟踪图表", notes="线上课程学员跟踪图表") @ApiOperation(value="619 线上课程学员跟踪图表", notes="线上课程学员跟踪图表")
@GetMapping(value = "/studentTrackingChart") @GetMapping(value = "/studentTrackingChart")
public Result studentTrackingChart(CurUser curUser, @Valid StudentTrackingChartDTO studentTrackingChartDTO, BindingResult bindingResult) { public Result studentTrackingChart(CurUser curUser, @Valid StudentTrackingChartDTO studentTrackingChartDTO, BindingResult bindingResult) {
...@@ -286,6 +372,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -286,6 +372,11 @@ public class BLessonController extends PaginationController<BLesson> {
model); model);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="620 线上课程学员跟踪", notes="线上课程学员跟踪") @ApiOperation(value="620 线上课程学员跟踪", notes="线上课程学员跟踪")
@GetMapping(value = "/studentTrackingByPagination") @GetMapping(value = "/studentTrackingByPagination")
public Result studentTrackingByPagination(CurUser curUser, @Valid StudentTrackingDTO studentTrackingDTO, BindingResult bindingResult) { public Result studentTrackingByPagination(CurUser curUser, @Valid StudentTrackingDTO studentTrackingDTO, BindingResult bindingResult) {
...@@ -297,6 +388,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -297,6 +388,11 @@ public class BLessonController extends PaginationController<BLesson> {
gridModel); gridModel);
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="621 取消指派", notes="取消指派") @ApiOperation(value="621 取消指派", notes="取消指派")
@PostMapping(value = "/cancelAppoint") @PostMapping(value = "/cancelAppoint")
public Result cancelAppoint(CurUser curUser, @Valid CancelAppointDTO cancelAppointDTO, BindingResult bindingResult) { public Result cancelAppoint(CurUser curUser, @Valid CancelAppointDTO cancelAppointDTO, BindingResult bindingResult) {
...@@ -308,6 +404,11 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -308,6 +404,11 @@ public class BLessonController extends PaginationController<BLesson> {
} }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation(value="622 推荐课程", notes="根据ID推荐课程") @ApiOperation(value="622 推荐课程", notes="根据ID推荐课程")
@PostMapping(value = "/recommend") @PostMapping(value = "/recommend")
public Result recommend(CurUser curUser,@Valid RecommendLessonDTO recommendLessonDTO,BindingResult bindingResult) { public Result recommend(CurUser curUser,@Valid RecommendLessonDTO recommendLessonDTO,BindingResult bindingResult) {
...@@ -318,13 +419,4 @@ public class BLessonController extends PaginationController<BLesson> { ...@@ -318,13 +419,4 @@ public class BLessonController extends PaginationController<BLesson> {
recommendLessonDTO); 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);
}
} }
...@@ -117,4 +117,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -117,4 +117,13 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
*/ */
@Select("<script>select is_finish from b_lesson_person where business_id = #{businessId}</script>") @Select("<script>select is_finish from b_lesson_person where business_id = #{businessId}</script>")
String selectIsFinish(CancelAppointDTO param); 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);
} }
...@@ -74,11 +74,11 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -74,11 +74,11 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" ,bc.c_name courseName " + " ,bc.c_name courseName " +
" 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 " +
" 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 " +
" left join b_course bc on bc.business_id = bl.course_id " + " left join b_course bc on bc.business_id = bl.course_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 suc.del_flag != 1 and suc.flag = 1 " +
" and bl.business_id = #{businessId} " + " and bl.business_id = #{businessId} " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
......
...@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor; ...@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import org.rcisoft.core.entity.IdEntity; import org.rcisoft.core.entity.IdEntity;
import org.rcisoft.core.util.UserUtil;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
...@@ -99,6 +100,17 @@ public class BLessonPerson extends IdEntity<BLessonPerson> { ...@@ -99,6 +100,17 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient @Transient
private String lessonType; private String lessonType;
//初始化
public void initModel(){
UserUtil.setCurrentPersistOperation(this);
//学习进度为0
this.setLearnProgress("0");
//设置正在学
this.setIsFinish("1");
//设置不收藏
this.setIsCollect("0");
//设置不指派
this.setIsAppoint("0");
}
} }
...@@ -15,10 +15,11 @@ import java.util.List; ...@@ -15,10 +15,11 @@ import java.util.List;
public interface BLessonService{ public interface BLessonService{
/** /**
* 根据主键唯一查找 * 根据主键唯一查找
* @param businessId * @author: zhangqingle
* @return * @param businessId
*/ * @return
*/
BLesson selectOne(String businessId); BLesson selectOne(String businessId);
/** /**
...@@ -30,61 +31,69 @@ public interface BLessonService{ ...@@ -30,61 +31,69 @@ public interface BLessonService{
*/ */
int updateByPrimaryKeySelective(BLesson bLesson); int updateByPrimaryKeySelective(BLesson bLesson);
/** /**
* 根据条件分页查找 * 根据条件分页查找
* @param pageUtil * @author: zhangqingle
* @param releaseState * @param pageUtil
* @return * @param releaseState
*/ * @return
*/
List<BLesson> queryBLessonsByPagination(PageUtil pageUtil, String releaseState, CurUser curUser); List<BLesson> queryBLessonsByPagination(PageUtil pageUtil, String releaseState, CurUser curUser);
/** /**
* 根据条件分页查找 * 根据条件分页查找
* @param pageUtil * @author: zhangqingle
* @param findAllLessonDTO * @param pageUtil
* @return * @param findAllLessonDTO
*/ * @return
*/
List<BLesson> queryAllBLessonsByPagination(PageUtil pageUtil, FindAllLessonDTO findAllLessonDTO); List<BLesson> queryAllBLessonsByPagination(PageUtil pageUtil, FindAllLessonDTO findAllLessonDTO);
/** /**
* 分页查找大家都在学 * 分页查找大家都在学
* @param pageUtil * @author: zhangqingle
* @param * @param pageUtil
* @return * @param
*/ * @return
*/
List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil,CurUser curUser); List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil,CurUser curUser);
/** /**
* 分页查找推荐 * 分页查找推荐
* @param pageUtil * @author: zhangqingle
* @param * @param pageUtil
* @return * @param
*/ * @return
*/
List<BLesson> queryRecommendByPagination(PageUtil pageUtil,CurUser curUser); List<BLesson> queryRecommendByPagination(PageUtil pageUtil,CurUser curUser);
/** /**
* 分页查找最受关注 * 分页查找最受关注
* @param pageUtil * @author: zhangqingle
* @param * @param pageUtil
* @return * @param
*/ * @return
*/
List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser); List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser);
/** /**
* 分页查找可能感兴趣的 * 分页查找可能感兴趣的
* @param pageUtil * @author: zhangqingle
* @param * @param pageUtil
* @return * @param
*/ * @return
*/
List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser); List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser);
/** /**
* 插入 * 插入/更新课程
* @param model * @author: zhangqingle
* @return * @param model
*/ * @return
*/
PersistModel persist(AddLessonDTO model); PersistModel persist(AddLessonDTO model);
/** /**
* @author: zhangqingle
* 逻辑删除 * 逻辑删除
* @param id * @param id
* @return * @return
...@@ -92,6 +101,7 @@ public interface BLessonService{ ...@@ -92,6 +101,7 @@ public interface BLessonService{
PersistModel removeBLesson(String id); PersistModel removeBLesson(String id);
/** /**
* @author: zhangqingle
* 首页条件查询全部课程 * 首页条件查询全部课程
* @return * @return
*/ */
...@@ -99,6 +109,7 @@ public interface BLessonService{ ...@@ -99,6 +109,7 @@ public interface BLessonService{
/** /**
* 关闭课程 * 关闭课程
* @author: zhangqingle
* @param id * @param id
* @return * @return
*/ */
...@@ -106,6 +117,7 @@ public interface BLessonService{ ...@@ -106,6 +117,7 @@ public interface BLessonService{
/** /**
* 发布课程 * 发布课程
* @author: zhangqingle
* @param id * @param id
* @return * @return
*/ */
...@@ -113,20 +125,16 @@ public interface BLessonService{ ...@@ -113,20 +125,16 @@ public interface BLessonService{
/** /**
* 推荐课程 * 推荐课程
* @author: zhangqingle
* @param recommendLessonDTO * @param recommendLessonDTO
* @return * @return
*/ */
PersistModel recommendBLesson(RecommendLessonDTO recommendLessonDTO); PersistModel recommendBLesson(RecommendLessonDTO recommendLessonDTO);
/**
* 指派课程
* @param appointLessonDTO
* @return
*/
PersistModel appointLessonToPerson(AppointLessonDTO appointLessonDTO);
/** /**
* 课程培训条件查询 * 课程培训条件查询
* @author: zhangqingle
* @param lessonTrainDTO * @param lessonTrainDTO
* @return * @return
*/ */
...@@ -134,6 +142,7 @@ public interface BLessonService{ ...@@ -134,6 +142,7 @@ public interface BLessonService{
/** /**
* 我发布的总数 * 我发布的总数
* @author: zhangqingle
* @param userId * @param userId
* @return * @return
*/ */
...@@ -141,6 +150,7 @@ public interface BLessonService{ ...@@ -141,6 +150,7 @@ public interface BLessonService{
/** /**
* 分页查询列表页全部 * 分页查询列表页全部
* @author: zhangqingle
* @param pageUtil * @param pageUtil
* @param model * @param model
* @return * @return
...@@ -156,27 +166,4 @@ public interface BLessonService{ ...@@ -156,27 +166,4 @@ public interface BLessonService{
*/ */
List<BLesson> theLessonMangageByPagination(PageUtil pageUtil,CurUser curUser,BLesson bLesson); 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);
} }
...@@ -6,14 +6,11 @@ import lombok.extern.slf4j.Slf4j; ...@@ -6,14 +6,11 @@ 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;
import org.rcisoft.business.bcourse.dto.AllCourseDTO; import org.rcisoft.business.bcourse.dto.AllCourseDTO;
import org.rcisoft.business.blesson.dao.BAppointRepository; import org.rcisoft.business.blesson.dao.*;
import org.rcisoft.business.blesson.dao.BLessonRepository;
import org.rcisoft.business.blesson.dao.BRecommendRepository;
import org.rcisoft.business.blesson.dto.*; import org.rcisoft.business.blesson.dto.*;
import org.rcisoft.business.blesson.entity.*; import org.rcisoft.business.blesson.entity.*;
import org.rcisoft.business.blesson.service.BLessonService; import org.rcisoft.business.blesson.service.BLessonService;
import org.rcisoft.business.blesson.util.recursion; import org.rcisoft.business.blesson.util.recursion;
import org.rcisoft.business.blesson.dao.BViewrangeRepository;
import org.rcisoft.core.aop.PageUtil; import org.rcisoft.core.aop.PageUtil;
import org.rcisoft.core.constant.MessageConstant; import org.rcisoft.core.constant.MessageConstant;
import org.rcisoft.core.exception.ServiceException; import org.rcisoft.core.exception.ServiceException;
...@@ -36,6 +33,8 @@ import java.util.List; ...@@ -36,6 +33,8 @@ import java.util.List;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.util.*; import java.util.*;
import static java.util.Arrays.asList;
/** /**
* Created by CodeGenerator on 2017/07/12. * Created by CodeGenerator on 2017/07/12.
...@@ -47,6 +46,9 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -47,6 +46,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired @Autowired
private BLessonRepository bLessonRepository; private BLessonRepository bLessonRepository;
@Autowired
private BLessonPersonRepository bLessonPersonRepository;
@Autowired @Autowired
private BCourseRepository bCourseRepository; private BCourseRepository bCourseRepository;
...@@ -294,7 +296,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -294,7 +296,7 @@ public class BLessonServiceImpl implements BLessonService {
//查询是否存在该课程推荐 //查询是否存在该课程推荐
List<String> recommendIds = bRecommendRepository.selectIdByLessonId(bRecommend.getLessonId()); List<String> recommendIds = bRecommendRepository.selectIdByLessonId(bRecommend.getLessonId());
if (recommendIds == null || recommendIds.size()<1){ if (recommendIds == null || recommendIds.size()<1){
//课程表----
//插入推荐表 //插入推荐表
UserUtil.setCurrentPersistOperation(bRecommend); UserUtil.setCurrentPersistOperation(bRecommend);
...@@ -326,35 +328,6 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -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 @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment