Commit 85c23e43 authored by YangZhaoJun1's avatar YangZhaoJun1

解决BUG

parent 9e0cfa5d
...@@ -63,7 +63,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -63,7 +63,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiImplicitParam(name = "chapterName", value = "章节名称", required = true, dataType = "varchar"), @ApiImplicitParam(name = "chapterName", value = "章节名称", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pid", value = "上一级", required = true, dataType = "varchar"), @ApiImplicitParam(name = "pid", value = "上一级", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"), @ApiImplicitParam(name = "classHour", value = "课时", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isTest", value = "1:实验 2:视频 3:PPT'", required = false, dataType = "varchar"), @ApiImplicitParam(name = "isTest", value = "1:实验 2:视频 3:PPT 4:pdf 5:资料", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonOrSl", value = "课程或开课;0:开课 1:课程", required = true, dataType = "varchar"), @ApiImplicitParam(name = "lessonOrSl", value = "课程或开课;0:开课 1:课程", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID(课程ID和开课ID只能存在一个)", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "lessonId", value = "课程ID(课程ID和开课ID只能存在一个)", required = false, dataType = "varchar")})
@PreAuthorize("hasAnyRole('ROLE_1001','ROLE_1002')") @PreAuthorize("hasAnyRole('ROLE_1001','ROLE_1002')")
...@@ -433,6 +433,8 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -433,6 +433,8 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value="章节向上调顺序", notes="章节向上调顺序") @ApiOperation(value="章节向上调顺序", notes="章节向上调顺序")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pid", value = "父节点ID", required = true, dataType = "varchar"), @ApiImplicitParam(name = "pid", value = "父节点ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "sort", value = "当前顺序", required = true, dataType = "Integer")}) @ApiImplicitParam(name = "sort", value = "当前顺序", required = true, dataType = "Integer")})
@PostMapping(value = "/updateTopChapter") @PostMapping(value = "/updateTopChapter")
public Result updateTopChapter(BChapter bChapter){ public Result updateTopChapter(BChapter bChapter){
...@@ -446,6 +448,8 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -446,6 +448,8 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value="章节向下调顺序", notes="章节向下调顺序") @ApiOperation(value="章节向下调顺序", notes="章节向下调顺序")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "pid", value = "父节点ID", required = true, dataType = "varchar"), @ApiImplicitParam(name = "pid", value = "父节点ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "sort", value = "当前顺序", required = true, dataType = "Integer")}) @ApiImplicitParam(name = "sort", value = "当前顺序", required = true, dataType = "Integer")})
@PostMapping(value = "/updateDownChapter") @PostMapping(value = "/updateDownChapter")
public Result updateDownChapter(BChapter bChapter){ public Result updateDownChapter(BChapter bChapter){
......
...@@ -203,7 +203,9 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -203,7 +203,9 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
@Param("lessonId") String lessonId); @Param("lessonId") String lessonId);
@Select("<script>select * from b_chapter where sort &lt; #{sort} " + @Select("<script>select * from b_chapter where sort &lt; #{sort} " +
"AND pid = #{pid} AND sl_id = #{slId} " + "AND pid = #{pid} " +
"<if test=\"slId !=null and slId !=''\">AND sl_id = #{slId} </if> " +
"<if test=\"lessonId !=null and lessonId !=''\">AND lesson_id = #{lessonId} </if> " +
"ORDER BY sort desc LIMIT 1</script>") "ORDER BY sort desc LIMIT 1</script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
BChapter getlessChapter(BChapter bChapter); BChapter getlessChapter(BChapter bChapter);
...@@ -213,7 +215,9 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -213,7 +215,9 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
int updateSortById(@Param("businessId") String businessId, @Param("sort") int sort); int updateSortById(@Param("businessId") String businessId, @Param("sort") int sort);
@Select("<script>select * from b_chapter where sort &gt; #{sort} " + @Select("<script>select * from b_chapter where sort &gt; #{sort} " +
"AND pid = #{pid} AND sl_id = #{slId} " + "AND pid = #{pid} " +
"<if test=\"slId !=null and slId !=''\">AND sl_id = #{slId} </if> " +
"<if test=\"lessonId !=null and lessonId !=''\">AND lesson_id = #{lessonId} </if> " +
"ORDER BY sort asc LIMIT 1</script>") "ORDER BY sort asc LIMIT 1</script>")
@ResultMap(value = "BaseResultMap" ) @ResultMap(value = "BaseResultMap" )
BChapter getBigChapter(BChapter bChapter); BChapter getBigChapter(BChapter bChapter);
......
...@@ -112,7 +112,7 @@ public class BSlController extends PaginationController<BSl> { ...@@ -112,7 +112,7 @@ public class BSlController extends PaginationController<BSl> {
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"), @ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "termName", value = "学期名称", required = false, dataType = "varchar"), @ApiImplicitParam(name = "termName", value = "学期名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "termCode", value = "学期编号", required = false, dataType = "varchar"), @ApiImplicitParam(name = "termCode", value = "学期编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "auditStatus", value = "审核状态 0:待发布,1审核中,2已发布,3已驳回", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "auditStatus", value = "审核状态 0:待发布,1审核中,2已发布,3已驳回,4已下线", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBSlsByPagination") @GetMapping(value = "/queryBSlsByPagination")
public GridModel queryBSlsByPagination(BSl param) { public GridModel queryBSlsByPagination(BSl param) {
param.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID)); param.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
...@@ -299,7 +299,7 @@ public class BSlController extends PaginationController<BSl> { ...@@ -299,7 +299,7 @@ public class BSlController extends PaginationController<BSl> {
@ApiOperation(value="开课审核", notes="开课审核") @ApiOperation(value="开课审核", notes="开课审核")
@ApiImplicitParams({@ApiImplicitParam(name = "slId", value = "开课ID", required = true, dataType = "varchar"), @ApiImplicitParams({@ApiImplicitParam(name = "slId", value = "开课ID", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "status", value = "要变成的状态0:待发布,1审核中,2已发布,3已驳回,结课", required = false, dataType = "varchar"), @ApiImplicitParam(name = "status", value = "要变成的状态0:待发布,1审核中,2已发布,3已驳回,4结课", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "opinion", value = "驳回意见(通过不用写意见)", required = false, dataType = "varchar")}) @ApiImplicitParam(name = "opinion", value = "驳回意见(通过不用写意见)", required = false, dataType = "varchar")})
@PostMapping("/auditBsl") @PostMapping("/auditBsl")
public Result auditBsl(String slId, String status, String opinion){ public Result auditBsl(String slId, String status, String opinion){
......
...@@ -94,7 +94,7 @@ public interface BSlRepository extends BaseMapper<BSl> { ...@@ -94,7 +94,7 @@ public interface BSlRepository extends BaseMapper<BSl> {
"AND t2.flag = 1\n" + "AND t2.flag = 1\n" +
"AND t3.del_flag = 0\n" + "AND t3.del_flag = 0\n" +
"AND t3.flag = 1\n" + "AND t3.flag = 1\n" +
"AND t2.is_online = '1' "+ "AND t2.audit_status != '4' "+
"<if test=\"lessonName !=null and lessonName !=''\">AND t3.lesson_name like CONCAT('%',#{lessonName},'%') </if>" + "<if test=\"lessonName !=null and lessonName !=''\">AND t3.lesson_name like CONCAT('%',#{lessonName},'%') </if>" +
"<if test=\"termCode !=null and termCode !=''\">AND t2.term_code like CONCAT('%',#{termCode},'%') </if></script>") "<if test=\"termCode !=null and termCode !=''\">AND t2.term_code like CONCAT('%',#{termCode},'%') </if></script>")
List<SlDTO> selectStudentSLByCode(@Param("studentCode") String studentCode, List<SlDTO> selectStudentSLByCode(@Param("studentCode") String studentCode,
...@@ -109,7 +109,7 @@ public interface BSlRepository extends BaseMapper<BSl> { ...@@ -109,7 +109,7 @@ public interface BSlRepository extends BaseMapper<BSl> {
*/ */
@Select("<script>SELECT\n" + @Select("<script>SELECT\n" +
"\tt2.`code` as code,\n" + "\tt2.`code` as code,\n" +
"\tt2.`is_online` as isOnline,\n" + "t2.audit_status AS auditStatus, " +
"\tt2.sl_cover_url as slCoverUrl,\n" + "\tt2.sl_cover_url as slCoverUrl,\n" +
"\tt2.business_id as businessId,\n" + "\tt2.business_id as businessId,\n" +
"\tt3.lesson_name as lessonName\n" + "\tt3.lesson_name as lessonName\n" +
...@@ -122,7 +122,7 @@ public interface BSlRepository extends BaseMapper<BSl> { ...@@ -122,7 +122,7 @@ public interface BSlRepository extends BaseMapper<BSl> {
"AND t2.flag = 1\n" + "AND t2.flag = 1\n" +
"AND t3.del_flag = 0\n" + "AND t3.del_flag = 0\n" +
"AND t3.flag = 1\n"+ "AND t3.flag = 1\n"+
"AND t2.is_online != 2 "+ "AND t2.audit_status != '4' "+
"<if test=\"lessonName !=null and lessonName !=''\">AND t3.lesson_name like CONCAT('%',#{lessonName},'%') </if>" + "<if test=\"lessonName !=null and lessonName !=''\">AND t3.lesson_name like CONCAT('%',#{lessonName},'%') </if>" +
"<if test=\"auditStatus !=null and auditStatus !=''\">AND t2.audit_status = #{auditStatus} </if>" + "<if test=\"auditStatus !=null and auditStatus !=''\">AND t2.audit_status = #{auditStatus} </if>" +
" <if test=\"termCode !=null and termCode !=''\">AND t2.term_code like CONCAT('%',#{termCode},'%') </if></script>") " <if test=\"termCode !=null and termCode !=''\">AND t2.term_code like CONCAT('%',#{termCode},'%') </if></script>")
...@@ -144,7 +144,8 @@ public interface BSlRepository extends BaseMapper<BSl> { ...@@ -144,7 +144,8 @@ public interface BSlRepository extends BaseMapper<BSl> {
"(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','1','%' )) AS experiment,\n" + "(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','1','%' )) AS experiment,\n" +
"(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','2','%' )) AS video,\n" + "(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','2','%' )) AS video,\n" +
"(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','3','%' )) AS ppt,\n" + "(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','3','%' )) AS ppt,\n" +
"(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','4','%' )) AS pdf\n" + "(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','4','%' )) AS pdf,\n" +
"(select count(*) from b_chapter bc where bc.sl_id=t1.business_id and bc.is_test like CONCAT('%','5','%' )) AS file\n" +
"FROM\n" + "FROM\n" +
"b_sl t1\n" + "b_sl t1\n" +
"LEFT JOIN b_lesson_direction t7 ON t1.business_id = t7.sl_id\n" + "LEFT JOIN b_lesson_direction t7 ON t1.business_id = t7.sl_id\n" +
......
...@@ -17,6 +17,6 @@ public class SlDTO { ...@@ -17,6 +17,6 @@ public class SlDTO {
private String businessId; private String businessId;
/** 已学习0否,1是*/ /** 已学习0否,1是*/
private String isStudy; private String isStudy;
/** 是否上线1是2否*/ /** 状态*/
private String isOnline; private String auditStatus;
} }
...@@ -22,6 +22,7 @@ public class SlDetailDTO { ...@@ -22,6 +22,7 @@ public class SlDetailDTO {
private String video; private String video;
private String ppt; private String ppt;
private String pdf; private String pdf;
private String file;
private String credits; private String credits;
private String classHour; private String classHour;
private String directionName; private String directionName;
......
...@@ -79,10 +79,10 @@ public interface BSlService{ ...@@ -79,10 +79,10 @@ public interface BSlService{
/** /**
* 根据教师工号查找在教课程 * 根据教师工号查找在教课程
* @param code * @param teacherCode
* @return * @return
*/ */
List<SlDTO> queryTeacherSLByCodeByPagination(PageUtil pageUtil, String code, String lessonName, String auditStatus, String termCode); List<SlDTO> queryTeacherSLByCodeByPagination(PageUtil pageUtil, String teacherCode, String lessonName, String auditStatus, String termCode);
/** /**
* 获取精品课程 * 获取精品课程
......
...@@ -293,8 +293,8 @@ public class BSlServiceImpl implements BSlService { ...@@ -293,8 +293,8 @@ public class BSlServiceImpl implements BSlService {
} }
@Override @Override
public List<SlDTO> queryTeacherSLByCodeByPagination(PageUtil pageUtil, String code, String lessonName, String auditStatus, String termCode) { public List<SlDTO> queryTeacherSLByCodeByPagination(PageUtil pageUtil, String teacherCode, String lessonName, String auditStatus, String termCode) {
return bSlRepository.selectTeacherSLByCode(code,lessonName, auditStatus, termCode); return bSlRepository.selectTeacherSLByCode(teacherCode,lessonName, auditStatus, termCode);
} }
@Override @Override
......
...@@ -128,4 +128,8 @@ global: ...@@ -128,4 +128,8 @@ global:
admin: ROLE_1001 admin: ROLE_1001
teacher: ROLE_1002 teacher: ROLE_1002
student: ROLE_1003 student: ROLE_1003
java_simple: 0001
java_project: 0002
html_simple: 1001
html_project: 1002
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