|
|
|
@ -74,7 +74,7 @@ public class ObjectiveApi {
|
|
|
|
|
if (StringUtils.isBlank(objectiveQuestion.getType())) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isBlank(objectiveQuestion.getObjectiveId())) { //子系统的oneName放在这个字段传过来
|
|
|
|
|
if (StringUtils.isBlank(objectiveQuestion.getOneName())) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (objectiveQuestion.getType().equals("1") || objectiveQuestion.getType().equals("0")) {
|
|
|
|
@ -87,7 +87,7 @@ public class ObjectiveApi {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(objectiveQuestion.getObjectiveId());
|
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(objectiveQuestion.getOneName());
|
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
|
//新增题库表
|
|
|
|
|
String uuid = IdUtil.randomUUID();
|
|
|
|
@ -103,7 +103,7 @@ public class ObjectiveApi {
|
|
|
|
|
sysTopicAndCourse.setTopicId(uuid);
|
|
|
|
|
sysTopicAndCourse.setTopicType(objectiveQuestion.getType());
|
|
|
|
|
sysTopicAndCourse.setOneId(oneId);
|
|
|
|
|
sysTopicAndCourse.setOneName(objectiveQuestion.getObjectiveId()); //子系统的oneName放在这个字段传过来
|
|
|
|
|
sysTopicAndCourse.setOneName(objectiveQuestion.getOneName());
|
|
|
|
|
if (StringUtils.isNotBlank(objectiveQuestion.getTwoID())) {
|
|
|
|
|
sysTopicAndCourse.setTwoId(objectiveQuestion.getTwoID());
|
|
|
|
|
sysTopicAndCourse.setTwoName(objectiveQuestion.getTwoName());
|
|
|
|
@ -126,7 +126,12 @@ public class ObjectiveApi {
|
|
|
|
|
//ID不为空,修改绑定信息
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getTopicAndCourseId())) {
|
|
|
|
|
SysTopicAndCourse sysTopicAndCourse = new SysTopicAndCourse();
|
|
|
|
|
BeanUtils.copyProperties(dto, sysTopicAndCourse);
|
|
|
|
|
sysTopicAndCourse.setId(dto.getTopicAndCourseId());
|
|
|
|
|
sysTopicAndCourse.setTopicId(dto.getObjectiveId());
|
|
|
|
|
sysTopicAndCourse.setOneId(dto.getOneID());
|
|
|
|
|
sysTopicAndCourse.setOneName(dto.getOneName());
|
|
|
|
|
sysTopicAndCourse.setTwoId(dto.getTwoID());
|
|
|
|
|
sysTopicAndCourse.setTwoName(dto.getTwoName());
|
|
|
|
|
sysTopicAndCourseMapper.updateByPrimaryKeySelective(sysTopicAndCourse);
|
|
|
|
|
}
|
|
|
|
|
//修改题库基础信息
|
|
|
|
@ -400,7 +405,6 @@ public class ObjectiveApi {
|
|
|
|
|
* 参数:systemOwner
|
|
|
|
|
* return:List<SysObjectiveQuestions>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("随机获取35道内置单选题")
|
|
|
|
|
@PostMapping("selectRandomObjectiveSingle")
|
|
|
|
@ -427,7 +431,6 @@ public class ObjectiveApi {
|
|
|
|
|
* 参数:systemOwner
|
|
|
|
|
* return:List<SysObjectiveQuestions>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
@ApiOperation("随机获取5道内置多选题")
|
|
|
|
|
@PostMapping("selectRandomObjectiveMany")
|
|
|
|
|