Kaynağa Gözat

错题修改 timestamp

zhangbin 2 yıl önce
ebeveyn
işleme
527a62c281

+ 1 - 9
nbjk-admin/src/main/java/com/miaxis/app/controller/question/QuestionWrongController.java

@@ -145,15 +145,7 @@ public class QuestionWrongController extends BaseController {
 
 
     @GetMapping("/wrongByUser")
-    @ApiOperation("小程序恢复云端错题到本机(根据用户获取错题)")
-    public Response<List<QuestionInfo>> wrongByUser(@ModelAttribute QuestionWrongListDTO dto) {
-        dto.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
-        List<QuestionInfo> list = questionWrongService.selectWrongByUserId(dto);
-        return Response.success(list);
-    }
-
-    @GetMapping("/appWrongByUser")
-    @ApiOperation("app恢复云端错题到本机(根据用户获取错题)")
+    @ApiOperation("恢复云端错题到本机(根据用户获取错题)")
     public Response<List<QuestionWrongIdDateVo>> appWrongByUser(@ModelAttribute QuestionWrongListDTO dto) {
         dto.setUserId(SecurityUtils.getLoginUser().getStudent().getId());
         List<QuestionWrongIdDateVo> list = questionWrongService.selectWrongIdByUserId(dto);

+ 0 - 3
nbjk-service/src/main/java/com/miaxis/question/dto/QuestionWrongListDTO.java

@@ -17,9 +17,6 @@ public class QuestionWrongListDTO  {
     @ApiModelProperty(value = "用户ID",hidden = true)
     private Long userId;
 
-    @ApiModelProperty(value = "题目ID",hidden = true)
-    private Long questionId;
-
     /** 科目 */
     @ApiModelProperty(value = "考试科目(1、2、3、4)")
     private Integer km;

+ 3 - 3
nbjk-service/src/main/java/com/miaxis/question/vo/QuestionWrongIdDateVo.java

@@ -3,7 +3,7 @@ package com.miaxis.question.vo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
-import java.util.Date;
+import java.sql.Timestamp;
 
 @ApiModel(value = "QuestionWrongIdDateVo", description = "错题返回ID与时间")
 public class QuestionWrongIdDateVo {
@@ -13,7 +13,7 @@ public class QuestionWrongIdDateVo {
     @ApiModelProperty(value = "分类题(包含科一到科四)")
     private Long id;
 
-    private transient Date createTime;
+    private transient Timestamp createTime;
 
     @ApiModelProperty(value = "时间戳(做错时间)",name = "timestamp")
     public long getTimestamp() {
@@ -24,7 +24,7 @@ public class QuestionWrongIdDateVo {
     }
 
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(Timestamp createTime) {
         this.createTime = createTime;
     }
 

+ 0 - 4
nbjk-service/src/main/resources/mapper/question/QuestionWrongMapper.xml

@@ -20,7 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectQuestionWrongVo"/>
         <where>
             <if test="userId != null and userId !='' "> and user_id = #{userId}</if>
-            <if test="questionId != null and questionId != '' "> and question_id = #{questionId}</if>
             <if test="km != null and km!='' "> and km = #{km}</if>
         </where>
     </select>
@@ -32,7 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select q1.* from question_info q1 join question_wrong q2 on q1.id = q2.question_id
         <where>
             <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
-            <if test="questionId != null and questionId != '' "> and q2.question_id = #{questionId}</if>
             <if test="km != null and km!='' "> and q2.km = #{km}</if>
         </where>
         order by q2.create_time
@@ -43,7 +41,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select q1.id,q2.create_time from question_info q1 join question_wrong q2 on q1.id = q2.question_id
         <where>
             <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
-            <if test="questionId != null and questionId != '' "> and q2.question_id = #{questionId}</if>
             <if test="km != null and km!='' "> and q2.km = #{km}</if>
         </where>
         order by q2.create_time
@@ -54,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select count(1) from question_info q1 join question_wrong q2 on q1.id = q2.question_id
         <where>
             <if test="userId != null and userId !='' "> and q2.user_id = #{userId}</if>
-            <if test="questionId != null and questionId != '' "> and q2.question_id = #{questionId}</if>
             <if test="km != null and km!='' "> and q2.km = #{km}</if>
         </where>