Commit 8f9946b1 authored by luzhuang's avatar luzhuang

分类排序

parent e4d09eff
...@@ -73,7 +73,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -73,7 +73,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiImplicitParam(name = "isTest", value = "课件类型(单选) 1视频 2音频 3PPT 4pdf 5资料", required = true, dataType = "varchar")}) @ApiImplicitParam(name = "isTest", value = "课件类型(单选) 1视频 2音频 3PPT 4pdf 5资料", required = true, dataType = "varchar")})
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result add(CurUser curUser, @Valid BChapter bChapter, BindingResult bindingResult) { public Result add(CurUser curUser, @Valid BChapter bChapter, BindingResult bindingResult) {
PersistModel data = bChapterService.persist(bChapter); PersistModel data = bChapterService.persist(bChapter,curUser.getCorpId());
return Result.builder(data, return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
...@@ -95,7 +95,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -95,7 +95,7 @@ public class BChapterController extends PaginationController<BChapter> {
@ApiOperation(value = "203 分页查询章节", notes = "根据条件分页查询章节", response = QueryChapterListResDTO.class) @ApiOperation(value = "203 分页查询章节", notes = "根据条件分页查询章节", response = QueryChapterListResDTO.class)
@PostMapping(value = "/queryBChaptersByPagination") @PostMapping(value = "/queryBChaptersByPagination")
public Result queryBChaptersByPagination(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) { public Result queryBChaptersByPagination(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) {
bChapterService.queryBChaptersByPagination(getPaginationUtility(), param); bChapterService.queryBChaptersByPagination(getPaginationUtility(), param,curUser.getCorpId());
GridModel gridModel = getGridModelResponse(); GridModel gridModel = getGridModelResponse();
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
...@@ -107,7 +107,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -107,7 +107,7 @@ public class BChapterController extends PaginationController<BChapter> {
@GetMapping(value = "/queryBChaptersWithoutAuth") @GetMapping(value = "/queryBChaptersWithoutAuth")
public Result queryBChapters(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) { public Result queryBChapters(CurUser curUser,@Valid QueryChapterListDTO param,BindingResult br) {
Map<String, Object> map = new HashedMap(); Map<String, Object> map = new HashedMap();
map.put("chapterList", bChapterService.queryBChapters(param)); map.put("chapterList", bChapterService.queryBChapters(param,curUser.getCorpId()));
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
...@@ -120,7 +120,7 @@ public class BChapterController extends PaginationController<BChapter> { ...@@ -120,7 +120,7 @@ public class BChapterController extends PaginationController<BChapter> {
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
MessageConstant.MESSAGE_ALERT_ERROR, MessageConstant.MESSAGE_ALERT_ERROR,
bChapterService.queryBChaptersWithProgress(param)); bChapterService.queryBChaptersWithProgress(param,curUser.getCorpId()));
} }
// //
// @ApiOperation(value = "更改章节状态", notes = "根据章节ID更改章节状态") // @ApiOperation(value = "更改章节状态", notes = "根据章节ID更改章节状态")
......
...@@ -47,7 +47,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> { ...@@ -47,7 +47,10 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
*/ */
@Select("<script>select * from b_chapter " + @Select("<script>select * from b_chapter " +
"where del_flag = 0 and flag = 1 and pid = -1 " + "where del_flag = 0 and flag = 1 and pid = -1 " +
" and lesson_id = #{lessonId}\n" + " and lesson_id = #{lessonId} " +
"and corp_id = #{corpId} " +
"order by sort asc</script>") "order by sort asc</script>")
@ResultMap(value = "SupperChildListResultMap") @ResultMap(value = "SupperChildListResultMap")
List<QueryChapterListResDTO> queryBChapters(Map<String, Object> param); List<QueryChapterListResDTO> queryBChapters(Map<String, Object> param);
......
...@@ -11,6 +11,6 @@ public class QueryChapterListDTO { ...@@ -11,6 +11,6 @@ public class QueryChapterListDTO {
@ApiModelProperty(value = "课程ID") @ApiModelProperty(value = "课程ID")
private String lessonId; private String lessonId;
@Length(min = 1,max = 64,message = "长度最小为1,最大为50") @Length(min = 1,max = 64,message = "长度最小为1,最大为50")
@ApiModelProperty(value = "课程ID") @ApiModelProperty(value = "userID")
private String studentId; private String studentId;
} }
...@@ -57,4 +57,7 @@ public class QueryChapterListResDTO { ...@@ -57,4 +57,7 @@ public class QueryChapterListResDTO {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private String businessId; private String businessId;
@ApiModelProperty(value = "id")
private String corpId;
} }
...@@ -27,7 +27,7 @@ public interface BChapterService{ ...@@ -27,7 +27,7 @@ public interface BChapterService{
* @param model * @param model
* @return * @return
*/ */
List<QueryChapterListResDTO> queryBChaptersByPagination(PageUtil pageUtil, QueryChapterListDTO model); List<QueryChapterListResDTO> queryBChaptersByPagination(PageUtil pageUtil, QueryChapterListDTO model,String corpId);
/** /**
* 根据章节id查找学生分数信息 * 根据章节id查找学生分数信息
...@@ -41,21 +41,21 @@ public interface BChapterService{ ...@@ -41,21 +41,21 @@ public interface BChapterService{
* @param model * @param model
* @return * @return
*/ */
List<QueryChapterListResDTO> queryBChapters(QueryChapterListDTO model); List<QueryChapterListResDTO> queryBChapters(QueryChapterListDTO model,String corpId);
/** /**
* 根据条件查找全部 * 根据条件查找全部
* @param model * @param model
* @return * @return
*/ */
Map queryBChaptersWithProgress(QueryChapterListDTO model); Map queryBChaptersWithProgress(QueryChapterListDTO model,String corpId);
/** /**
* 插入 * 插入
* @param model * @param model
* @return * @return
*/ */
PersistModel persist(BChapter model); PersistModel persist(BChapter model,String corpId);
/** /**
* 修改 * 修改
......
...@@ -70,8 +70,8 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -70,8 +70,8 @@ public class BChapterServiceImpl implements BChapterService {
} }
@Override @Override
public List<QueryChapterListResDTO> queryBChaptersByPagination(PageUtil pageUtil, QueryChapterListDTO model) { public List<QueryChapterListResDTO> queryBChaptersByPagination(PageUtil pageUtil, QueryChapterListDTO model,String corpId) {
return queryChapterListResDTO(model); return queryChapterListResDTO(model,corpId);
} }
@Override @Override
...@@ -80,12 +80,12 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -80,12 +80,12 @@ public class BChapterServiceImpl implements BChapterService {
} }
@Override @Override
public List<QueryChapterListResDTO> queryBChapters(QueryChapterListDTO model) { public List<QueryChapterListResDTO> queryBChapters(QueryChapterListDTO model,String corpId) {
return queryChapterListResDTO(model); return queryChapterListResDTO(model,corpId);
} }
@Override @Override
public Map queryBChaptersWithProgress(QueryChapterListDTO model) { public Map queryBChaptersWithProgress(QueryChapterListDTO model,String corpId) {
List<QueryChapterListResDTO> queryChapterListResDTOS = queryChapterListResDTO(model); List<QueryChapterListResDTO> queryChapterListResDTOS = queryChapterListResDTO(model,corpId);
queryChapterListResDTOS.stream().forEach(queryChapterListResDTO -> { queryChapterListResDTOS.stream().forEach(queryChapterListResDTO -> {
queryChapterListResDTO.getChildList().stream().forEach(childList -> { queryChapterListResDTO.getChildList().stream().forEach(childList -> {
List<BRStudentChapter> brStudentChapterList = brStudentChapterRepository.queryByStuIdAndChapter(childList.getBusinessId(),model.getStudentId()); List<BRStudentChapter> brStudentChapterList = brStudentChapterRepository.queryByStuIdAndChapter(childList.getBusinessId(),model.getStudentId());
...@@ -106,18 +106,19 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -106,18 +106,19 @@ public class BChapterServiceImpl implements BChapterService {
* @param model * @param model
* @return * @return
*/ */
public List<QueryChapterListResDTO> queryChapterListResDTO(QueryChapterListDTO model) { public List<QueryChapterListResDTO> queryChapterListResDTO(QueryChapterListDTO model,String corpId) {
Map param = new HashMap<String, Object>(); Map param = new HashMap<String, Object>();
if (model.getLessonId() != null && !"".equals(model.getLessonId())) { if (model.getLessonId() != null && !"".equals(model.getLessonId())) {
param.put("lessonId", model.getLessonId()); param.put("lessonId", model.getLessonId());
} }
param.put("corpId",corpId);
return bChapterRepository.queryBChapters(param); return bChapterRepository.queryBChapters(param);
} }
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
@Override @Override
public PersistModel persist(BChapter model) { public PersistModel persist(BChapter model,String corpId) {
int line = 0; int line = 0;
if (model.getBusinessId() == null) { if (model.getBusinessId() == null) {
UserUtil.setCurrentPersistOperation(model); UserUtil.setCurrentPersistOperation(model);
...@@ -135,6 +136,7 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -135,6 +136,7 @@ public class BChapterServiceImpl implements BChapterService {
} }
int sort = bChapterRepository.selectMaxSort(model.getPid(), model.getLessonId()); int sort = bChapterRepository.selectMaxSort(model.getPid(), model.getLessonId());
model.setSort(sort); model.setSort(sort);
model.setCorpId(corpId);
line = bChapterRepository.insertSelective(model); line = bChapterRepository.insertSelective(model);
bChapterRepository.updateClassHourInLesson(model.getLessonId());//更新b_lesson表中 class_hour bChapterRepository.updateClassHourInLesson(model.getLessonId());//更新b_lesson表中 class_hour
......
...@@ -41,7 +41,7 @@ public class BCourseController extends PaginationController<BCourse> { ...@@ -41,7 +41,7 @@ public class BCourseController extends PaginationController<BCourse> {
private BCourseRepository bCourseRepository; private BCourseRepository bCourseRepository;
@ApiOperation(value = "301 查询课程分类", notes = "查询课程分类", response = QueryCourseResDTO.class) @ApiOperation(value = "301 查询课程分类", notes = "查询课程分类", response = QueryCourseResDTO.class)
@ApiImplicitParam(name = "cName", value = "(课程名)模糊查询", required = true, dataType = "varchar") @ApiImplicitParam(name = "cName", value = "(课程分类名)模糊查询", required = true, dataType = "varchar")
@PostMapping(value = "/queryCourse") @PostMapping(value = "/queryCourse")
public Result queryBCourse(CurUser curUser, @Valid String cName, BindingResult br) { public Result queryBCourse(CurUser curUser, @Valid String cName, BindingResult br) {
BCourse bCourse = new BCourse(); BCourse bCourse = new BCourse();
...@@ -56,11 +56,12 @@ public class BCourseController extends PaginationController<BCourse> { ...@@ -56,11 +56,12 @@ public class BCourseController extends PaginationController<BCourse> {
} }
@ApiOperation(value = "302 根据条件分页查询", notes = "根据条件分页查询标签", response = QueryCourseResDTO.class) @ApiOperation(value = "302 根据条件分页查询", notes = "根据条件分页查询标签", response = QueryCourseResDTO.class)
@ApiImplicitParam(name = "cName", value = "(课程名)模糊查询", required = false, dataType = "varchar") @ApiImplicitParam(name = "cName", value = "(课程分类名)模糊查询", required = false, dataType = "varchar")
@GetMapping(value = "/queryBCourseByPagination") @GetMapping(value = "/queryBCourseByPagination")
public Result queryBCourseByPagination(CurUser curUser, @Valid String cName, BindingResult br) { public Result queryBCourseByPagination(CurUser curUser, @Valid String cName, BindingResult br) {
BCourse bCourse = new BCourse(); BCourse bCourse = new BCourse();
bCourse.setCName(cName); bCourse.setCName(cName);
bCourse.setCorpId(curUser.getCorpId());
bCourseServiceImpl.queryBCourseByPagination(getPaginationUtility(), bCourse); bCourseServiceImpl.queryBCourseByPagination(getPaginationUtility(), bCourse);
GridModel gridModel = getGridModelResponse(); GridModel gridModel = getGridModelResponse();
return Result.builder(new PersistModel(1), return Result.builder(new PersistModel(1),
......
...@@ -21,10 +21,10 @@ public class QueryCourseResDTO { ...@@ -21,10 +21,10 @@ public class QueryCourseResDTO {
@ApiModelProperty(value = "子章节") @ApiModelProperty(value = "子章节")
private List<BCourse> children; private List<BCourse> children;
@ApiModelProperty(value = "序号") @ApiModelProperty(value = "排序序号")
private int sort; private int sort;
@ApiModelProperty(value = "序号") @ApiModelProperty(value = "上一级")
private String pid; private String pid;
@ApiModelProperty(value = "等级") @ApiModelProperty(value = "等级")
......
package org.rcisoft.business.bcourse.service.impl; package org.rcisoft.business.bcourse.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.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;
...@@ -47,16 +48,17 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -47,16 +48,17 @@ public class BCourseServiceImpl implements BCourseService {
if (model.getCName() != null && !"".equals(model.getCName())) { if (model.getCName() != null && !"".equals(model.getCName())) {
param.put("cName", model.getCName()); param.put("cName", model.getCName());
} }
param.put("corpId", model.getCorpId());
return bCourseRepository.queryCourses(param); return bCourseRepository.queryCourses(param);
} }
@Override @Override
public PersistModel insertCourse(BCourse bCourse) { public PersistModel insertCourse(BCourse bCourse) {
if(bCourse.getCName()==null||bCourse.getCName().equals("")){ if (bCourse.getCName() == null || bCourse.getCName().equals("")) {
throw new ServiceException(ResultServiceEnums.NAME_IS_NULL); throw new ServiceException(ResultServiceEnums.NAME_IS_NULL);
} }
List<BCourse> list = bCourseRepository.selectOneByName(bCourse.getCName(),bCourse.getCorpId()); List<BCourse> list = bCourseRepository.selectOneByName(bCourse.getCName(), bCourse.getCorpId());
if (list.size() > 0) { if (list.size() > 0) {
throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS); throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS);
} }
...@@ -64,19 +66,19 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -64,19 +66,19 @@ public class BCourseServiceImpl implements BCourseService {
if (bCourse.getPid() == null || "".equals(bCourse.getPid())) { if (bCourse.getPid() == null || "".equals(bCourse.getPid())) {
bCourse.setPid("00000000"); bCourse.setPid("00000000");
bCourse.setCourseLevel("1"); bCourse.setCourseLevel("1");
int sort = bCourseRepository.getSort(bCourse.getPid(),bCourse.getCorpId()); int sort = bCourseRepository.getSort(bCourse.getPid(), bCourse.getCorpId());
bCourse.setSort(sort); bCourse.setSort(sort);
} else if ("00000000".equals(bCourse.getPid())) { } else if ("00000000".equals(bCourse.getPid())) {
bCourse.setCourseLevel("1"); bCourse.setCourseLevel("1");
int sort = bCourseRepository.getSort(bCourse.getPid(),bCourse.getCorpId()); int sort = bCourseRepository.getSort(bCourse.getPid(), bCourse.getCorpId());
bCourse.setSort(sort); bCourse.setSort(sort);
} else if (bCourseRepository.queryParentLevel(bCourse.getPid(),bCourse.getCorpId()) == 1) {//通过getpid 获取上一级的level } else if (bCourseRepository.queryParentLevel(bCourse.getPid(), bCourse.getCorpId()) == 1) {//通过getpid 获取上一级的level
bCourse.setCourseLevel("2"); bCourse.setCourseLevel("2");
int sort = bCourseRepository.getSort(bCourse.getPid(),bCourse.getCorpId()); int sort = bCourseRepository.getSort(bCourse.getPid(), bCourse.getCorpId());
bCourse.setSort(sort); bCourse.setSort(sort);
} else if (bCourseRepository.queryParentLevel(bCourse.getPid(),bCourse.getCorpId()) == 2) { } else if (bCourseRepository.queryParentLevel(bCourse.getPid(), bCourse.getCorpId()) == 2) {
bCourse.setCourseLevel("3"); bCourse.setCourseLevel("3");
int sort = bCourseRepository.getSort(bCourse.getPid(),bCourse.getCorpId()); int sort = bCourseRepository.getSort(bCourse.getPid(), bCourse.getCorpId());
bCourse.setSort(sort); bCourse.setSort(sort);
} else { } else {
throw new ServiceException(ResultServiceEnums.COURSE_ERROR); throw new ServiceException(ResultServiceEnums.COURSE_ERROR);
...@@ -86,17 +88,17 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -86,17 +88,17 @@ public class BCourseServiceImpl implements BCourseService {
} }
@Override @Override
public PersistModel removeCourse(String corpId,String id) { public PersistModel removeCourse(String corpId, String id) {
List<AllCourseDTO> allCourse = null; List<AllCourseDTO> allCourse = null;
if (org.apache.commons.lang3.StringUtils.isNotEmpty(id)){ if (org.apache.commons.lang3.StringUtils.isNotEmpty(id)) {
allCourse = this.findAllCourse(corpId); allCourse = this.findAllCourse(corpId);
} }
List<String> courseIds = null; List<String> courseIds = null;
if (allCourse != null){ if (allCourse != null) {
//查询出所有子分类 //查询出所有子分类
courseIds = recursion.FindSons(id,allCourse); courseIds = recursion.FindSons(id, allCourse);
//将一级分类放入分类集合中 //将一级分类放入分类集合中
courseIds.add(id); courseIds.add(id);
} }
...@@ -106,7 +108,7 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -106,7 +108,7 @@ public class BCourseServiceImpl implements BCourseService {
@Override @Override
public PersistModel updateCourse(BCourse bCourse) { public PersistModel updateCourse(BCourse bCourse) {
List<BCourse> list = bCourseRepository.selectOneByName(bCourse.getCName(),bCourse.getCorpId()); List<BCourse> list = bCourseRepository.selectOneByName(bCourse.getCName(), bCourse.getCorpId());
if (list.size() > 0) { if (list.size() > 0) {
throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS); throw new ServiceException(ResultServiceEnums.NAME_IS_EXISTS);
} }
...@@ -116,16 +118,86 @@ public class BCourseServiceImpl implements BCourseService { ...@@ -116,16 +118,86 @@ public class BCourseServiceImpl implements BCourseService {
@Override @Override
public PersistModel sortCourse(String json) { public PersistModel sortCourse(String json) {
Map<String,Object> maps = (Map) JSON.parse(json); // Map<String,Object> maps = (Map) JSON.parse(json);
// List<BCourse> bCourses = new ArrayList<>();
// for (String obj : maps.keySet()) {
// BCourse bCourse = new BCourse();
// String value = maps.get(obj).toString();
// bCourse.setBusinessId(obj.toString());
// String[] split = StringUtils.split(value, ",");
// bCourse.setPid(split[0]);
// bCourse.setSort(Integer.parseInt(split[1]));
// bCourse.setCourseLevel(split[2]);
// bCourses.add(bCourse);
// }
// int line = bCourseRepository.sortCourser(bCourses);
List<Map<String, String>> listObjectFir = (List<Map<String, String>>) JSONArray.parse(json);
List<BCourse> bCourses = new ArrayList<>(); List<BCourse> bCourses = new ArrayList<>();
for (String obj : maps.keySet()) { for (Map<String, String> mapList : listObjectFir) {
BCourse bCourse = new BCourse(); BCourse bCourse = new BCourse();
String value = maps.get(obj).toString();
bCourse.setBusinessId(obj.toString()); for (Map.Entry<String, String> str : mapList.entrySet()) {
String[] split = StringUtils.split(value, ","); if (str.getKey().equals("key")) {
bCourse.setPid(split[0]); bCourse.setBusinessId(String.valueOf(str.getValue()));
bCourse.setSort(Integer.parseInt(split[1])); }
bCourse.setCourseLevel(split[2]); if (str.getKey().equals("pid")) {
bCourse.setPid(String.valueOf(str.getValue()));
}
if (str.getKey().equals("sort")) {
bCourse.setSort(Integer.parseInt(String.valueOf(str.getValue())));
}
if (str.getKey().equals("courseLevel")) {
bCourse.setCourseLevel(String.valueOf(str.getValue()));
}
if (str.getKey().equals("children")) {
String child = String.valueOf(str.getValue());
List<Map<String, String>> list1 = (List<Map<String, String>>) JSONArray.parse(child);
for (Map<String, String> mapList1 : list1) {
BCourse bCourse1 = new BCourse();
for (Map.Entry<String, String> str1 : mapList1.entrySet()) {
if (str1.getKey().equals("key")) {
bCourse1.setBusinessId(str1.getValue());
}
if (str1.getKey().equals("pid")) {
bCourse1.setPid(str1.getValue());
}
if (str1.getKey().equals("sort")) {
bCourse1.setSort(Integer.parseInt(String.valueOf(str1.getValue())));
}
if (str1.getKey().equals("courseLevel")) {
bCourse1.setCourseLevel(String.valueOf(str1.getValue()));
}
if (str1.getKey().equals("children")) {
String child2 = String.valueOf(str1.getValue());
List<Map<String, String>> list2 = (List<Map<String, String>>) JSONArray.parse(child2);
for (Map<String, String> mapList2 : list2) {
BCourse bCourse2 = new BCourse();
for (Map.Entry<String, String> str2 : mapList2.entrySet()) {
if (str2.getKey().equals("key")) {
bCourse2.setBusinessId(str2.getValue());
}
if (str2.getKey().equals("pid")) {
bCourse2.setPid(str2.getValue());
}
if (str2.getKey().equals("sort")) {
bCourse2.setSort(Integer.parseInt(String.valueOf(str2.getValue())));
}
if (str2.getKey().equals("courseLevel")) {
bCourse2.setCourseLevel(String.valueOf(str2.getValue()));
}
}
bCourses.add(bCourse2);
}
}
}
bCourses.add(bCourse1);
}
}
}
bCourses.add(bCourse); bCourses.add(bCourse);
} }
int line = bCourseRepository.sortCourser(bCourses); int line = bCourseRepository.sortCourser(bCourses);
......
...@@ -29,7 +29,7 @@ import java.util.List; ...@@ -29,7 +29,7 @@ import java.util.List;
/** /**
* Created by on 2019-9-25 10:01:43. * Created by on 2019-9-25 10:01:43.
*/ */
@Api("10 章节") @Api(tags = "12 学生章节")
@RestController @RestController
@RequestMapping("brstudentchapter") @RequestMapping("brstudentchapter")
public class BRStudentChapterController extends PaginationController<BRStudentChapter> { public class BRStudentChapterController extends PaginationController<BRStudentChapter> {
...@@ -38,7 +38,7 @@ public class BRStudentChapterController extends PaginationController<BRStudentCh ...@@ -38,7 +38,7 @@ public class BRStudentChapterController extends PaginationController<BRStudentCh
private BRStudentChapterService bRStudentChapterServiceImpl; private BRStudentChapterService bRStudentChapterServiceImpl;
@ApiOperation(value="1001 添加/更新学生端观看章节进度", notes="添加/更新") @ApiOperation(value="1201 添加/更新学生端观看章节进度", notes="添加/更新")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")}) //@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result addOrUpdate(@Valid BRStudentChapterDto brStudentChapterDto, BindingResult bindingResult) { public Result addOrUpdate(@Valid BRStudentChapterDto brStudentChapterDto, BindingResult bindingResult) {
......
...@@ -43,7 +43,7 @@ public abstract class DataEntity<T> implements Serializable { ...@@ -43,7 +43,7 @@ public abstract class DataEntity<T> implements Serializable {
protected String flag ; // 启用标记(0:停用;1:启用) protected String flag ; // 启用标记(0:停用;1:启用)
// @OperateFlagAnno // @OperateFlagAnno
protected String corpId ; // 企业id(0:停用;1:启用) protected String corpId ; // 企业id
/** /**
* 设置删除 * 设置删除
......
...@@ -6,6 +6,7 @@ server: ...@@ -6,6 +6,7 @@ server:
context-path: / context-path: /
#uri-encoding: UTF-8 #uri-encoding: UTF-8
type: dev1 type: dev1
maxHttpHeaderSize: 102400
#logging: #logging:
# level: # level:
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<result column="sort" jdbcType="INTEGER" property="sort"/> <result column="sort" jdbcType="INTEGER" property="sort"/>
<result column="experiment_type" jdbcType="VARCHAR" property="experimentType"/> <result column="experiment_type" jdbcType="VARCHAR" property="experimentType"/>
<result column="course_time" jdbcType="VARCHAR" property="courseTime"/> <result column="course_time" jdbcType="VARCHAR" property="courseTime"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
</resultMap> </resultMap>
<resultMap id="BaseResultMapDTO" type="org.rcisoft.business.bchapter.dto.QueryChapterListResDTO"> <resultMap id="BaseResultMapDTO" type="org.rcisoft.business.bchapter.dto.QueryChapterListResDTO">
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
<result column="is_complete" jdbcType="VARCHAR" property="isComplete"/> <result column="is_complete" jdbcType="VARCHAR" property="isComplete"/>
<result column="file_name" jdbcType="VARCHAR" property="fileName"/> <result column="file_name" jdbcType="VARCHAR" property="fileName"/>
<result column="course_time" jdbcType="VARCHAR" property="courseTime"/> <result column="course_time" jdbcType="VARCHAR" property="courseTime"/>
<result column="corp_id" jdbcType="VARCHAR" property="corpId"/>
</resultMap> </resultMap>
<!--教师和管理员使用这个--> <!--教师和管理员使用这个-->
......
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