测评联调修改

hehai
mzh820631607 4 years ago
parent 0b346e9059
commit 5d6d1b6a0c
  1. 5
      src/main/java/com/msdw/tms/api/QuestionsControllerApi.java
  2. 11
      src/main/java/com/msdw/tms/controller/EvaluationRecordController.java
  3. 9
      src/main/java/com/msdw/tms/controller/QuestionsController.java
  4. 9
      src/main/resources/application.yml
  5. 8
      src/main/resources/mapper/tms/ProjectDao.xml

@ -11,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
@ -51,7 +52,9 @@ public interface QuestionsControllerApi {
* 是否禁用试题
*/
@ApiOperation(value = "是否禁用试题", notes = "是否禁用试题")
R isNable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id);
R isNable(@ApiParam(name = "id", value = "试题主键", required = true) List<Integer> idList);
// 2020.09.18
// R isNable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id);
/**
* 删除

@ -58,7 +58,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi
}
@Override
@PostMapping("/previous")
@GetMapping("/previous")
public R previousQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId,
@RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo,
@RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException {
@ -67,7 +67,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi
}
@Override
@PostMapping("/next")
@GetMapping("/next")
public R nextQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId,
@RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo,
@RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException {
@ -83,7 +83,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi
}
@Override
@PostMapping("/submit")
@GetMapping("/submit")
public R submitEvaluation(@RequestParam("evaluationRecordId") Integer evaluationRecordId,
@RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo,
@RequestParam(value = "userAnswer", required = false) String userAnswer,
@ -99,6 +99,11 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi
return R.ok().put("data", detailVO);
}
/**
* 查询是否能够开启实验
* @param userId
* @return
*/
@Override
@GetMapping("/can_experiment")
public R isOpenExperiment(Integer userId) {

@ -89,10 +89,13 @@ public class QuestionsController implements QuestionsControllerApi {
/**
* 是否禁用试题
*/
@Override
// @Override
@PutMapping("/isenable")
// 2020.09.18
// @RequiresPermissions("qms:questions:isenable")
public R isNable(Integer id) {
// public R isNable(@RequestBody Integer id) {
public R isNable(@RequestBody List<Integer> idList) {
Integer id = idList.get(0);
boolean b = questionsService.isEnable(id);
return b ? R.ok() : R.error();
@ -102,7 +105,7 @@ public class QuestionsController implements QuestionsControllerApi {
* 删除
*/
@Override
@DeleteMapping("/delete")
@PostMapping("/delete")
//@RequiresPermissions("qms:questions:delete")
public R delete(@RequestBody Integer[] ids) {
boolean delete = questionsService.deleteByIds(Arrays.asList(ids));

@ -5,9 +5,12 @@ spring:
# url: jdbc:mysql://www.liuwanr.cn:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
# username: super
# password: huoran888
url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
url: jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: super
password: huoran888
# url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
# username: root
# password: root
driver-class-name: com.mysql.jdbc.Driver
# redis:
# host: www.liuwanr.cn

@ -20,11 +20,15 @@
<select id="getByUserId" parameterType="com.msdw.tms.entity.ProjectEntity" resultType="com.msdw.tms.entity.ProjectEntity">
select projectId,projectName from tms_project where userId = #{userid} and projectState = #{projectstate} and is_del=#{isdel}
select projectId,projectName from tms_project where userId = #{userid} and projectState = #{projectstate} and isdel=#{isdel};
</select>
<!-- &#45;&#45; 2020.09.18-->
<!-- &#45;&#45; select projectId,projectName from tms_project where userId = #{userid} and projectState = #{projectstate} and is_del=#{isdel}-->
<select id="querySystem" parameterType="com.msdw.tms.entity.ProjectEntity" resultType="com.msdw.tms.entity.ProjectEntity">
select projectId,projectName from tms_project where ascription = #{ascription} and projectState = #{projectstate} and is_del=#{isdel}
select projectId,projectName from tms_project where ascription = #{ascription} and projectState = #{projectstate} and isdel=#{isdel}
</select>
<!-- select projectId,projectName from tms_project where ascription = #{ascription} and projectState = #{projectstate} and is_del=#{isdel}-->
<!-- 2020.09.18-->
</mapper>
Loading…
Cancel
Save