小么熊🐻 3 лет назад
Родитель
Сommit
2ba5f7c7a6

+ 1 - 48
zzjs-admin/src/main/java/com/miaxis/app/controller/question/QuestionInfoTwoController.java

@@ -33,7 +33,6 @@ public class QuestionInfoTwoController extends BaseController{
     /**
      * 查询202204题库列表
      */
-    @PreAuthorize("@ss.hasPermi('question:two:list')")
     @GetMapping("/list")
     @ApiOperation("查询202204题库列表")
         @ApiImplicitParams({
@@ -46,23 +45,11 @@ public class QuestionInfoTwoController extends BaseController{
         return toResponsePageInfo(list);
     }
     
-    /**
-     * 导出202204题库列表
-     */
-    @PreAuthorize("@ss.hasPermi('question:two:export')")
-    @Log(title = "202204题库", businessType = BusinessTypeEnum.EXPORT)
-    @GetMapping("/export")
-    @ApiOperation("导出202204题库列表Excel")
-    public Response<String> export(@ModelAttribute QuestionInfoTwo questionInfoTwo){
-        List<QuestionInfoTwo> list = questionInfoTwoService.selectQuestionInfoTwoList(questionInfoTwo);
-        ExcelUtil<QuestionInfoTwo> util = new ExcelUtil<QuestionInfoTwo>(QuestionInfoTwo.class);
-        return util.exportExcel(list, "two");
-    }
+
 
     /**
      * 获取202204题库详细信息
      */
-    @PreAuthorize("@ss.hasPermi('question:two:query')")
     @GetMapping(value = "/{id}")
     @ApiOperation("获取202204题库详细信息")
     public Response<QuestionInfoTwo> getInfo(
@@ -72,39 +59,5 @@ public class QuestionInfoTwoController extends BaseController{
         return Response.success(questionInfoTwoService.getById(id));
     }
 
-    /**
-     * 新增202204题库
-     */
-    @PreAuthorize("@ss.hasPermi('question:two:add')")
-    @Log(title = "202204题库", businessType = BusinessTypeEnum.INSERT)
-    @PostMapping
-    @ApiOperation("新增202204题库")
-    public Response<Integer> add(@RequestBody QuestionInfoTwo questionInfoTwo){
-        return toResponse(questionInfoTwoService.save(questionInfoTwo) ? 1 : 0);
-    }
-
-    /**
-     * 修改202204题库
-     */
-    @PreAuthorize("@ss.hasPermi('question:two:edit')")
-    @Log(title = "202204题库", businessType = BusinessTypeEnum.UPDATE)
-    @PutMapping
-    @ApiOperation("修改202204题库")
-    public Response<Integer> edit(@RequestBody QuestionInfoTwo questionInfoTwo){
-        return toResponse(questionInfoTwoService.updateById(questionInfoTwo) ? 1 : 0);
-    }
 
-    /**
-     * 删除202204题库
-     */
-    @PreAuthorize("@ss.hasPermi('question:two:remove')")
-    @Log(title = "202204题库", businessType = BusinessTypeEnum.DELETE)
-	@DeleteMapping("/{ids}")
-    @ApiOperation("删除202204题库")
-    public  Response<Integer> remove(
-            @ApiParam(name = "ids", value = "202204题库ids参数", required = true)
-            @PathVariable Long[] ids
-    ){
-        return toResponse(questionInfoTwoService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
-    }
 }

+ 0 - 15
zzjs-service/src/main/java/com/miaxis/question/domain/QuestionInfoTwo.java

@@ -30,91 +30,76 @@ public class QuestionInfoTwo extends BaseBusinessEntity{
     private Long id;
 
     /** 一点通id字段 */
-    @Excel(name = "一点通id字段")
     @TableField("num")
     @ApiModelProperty(value = "一点通id字段")
     private Long num;
 
     /** 题目名 */
-    @Excel(name = "题目名")
     @TableField("name")
     @ApiModelProperty(value = "题目名")
     private String name;
 
     /** 图片 */
-    @Excel(name = "图片")
     @TableField("image")
     @ApiModelProperty(value = "图片")
     private String image;
 
     /** 正确答案 */
-    @Excel(name = "正确答案")
     @TableField("right_answer")
     @ApiModelProperty(value = "正确答案")
     private Long rightAnswer;
 
     /** 解释 */
-    @Excel(name = "解释")
     @TableField("explain_js")
     @ApiModelProperty(value = "解释")
     private String explainJs;
 
     /** 类型 */
-    @Excel(name = "类型")
     @TableField("type")
     @ApiModelProperty(value = "类型")
     private Long type;
 
     /** 答案1 */
-    @Excel(name = "答案1")
     @TableField("an1")
     @ApiModelProperty(value = "答案1")
     private String an1;
 
     /** 答案2 */
-    @Excel(name = "答案2")
     @TableField("an2")
     @ApiModelProperty(value = "答案2")
     private String an2;
 
     /** 答案3 */
-    @Excel(name = "答案3")
     @TableField("an3")
     @ApiModelProperty(value = "答案3")
     private String an3;
 
     /** 答案4 */
-    @Excel(name = "答案4")
     @TableField("an4")
     @ApiModelProperty(value = "答案4")
     private String an4;
 
     /** 答案5 */
-    @Excel(name = "答案5")
     @TableField("an5")
     @ApiModelProperty(value = "答案5")
     private String an5;
 
     /** 答案6 */
-    @Excel(name = "答案6")
     @TableField("an6")
     @ApiModelProperty(value = "答案6")
     private String an6;
 
     /** 答案7 */
-    @Excel(name = "答案7")
     @TableField("an7")
     @ApiModelProperty(value = "答案7")
     private String an7;
 
     /** 科目 */
-    @Excel(name = "科目")
     @TableField("kemu")
     @ApiModelProperty(value = "科目")
     private Long kemu;
 
     /** 0:小车(313) 1:货车(325) 2:客车(328) 3:摩托车(40) */
-    @Excel(name = "0:小车(313) 1:货车(325) 2:客车(328) 3:摩托车(40)")
     @TableField("cartype")
     @ApiModelProperty(value = "0:小车(313) 1:货车(325) 2:客车(328) 3:摩托车(40)")
     private String cartype;

+ 53 - 0
zzjs-service/src/main/resources/mapper/question/QuestionInfoTwoMapper.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miaxis.question.mapper.QuestionInfoTwoMapper">
+
+    <resultMap type="QuestionInfoTwo" id="QuestionInfoTwoResult">
+        <result property="id"    column="id"    />
+        <result property="num"    column="num"    />
+        <result property="name"    column="name"    />
+        <result property="image"    column="image"    />
+        <result property="rightAnswer"    column="right_answer"    />
+        <result property="explainJs"    column="explain_js"    />
+        <result property="type"    column="type"    />
+        <result property="an1"    column="an1"    />
+        <result property="an2"    column="an2"    />
+        <result property="an3"    column="an3"    />
+        <result property="an4"    column="an4"    />
+        <result property="an5"    column="an5"    />
+        <result property="an6"    column="an6"    />
+        <result property="an7"    column="an7"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="kemu"    column="kemu"    />
+        <result property="cartype"    column="cartype"    />
+    </resultMap>
+
+    <sql id="selectQuestionInfoTwoVo">
+        select * from question_info_two
+    </sql>
+
+    <select id="selectQuestionInfoTwoList" parameterType="QuestionInfoTwo" resultMap="QuestionInfoTwoResult">
+        <include refid="selectQuestionInfoTwoVo"/>
+        <where>
+            <if test="num != null "> and num = #{num}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="rightAnswer != null "> and right_answer = #{rightAnswer}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="an1 != null  and an1 != ''"> and an1 = #{an1}</if>
+            <if test="an2 != null  and an2 != ''"> and an2 = #{an2}</if>
+            <if test="an3 != null  and an3 != ''"> and an3 = #{an3}</if>
+            <if test="an4 != null  and an4 != ''"> and an4 = #{an4}</if>
+            <if test="an5 != null  and an5 != ''"> and an5 = #{an5}</if>
+            <if test="an6 != null  and an6 != ''"> and an6 = #{an6}</if>
+            <if test="an7 != null  and an7 != ''"> and an7 = #{an7}</if>
+            <if test="kemu != null "> and kemu = #{kemu}</if>
+            <if test="cartype != null  and cartype != ''"> and cartype like concat('%', #{cartype}, '%') </if>
+        </where>
+    </select>
+
+</mapper>