Commit 2b37d575 authored by YangZhaoJun1's avatar YangZhaoJun1

修改注解,课程章节列表一键复制到开课代码完成

parent efd9df07
......@@ -36,7 +36,7 @@ public class BCarouselController extends PaginationController<BCarousel> {
private Global global;
@ApiOperation(value="添加/编辑轮播图", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselDes", value = "轮播描述", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselUrl", value = "轮播图片", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselSort", value = "排序", required = false, dataType = "varchar"),
......@@ -77,7 +77,7 @@ public class BCarouselController extends PaginationController<BCarousel> {
@ApiOperation(value="获取图片分页", notes="根据URL中的参数分页查询图片")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselDes", value = "轮播描述", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselUrl", value = "轮播图片", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselSort", value = "排序", required = false, dataType = "varchar"),
......@@ -97,7 +97,7 @@ public class BCarouselController extends PaginationController<BCarousel> {
}
@ApiOperation(value="获取图片", notes="根据URL中的参数分页查询全部图片")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselDes", value = "轮播描述", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselUrl", value = "轮播图片", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "carouselSort", value = "排序", required = false, dataType = "varchar"),
......
......@@ -27,6 +27,7 @@ import org.rcisoft.core.result.ResultCode;
import org.rcisoft.core.result.ResultServiceEnums;
import org.rcisoft.core.util.UploadUtil;
import org.rcisoft.core.util.UserUtil;
import org.rcisoft.sys.user.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
......@@ -61,16 +62,18 @@ public class BChapterController extends PaginationController<BChapter> {
private Global global;
@ApiOperation(value="添加/编辑章节", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课id", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名称", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "chapterLevel", value = "等级,1:章 2:节", required = false, dataType = "Byte"),
@ApiImplicitParam(name = "pid", value = "上一级", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterUrl", value = "课程url", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterUrl", value = "课程url", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "mdFile", value = "任务书", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isTest", value = "1:实验 2:视频 3:PPT'", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1002')")
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonOrSl", value = "课程或开课;0:开课 1:课程", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID(课程ID和开课ID只能存在一个)", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
public Result add(@Valid BChapter bChapter,
BindingResult bindingResult
......@@ -138,7 +141,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value="分页查询章节", notes="根据条件分页查询章节")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课id", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterLevel", value = "等级,1:章 2:节", required = false, dataType = "Byte"),
......@@ -146,7 +149,9 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiImplicitParam(name = "chapterUrl", value = "课程url", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "mdFile", value = "任务书", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isTest", value = "1:实验 2:视频 3:PPT'", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonOrSl", value = "课程或开课;0:开课 1:课程", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID(课程ID和开课ID只能存在一个)", required = false, dataType = "varchar")})
@PostMapping(value = "/queryBChaptersByPagination")
public GridModel queryBChaptersByPagination(BChapter param) {
param.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
......@@ -157,7 +162,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value="根据条件查询章节", notes="根据条件查询章节")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slId", value = "开课id", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterName", value = "章节名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterLevel", value = "等级,1:章 2:节", required = false, dataType = "Byte"),
......@@ -165,7 +170,9 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiImplicitParam(name = "chapterUrl", value = "课程url", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "mdFile", value = "任务书", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isTest", value = "1:实验 2:视频 3:PPT'", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonOrSl", value = "课程或开课;0:开课 1:课程", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonId", value = "课程ID(课程ID和开课ID只能存在一个)", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBChaptersWithoutAuth")
public Result queryBChapters(BChapter param) {
/*if (StringUtils.isEmpty(param.getSlId()))
......@@ -175,7 +182,7 @@ public class BChapterController extends PaginationController<BChapter> {
if (!islogin)
map.put("RoleFlag", RoleFlagEnum.TOURIST.getFlag());
else {
User user = UserUtil.getUser();
SysUser user = UserUtil.getUser();
if (user.getRole().getCode().equals(RoleEnum.TEACHER.getCode()))
map.put("RoleFlag", RoleFlagEnum.TEACHER.getFlag());
else {
......@@ -193,7 +200,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value="分数列表", notes="根据章节id获取分数列表")
@ApiImplicitParams({@ApiImplicitParam(name = "stuInfo", value = "学生学号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "chapterId", value = "章节主键", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "chapterId", value = "章节主键", required = true, dataType = "varchar")})
@GetMapping(value = "/queryScoreListByChapterId")
public GridModel queryScoreListByChapterId(QueryScoreListDTO dto) {
bChapterService.queryScoreListByChapterIdByPagination(getPaginationUtility(), dto);
......@@ -202,9 +209,9 @@ public class BChapterController extends PaginationController<BChapter> {
}
@ApiOperation(value="批量打分", notes="批量打分")
@ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "课程id", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "score", value = "分数", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentId", value = "学生id", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "chapterId", value = "课程id", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "score", value = "分数", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentId", value = "学生id", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1002')")
@PostMapping(value = "/markBatch")
public Result markBatch(String scoreInfoList) {
......
......@@ -6,6 +6,7 @@ import org.rcisoft.business.bchapter.dto.ScoreInfoDTO;
import org.rcisoft.business.bchapter.dto.StuScoreDTO;
import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
......@@ -24,7 +25,11 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
* @param param
* @return
*/
@Select("<script>select * from b_chapter where del_flag = 0 and flag = 1 and chapter_level = 1 and sl_id = #{slId} order by create_date</script>")
@Select("<script>select * from b_chapter " +
"where del_flag = 0 and flag = 1 and chapter_level = 1 " +
"and sl_id = #{slId} " +
"and lesson_or_sl = #{lessonOrSl} " +
"order by create_date</script>")
@ResultMap(value = "SupperChildListResultMap" )
List<BChapter> queryBChapters(Map<String, Object> param);
......@@ -140,5 +145,28 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
@Update("<script>update b_r_student_chapter set score = -1 where business_id = #{businessId}</script>")
int deleteScoerInfo(String id);
@Select("<script>select * from b_chapter " +
"where del_flag = 0 and flag = 1 " +
"and lesson_id = #{lessonId}</script>")
@ResultMap(value = "BaseResultMap" )
List<BChapter> queryChapterByLessonId(String lessonId);
@Insert("<script>INSERT INTO b_chapter " +
"(create_date,create_by,update_date,update_by," +
"del_flag,flag,business_id," +
"sl_id,chapter_name,chapter_level,pid," +
"chapter_url,md_file,is_test,lesson_or_sl )VALUES" +
"<foreach collection=\"list\" item=\"item\" separator=\",\">" +
"( #{item.createDate},#{item.createBy},#{item.updateDate},#{item.updateBy}," +
"#{item.delFlag},#{item.flag},#{item.businessId}," +
"#{item.slId},#{item.chapterName},#{item.chapterLevel},#{item.pid}," +
"#{item.chapterUrl},#{item.mdFile},#{item.isTest},#{item.lessonOrSl})" +
"</foreach></script>")
int insertChapterList(List<BChapter> slList);
@Select("<script>select chapter_name from b_chapter " +
"where del_flag = 0 and flag = 1 " +
"and business_id = #{pid}</script>")
String selectChapterNameByPid(String pid);
}
......@@ -27,7 +27,7 @@ import java.util.List;
public class BChapter extends IdEntity<BChapter> {
/*开课id*/
@NotEmpty(message = "开课id必填")
//@NotEmpty(message = "开课id必填")
private String slId;
/*章节名称*/
@NotEmpty(message = "章节名称必填")
......@@ -43,8 +43,15 @@ public class BChapter extends IdEntity<BChapter> {
/**任务书*/
private String mdFile;
/*1:实验 2:视频 3:PPT*/
private String isTest;
/*课程或开课 0:开课 1:课程*/
private String lessonOrSl;
/*课程ID*/
private String lessonId;
@Transient
private List<BChapterRepository> childList;
......
......@@ -92,4 +92,5 @@ public interface BChapterService{
*/
void updateIsComplete(ScoreInfoDTO scoreInfoDTO,String token);
int addBslFormLesson(String bLseeonId, String lessonCode, String businessId);
}
......@@ -9,6 +9,8 @@ import org.rcisoft.business.bchapter.enums.ChapterLevelEnum;
import org.rcisoft.business.bchapter.enums.HasMarkEnum;
import org.rcisoft.business.bchapter.service.BChapterService;
import org.rcisoft.business.bchapter.vo.StudentChapterScoreVO;
import org.rcisoft.business.blesson.dao.BLessonRepository;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.brslstudent.dao.BRSlStudentRepository;
import org.rcisoft.business.bsl.dao.BSlRepository;
import org.rcisoft.business.bstudent.dao.BStudentRepository;
......@@ -22,6 +24,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -41,6 +44,8 @@ public class BChapterServiceImpl implements BChapterService {
private BStudentRepository bStudentRepository;
@Autowired
private BRSlStudentRepository brSlStudentRepository;
@Autowired
private BLessonRepository bLessonRepository;
@Override
public BChapter selectOne(String businessId){
......@@ -68,6 +73,7 @@ public class BChapterServiceImpl implements BChapterService {
public List<BChapter> queryBChapters(BChapter model) {
Map param = new HashMap<String,Object>();
param.put("slId",model.getSlId());
param.put("lessonOrSl",model.getLessonOrSl());
return bChapterRepository.queryBChapters(param);
}
......@@ -77,8 +83,8 @@ public class BChapterServiceImpl implements BChapterService {
public PersistModel persist(BChapter model, String token){
int line = 0;
if(model.getBusinessId()==null) {
if (bSlRepository.selectByPrimaryKey(model.getSlId()) == null)
throw new ServiceException(ResultServiceEnums.SL_INFO_NOT_EXISTS);
/*if (bSlRepository.selectByPrimaryKey(model.getSlId()) == null)
throw new ServiceException(ResultServiceEnums.SL_INFO_NOT_EXISTS);*/
UserUtil.setCurrentPersistOperation(model);
line = bChapterRepository.insertSelective(model);
}else
......@@ -167,4 +173,60 @@ public class BChapterServiceImpl implements BChapterService {
if(result<1)
throw new ServiceException(ResultServiceEnums.UPDATE_ERROR);
}
@Override
public int addBslFormLesson(String bLseeonId, String lessonCode, String slId) {
//获取课程的章节列表
List<BChapter> lessonList = bChapterRepository.queryChapterByLessonId(bLseeonId);
//new一个章的list
List<BChapter> chapterList = new ArrayList<>();
//map存放章的ID(key:章名称 value:新的章ID)
Map map = new HashMap();
for (int i=0;i<lessonList.size();i++){
BChapter sl_chapter = new BChapter();
if(lessonList.get(i).getPid().equals("-1")){
sl_chapter.setPid(lessonList.get(i).getPid());
sl_chapter.setSlId(slId);
sl_chapter.setChapterName(lessonList.get(i).getChapterName());
sl_chapter.setChapterLevel(lessonList.get(i).getChapterLevel());
sl_chapter.setChapterUrl(lessonList.get(i).getChapterUrl());
sl_chapter.setMdFile(lessonList.get(i).getMdFile());
sl_chapter.setIsTest(lessonList.get(i).getIsTest());
sl_chapter.setLessonOrSl("0");
UserUtil.setCurrentPersistOperation(sl_chapter);
chapterList.add(sl_chapter);
map.put(sl_chapter.getChapterName(),sl_chapter.getBusinessId());
}
}
//先把章插入
int chapter = bChapterRepository.insertChapterList(chapterList);
//new一个节的list
List<BChapter> sectionList = new ArrayList<>();
for (int i=0;i<lessonList.size();i++){
BChapter sl_chapter = new BChapter();
if(!lessonList.get(i).getPid().equals("-1")){
//根据父ID获取父节点章节名称
String chapterName = bChapterRepository.selectChapterNameByPid(lessonList.get(i).getPid());
//取出map中存放的新的章ID作为父节点ID
sl_chapter.setPid(String.valueOf(map.get(chapterName)));
sl_chapter.setSlId(slId);
sl_chapter.setChapterName(lessonList.get(i).getChapterName());
sl_chapter.setChapterLevel(lessonList.get(i).getChapterLevel());
sl_chapter.setChapterUrl(lessonList.get(i).getChapterUrl());
sl_chapter.setMdFile(lessonList.get(i).getMdFile());
sl_chapter.setIsTest(lessonList.get(i).getIsTest());
sl_chapter.setLessonOrSl("0");
UserUtil.setCurrentPersistOperation(sl_chapter);
sectionList.add(sl_chapter);
}
}
//执行插入节操作
int section = bChapterRepository.insertChapterList(sectionList);
if(chapter!=0&&section!=0){
return 1;
}else{
return 0;
}
}
}
......@@ -38,9 +38,9 @@ public class BClassController extends PaginationController<BClass> {
private Global global;
@ApiOperation(value="添加/编辑班级", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "className", value = "班级名称", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "班级编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "className", value = "班级名称", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentNum", value = "学生数量", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
......@@ -97,7 +97,7 @@ public class BClassController extends PaginationController<BClass> {
@ApiOperation(value="根据条件分页查询班级", notes="根据URL中的参数分页查询班级")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "className", value = "班级名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentNum", value = "学生数量", required = false, dataType = "varchar"),
......@@ -111,7 +111,7 @@ public class BClassController extends PaginationController<BClass> {
}
@ApiOperation(value="根据条件查询班级", notes="根据URL中的参数查询全部班级")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "className", value = "班级名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentNum", value = "学生数量", required = false, dataType = "varchar"),
......
......@@ -25,9 +25,9 @@ public class BImageController extends PaginationController<BImage> {
private BImageService bImageService;
@ApiOperation(value="添加/编辑图片", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "imageName", value = "图片标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageCode", value = "图片code", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageName", value = "图片标题", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "imageCode", value = "图片code", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
......@@ -63,7 +63,7 @@ public class BImageController extends PaginationController<BImage> {
@ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageName", value = "图片标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageCode", value = "图片code", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "delFlag", value = "删除标记(0:正常;1:删除;2:审核)", required = false, dataType = "varchar"),
......@@ -78,7 +78,7 @@ public class BImageController extends PaginationController<BImage> {
}
@ApiOperation(value="根据条件查询", notes="根据URL中的参数查询全部")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageName", value = "图片标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "imageCode", value = "图片code", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "delFlag", value = "删除标记(0:正常;1:删除;2:审核)", required = false, dataType = "varchar"),
......
......@@ -44,9 +44,9 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation(value="添加/编辑课程", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "defaultUrl", value = "默认封面图片url", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PostMapping(value = "/add")
......@@ -80,7 +80,7 @@ public class BLessonController extends PaginationController<BLesson> {
}
@ApiOperation(value="excel导入", notes="上传excel到服务器")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = false, dataType = "MultipartFile")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = true, dataType = "MultipartFile")
@PostMapping(value = "excelImport")
@PreAuthorize("hasRole('ROLE_1001')")
public Result excelImport(MultipartFile importFile) throws Exception {
......@@ -92,8 +92,8 @@ public class BLessonController extends PaginationController<BLesson> {
}
@ApiOperation(value="上传图片", notes="上传图片到服务器")
@ApiImplicitParams({@ApiImplicitParam(name = "importFile", value = "图片文件", required = false, dataType = "MultipartFile"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "importFile", value = "图片文件", required = true, dataType = "MultipartFile"),
@ApiImplicitParam(name = "code", value = "课程编号", required = true, dataType = "varchar")})
@PostMapping(value = "picImport")
@PreAuthorize("hasRole('ROLE_1001')")
public Result picImport(MultipartFile importFile,String code) throws Exception {
......@@ -132,7 +132,7 @@ public class BLessonController extends PaginationController<BLesson> {
}
@ApiOperation(value="恢复默认", notes="恢复默认封面图片")
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar")
@ApiImplicitParam(name = "code", value = "课程编号", required = true, dataType = "varchar")
@PostMapping(value = "defaultUrl")
@PreAuthorize("hasRole('ROLE_1001')")
public Result defaultUrl(String code)throws Exception {
......@@ -167,7 +167,7 @@ public class BLessonController extends PaginationController<BLesson> {
@ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "defaultUrl", value = "默认封面图片url", required = false, dataType = "varchar"),
......@@ -183,7 +183,7 @@ public class BLessonController extends PaginationController<BLesson> {
}
@ApiOperation(value="根据条件查询", notes="根据URL中的参数查询全部")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "defaultUrl", value = "默认封面图片url", required = false, dataType = "varchar"),
......
......@@ -32,11 +32,11 @@ public class BNewsController extends PaginationController<BNews> {
private BNewsService bNewsService;
@ApiOperation(value="添加/编辑新闻", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "newsName", value = "新闻标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsCode", value = "新闻code", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsName", value = "新闻标题", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "newsCode", value = "新闻code", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "releaseTime", value = "发布时间", required = false, dataType = "datetime"),
@ApiImplicitParam(name = "attribute", value = "0:非头条,1:头条", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "attribute", value = "0:非头条,1:头条", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "isRelease", value = "0未发布,1:发布", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsContent", value = "新闻内容", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
......@@ -79,7 +79,7 @@ public class BNewsController extends PaginationController<BNews> {
@ApiOperation(value="根据条件分页查询新闻", notes="根据URL中的参数分页查询新闻")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsName", value = "新闻标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsCode", value = "新闻code", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "releaseTime", value = "发布时间", required = false, dataType = "datetime"),
......@@ -97,7 +97,7 @@ public class BNewsController extends PaginationController<BNews> {
}
@ApiOperation(value="根据条件查询新闻", notes="根据URL中的参数查询全部新闻")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsName", value = "新闻标题", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "newsCode", value = "新闻code", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "releaseTime", value = "发布时间", required = false, dataType = "datetime"),
......
......@@ -29,9 +29,9 @@ public class BRClassStudentController extends PaginationController<BRClassStuden
@ApiOperation(value="添加/编辑学生班级中间表信息", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "classCode", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "classCode", value = "班级编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
public Result add(BRClassStudent bRClassStudent) {
......@@ -43,8 +43,8 @@ public class BRClassStudentController extends PaginationController<BRClassStuden
}
@ApiOperation(value="删除学生班级信息", notes="根据班级编号和学生编号删除一条记录")
@ApiImplicitParams({@ApiImplicitParam(name = "classCode", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "classCode", value = "班级编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/remove")
public Result remove(String stuCode,String classCode) {
......@@ -80,7 +80,7 @@ public class BRClassStudentController extends PaginationController<BRClassStuden
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "classCode", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBRClassStudentsByPagination")
......@@ -92,7 +92,7 @@ public class BRClassStudentController extends PaginationController<BRClassStuden
@ApiOperation(value="根据条件查询", notes="根据条件查询全部")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "classCode", value = "班级编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBRClassStudents")
......
......@@ -28,9 +28,9 @@ public class BRSlStudentController extends PaginationController<BRSlStudent> {
private BRSlStudentService bRSlStudentService;
@ApiOperation(value="添加/编辑学生课程中间表信息", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
public Result add(BRSlStudent bRSlStudent) {
......@@ -42,8 +42,8 @@ public class BRSlStudentController extends PaginationController<BRSlStudent> {
}
@ApiOperation(value="删除学生课程信息", notes="根课程级编号和学生编号删除一条记录")
@ApiImplicitParams({@ApiImplicitParam(name = "slCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "slCode", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/remove")
public Result remove(@RequestParam("studentCode") String studentCode,
......@@ -79,7 +79,7 @@ public class BRSlStudentController extends PaginationController<BRSlStudent> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBRSlStudentsByPagination")
......@@ -90,7 +90,7 @@ public class BRSlStudentController extends PaginationController<BRSlStudent> {
}
@ApiOperation(value="根据条件查询", notes="根据条件查询全部")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生编号", required = false, dataType = "varchar")})
@GetMapping(value = "/queryBRSlStudents")
......
......@@ -3,6 +3,7 @@ package org.rcisoft.business.bsl.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.bsl.dto.SlDetailDTO;
import org.rcisoft.business.bsl.entity.BSl;
import org.rcisoft.business.bsl.service.BSlService;
......@@ -27,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
/**
......@@ -41,9 +43,9 @@ public class BSlController extends PaginationController<BSl> {
private Global global;
@ApiOperation(value="添加/编辑课程", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课序号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课序号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "lessonCode", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "teacherCode", value = "教师编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "termCode", value = "学期编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isOnline", value = "是否上线,(0:待上线,1:已上线,2:已下线)", required = false, dataType = "varchar"),
......@@ -90,7 +92,7 @@ public class BSlController extends PaginationController<BSl> {
}
@ApiOperation(value="修改课程是否上线", notes="0:待上线,1:已上线,2:已下线")
@ApiImplicitParam(name = "code", value = "课程编号", required = false, dataType = "varchar")
@ApiImplicitParam(name = "code", value = "课程编号", required = true, dataType = "varchar")
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "updateIsOnline")
public Result updateIsOnline(String code) {
......@@ -113,7 +115,7 @@ public class BSlController extends PaginationController<BSl> {
@ApiOperation(value="分页查询课程", notes="根据条件分页查询课程")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课序号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "teacherCode", value = "教师编号", required = false, dataType = "varchar"),
......@@ -142,7 +144,7 @@ public class BSlController extends PaginationController<BSl> {
}
@ApiOperation(value="条件查询查询课程", notes="根据条件查询课程")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "课序号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "lessonCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "teacherCode", value = "教师编号", required = false, dataType = "varchar"),
......@@ -232,7 +234,7 @@ public class BSlController extends PaginationController<BSl> {
}
@ApiOperation(value="根据学号获取学习课程", notes="根据学号获取学习课程")
@ApiImplicitParam(name = "lessonName", value = "课程名称关键字", required = false, dataType = "varchar")
@ApiImplicitParam(name = "lessonName", value = "课程名称关键字", required = true, dataType = "varchar")
@GetMapping(value = "/mySlByStudentCode")
public GridModel mySlByStudentCode(@RequestParam(value = "lessonName", defaultValue = "") String lessonName) {
String code = "0108150216";//UserUtil.getUser().getLoginName();
......@@ -242,7 +244,7 @@ public class BSlController extends PaginationController<BSl> {
}
@ApiOperation(value="在教课程", notes="分页查询在教课程")
@ApiImplicitParam(name = "lessonName", value = "课程名称关键字", required = false, dataType = "varchar")
@ApiImplicitParam(name = "lessonName", value = "课程名称关键字", required = true, dataType = "varchar")
@GetMapping(value = "/mySlByTeacherCode")
public GridModel mySlByTeacherCode(@RequestParam(value = "lessonName", defaultValue = "") String lessonName) {
String code = "0108150216";//UserUtil.getUser().getLoginName();
......@@ -271,8 +273,8 @@ public class BSlController extends PaginationController<BSl> {
}
@ApiOperation(value="查询学生是否存在课程中", notes="根据学生号及课程号查询该学生是否存在该课程中")
@ApiImplicitParams({@ApiImplicitParam(name = "selectCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生学号", required = false, dataType = "varchar")})
@ApiImplicitParams({@ApiImplicitParam(name = "selectCode", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "studentCode", value = "学生学号", required = true, dataType = "varchar")})
@GetMapping(value = "/queryStuInLessionOrNot")
public Result queryStuInLessionOrNot(@RequestParam("selectCode") String selectCode,
@RequestParam("studentCode") String studentCode) {
......@@ -292,7 +294,7 @@ public class BSlController extends PaginationController<BSl> {
@ApiOperation(value="判断是否是该老师的课", notes="根据教师Code和开课ID判断是否是该老师的课")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "teacherCode", value = "教师编号", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "teacherCode", value = "教师编号", required = true, dataType = "varchar")})
@GetMapping(value = "/queryBslTeacher")
public Result queryBslTeacher(@RequestParam("teacherCode") String teacherCode,
@RequestParam("businessId") String businessId) {
......
......@@ -117,4 +117,5 @@ public interface BSlService{
int queryStuInLessionOrNot(String lessionCode, String studentCode);
int queryBslTeacher(String teacherCode, String businessId);
}
......@@ -2,6 +2,9 @@ package org.rcisoft.business.bsl.service.impl;
import com.alibaba.fastjson.JSON;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.rcisoft.business.bchapter.dao.BChapterRepository;
import org.rcisoft.business.bchapter.entity.BChapter;
import org.rcisoft.business.bchapter.service.BChapterService;
import org.rcisoft.business.blesson.dao.BLessonRepository;
import org.rcisoft.business.blesson.entity.BLesson;
import org.rcisoft.business.brslstudent.dao.BRSlStudentRepository;
......@@ -53,6 +56,8 @@ public class BSlServiceImpl implements BSlService {
private BTermRepository bTermRepository;
@Autowired
private BRSlStudentRepository brSlStudentRepository;
@Autowired
private BChapterService bChapterService;
/*@Autowired
private UserRepository userRepository;
@Autowired
......@@ -113,7 +118,11 @@ public class BSlServiceImpl implements BSlService {
String pName = global.getGIT_LAB_PROJECT_PREFIX()+model.getCode();
model.setGitLabProjectName(pName);
UserUtil.setCurrentPersistOperation(model);
line = bSlRepository.insertSelective(model);
int data = bSlRepository.insertSelective(model);
int result = bChapterService.addBslFormLesson(bLesson.getBusinessId(),model.getLessonCode(), model.getBusinessId());
if(data!=0&&result!=0){
line= data;
}
}
//FamilyLogger.sysInfo(UserUtils.getUser().getBusinessId(),UserUtils.getUser().getLoginName()+"新增了ID为"+user.getBusinessId()+"的用户");
return new PersistModel(line);
......@@ -320,6 +329,7 @@ public class BSlServiceImpl implements BSlService {
return bSlRepository.queryBslTeacher(teacherCode,businessId);
}
private Map<String,Object> getParames(BSl model){
Map param = new HashMap<String,Object>();
param.put("lessonName", model.getLessonName());
......
......@@ -37,7 +37,7 @@ public class BSlApplyController extends PaginationController<BSlApply> {
private BSlApplyService bSlApplyService;
@ApiOperation(value="添加/编辑开课申请", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "termCode", value = "学期标号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "applyCourse", value = "申请理由", required = false, dataType = "varchar"),
......@@ -86,8 +86,8 @@ public class BSlApplyController extends PaginationController<BSlApply> {
@ApiOperation(value="通过开课申请", notes="通过开课申请")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "courseCode", value = "课程编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课序号", required = false, dataType = "varchar")})
@ApiImplicitParam(name = "courseCode", value = "课程编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "slCode", value = "课序号", required = true, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/agree")
public Result agree(@Valid ApplyDTO applyDTO,
......@@ -126,7 +126,7 @@ public class BSlApplyController extends PaginationController<BSlApply> {
@ApiOperation(value="根据条件分页查询开课申请", notes="根据条件分页查询开课申请")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "termCode", value = "学期标号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "slName", value = "课程名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "applyCourse", value = "申请理由", required = false, dataType = "varchar"),
......
......@@ -41,8 +41,8 @@ public class BStudentController extends PaginationController<BStudent> {
private Global global;
@ApiOperation(value="添加/编辑学生信息", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......@@ -63,7 +63,7 @@ public class BStudentController extends PaginationController<BStudent> {
}
@ApiOperation(value="excel导入", notes="excel导入学生信息")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = false, dataType = "MultipartFile")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = true, dataType = "MultipartFile")
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "excelImport")
public Result excelImport(MultipartFile importFile) throws Exception {
......@@ -86,7 +86,7 @@ public class BStudentController extends PaginationController<BStudent> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询学生信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
......@@ -102,7 +102,7 @@ public class BStudentController extends PaginationController<BStudent> {
}
@ApiOperation(value="根据条件分页查询", notes="根据班级编号分页查询学生信息")
@ApiImplicitParam(name = "classCode", value = "班级编号", required = false, dataType = "varchar")
@ApiImplicitParam(name = "classCode", value = "班级编号", required = true, dataType = "varchar")
@GetMapping(value = "/queryStudentByClassCode")
public GridModel queryStudentByClassCode(String classCode) {
List<BStudent> bStudents = bStudentService.queryStudentByClassCodeByPagination(getPaginationUtility(),classCode);
......@@ -111,7 +111,7 @@ public class BStudentController extends PaginationController<BStudent> {
}
@ApiOperation(value="根据条件分页查询", notes="根据开课编号分页查询学生信息")
@ApiImplicitParam(name = "slCode", value = "开课编号", required = false, dataType = "varchar")
@ApiImplicitParam(name = "slCode", value = "开课编号", required = true, dataType = "varchar")
@GetMapping(value = "/queryStudentBySlCode")
public GridModel queryStudentBySlCode(String slCode) {
List<BStudent> bStudents = bStudentService.queryStudentBySlByPagination(getPaginationUtility(),slCode);
......@@ -133,7 +133,7 @@ public class BStudentController extends PaginationController<BStudent> {
}
@ApiOperation(value="根据条件查询", notes="根据条件查询学生信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
......
......@@ -38,8 +38,8 @@ public class BTeacherController extends PaginationController<BTeacher> {
private Global global;
@ApiOperation(value="添加/编辑教师信息", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendOrder", value = "推荐排序", required = false, dataType = "varchar"),
......@@ -73,8 +73,8 @@ public class BTeacherController extends PaginationController<BTeacher> {
@ApiOperation(value="excel导入", notes="excel导入学生信息")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = false, dataType = "MultipartFile")
@ApiOperation(value="excel导入", notes="excel导入教师信息")
@ApiImplicitParam(name = "importFile", value = "excel文件", required = true, dataType = "MultipartFile")
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "excelImport")
public Result excelImport(MultipartFile importFile) throws Exception {
......@@ -97,7 +97,7 @@ public class BTeacherController extends PaginationController<BTeacher> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询教师信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
......@@ -113,7 +113,7 @@ public class BTeacherController extends PaginationController<BTeacher> {
}
@ApiOperation(value="根据条件查询", notes="根据条件查询教师信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "教师工号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isRecommend", value = "0:未推荐,1:推荐", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "recommendDate", value = "推荐时间,排序依据", required = false, dataType = "varchar"),
......
......@@ -38,12 +38,12 @@ public class BTermController extends PaginationController<BTerm> {
private Global global;
@ApiOperation(value="添加/编辑学期", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "startDate", value = "学期开始时间", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "endDate", value = "学期结束时间", required = false, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "startDate", value = "学期开始时间", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "endDate", value = "学期结束时间", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "isStart", value = "是否启动(0:未启动,1:启动)", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学期编号", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "学期名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "code", value = "学期编号", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "name", value = "学期名称", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/add")
......@@ -76,7 +76,7 @@ public class BTermController extends PaginationController<BTerm> {
@ApiOperation(value="根据条件分页查询", notes="根据URL中的参数分页查询学期")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "startDate", value = "学期开始时间", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "endDate", value = "学期结束时间", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isStart", value = "是否启动(0:未启动,1:启动)", required = false, dataType = "varchar"),
......@@ -92,7 +92,7 @@ public class BTermController extends PaginationController<BTerm> {
}
@ApiOperation(value="根据条件查询", notes="根据URL中的参数查询学期")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "startDate", value = "学期开始时间", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "endDate", value = "学期结束时间", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "isStart", value = "是否启动(0:未启动,1:启动)", required = false, dataType = "varchar"),
......@@ -122,7 +122,7 @@ public class BTermController extends PaginationController<BTerm> {
}
@ApiOperation(value="修改 is_start值", notes="根据学期编号修改 is_start值")
@ApiImplicitParam(name = "code", value = "学期编号", required = false, dataType = "varchar")
@ApiImplicitParam(name = "code", value = "学期编号", required = true, dataType = "varchar")
@PreAuthorize("hasRole('ROLE_1001')")
@PostMapping(value = "/changeIS")
public Result changeIS(@RequestParam("code") String code)
......
......@@ -39,9 +39,9 @@ public class BVideoController extends PaginationController<BVideo> {
@ApiOperation(value="添加/编辑视频", notes="businessId为空时是添加方法,不为空时是修改方法")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoName", value = "视频名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoUrl", value = "视频地址", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoUrl", value = "视频地址", required = true, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "'0'为视频,'1'为附件", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar")})
@PreAuthorize("hasRole('ROLE_1002')")
......@@ -78,7 +78,7 @@ public class BVideoController extends PaginationController<BVideo> {
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询视频信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoName", value = "视频名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoUrl", value = "视频地址", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "'0'为视频,'1'为附件", required = false, dataType = "varchar"),
......@@ -92,7 +92,7 @@ public class BVideoController extends PaginationController<BVideo> {
}
@ApiOperation(value="根据条件分页查询", notes="根据条件分页查询视频信息")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoName", value = "视频名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoUrl", value = "视频地址", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "'0'为视频,'1'为附件", required = false, dataType = "varchar"),
......@@ -108,7 +108,7 @@ public class BVideoController extends PaginationController<BVideo> {
@ApiOperation(value="上传视频", notes="上传视频")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar"),
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoName", value = "视频名称", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "videoUrl", value = "视频地址", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "type", value = "'0'为视频,'1'为附件", required = false, dataType = "varchar"),
......@@ -119,7 +119,7 @@ public class BVideoController extends PaginationController<BVideo> {
@ApiImplicitParam(name = "delFlag", value = "删除标记(0:正常;1:删除;2:审核)", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "flag", value = "启用标记(0:停用;1:启用)", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "remarks", value = "备注", required = false, dataType = "varchar"),
@ApiImplicitParam(name = "file", value = "视频文件", required = false, dataType = "MultipartFile")})
@ApiImplicitParam(name = "file", value = "视频文件", required = true, dataType = "MultipartFile")})
@PreAuthorize("hasRole('ROLE_1002')")
@PostMapping(value = "/uploadVideo")
public Result uploadVideo(BVideo bVideo, HttpServletRequest request) {
......@@ -165,7 +165,7 @@ public class BVideoController extends PaginationController<BVideo> {
* @return
*/
@ApiOperation(value="下载文件", notes="下载文件")
@ApiImplicitParam(name = "chapterId", value = "章节ID", required = false, dataType = "varchar")
@ApiImplicitParam(name = "chapterId", value = "章节ID", required = true, dataType = "varchar")
@PostMapping(value = "/downloadFile")
public Result downloadFile(String chapterId, HttpServletResponse response){
BVideo video = bVideoService.queryFileUrlByChapterId(chapterId);
......
......@@ -16,7 +16,9 @@
<result column="pid" jdbcType="VARCHAR" property="pid"/>
<result column="chapter_url" jdbcType="VARCHAR" property="chapterUrl"/>
<result column="is_test" jdbcType="VARCHAR" property="isTest"/>
<!--<result column="md_file" jdbcType="LONGVARCHAR" property="mdFile"/>-->
<result column="md_file" jdbcType="LONGVARCHAR" property="mdFile"/>
<result column="lesson_or_sl" jdbcType="VARCHAR" property="lessonOrSl"/>
<result column="lesson_id" jdbcType="VARCHAR" property="lessonId"/>
</resultMap>
<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.bchapter.entity.BChapter" extends="BaseResultMap">
......
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