Jelajahi Sumber

添加非会员接口

小么熊🐻 3 tahun lalu
induk
melakukan
cab524de33

+ 2 - 0
twzd-admin/src/main/java/com/miaxis/system/controller/h5/QuestionCollectionController.java

@@ -172,4 +172,6 @@ public class QuestionCollectionController extends BaseController {
     }
 
 
+
+
 }

+ 12 - 0
twzd-admin/src/main/java/com/miaxis/system/controller/h5/QuestionInfoController.java

@@ -149,5 +149,17 @@ public class QuestionInfoController extends BaseController{
     public List<QuestionInfoFlVO> selectFlQuestionInfo(@ModelAttribute QuestionInfoFlDTO questionInfoFlDTO) {
         return questionInfoService.selectFlQuestionInfo(questionInfoFlDTO);
     }
+
+
+
+    /**
+     * 查询题库列表(非会员)
+     */
+    @GetMapping("/normalList")
+    @ApiOperation("查询题库列表(非会员)")
+    public ResponsePageInfo<QuestionInfo> normalList(@ModelAttribute QuestionInfoDTO questionInfoDTO){
+        List<QuestionInfo> list = questionInfoService.selectNormalQuestionInfoList(questionInfoDTO);
+        return toResponsePageInfo(list);
+    }
 }
 

+ 8 - 293
twzd-service/src/main/java/com/miaxis/qustion/domain/QuestionInfo.java

@@ -8,8 +8,6 @@ import com.miaxis.common.core.domain.BaseBusinessEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 /**
  * 题库对象 question_info
  *
@@ -231,295 +229,12 @@ public class QuestionInfo extends BaseBusinessEntity{
     @ApiModelProperty(value = "题目在分类中所属的模块名称")
     private String classIssueName;
 
-    public void setId(Long id){
-        this.id = id;
-    }
-
-    public Long getId(){
-        return id;
-    }
-    public void setNumber(Long number){
-        this.number = number;
-    }
-
-    public Long getNumber(){
-        return number;
-    }
-    public void setAnswer(String answer){
-        this.answer = answer;
-    }
-
-    public String getAnswer(){
-        return answer;
-    }
-    public void setAnswerkeyword(String answerkeyword){
-        this.answerkeyword = answerkeyword;
-    }
-
-    public String getAnswerkeyword(){
-        return answerkeyword;
-    }
-    public void setExplainGif(String explainGif){
-        this.explainGif = explainGif;
-    }
-
-    public String getExplainGif(){
-        return explainGif;
-    }
-    public void setExplainJq(String explainJq){
-        this.explainJq = explainJq;
-    }
-
-    public String getExplainJq(){
-        return explainJq;
-    }
-    public void setExplainJs(String explainJs){
-        this.explainJs = explainJs;
-    }
-
-    public String getExplainJs(){
-        return explainJs;
-    }
-    public void setExplainMp3(String explainMp3){
-        this.explainMp3 = explainMp3;
-    }
-
-    public String getExplainMp3(){
-        return explainMp3;
-    }
-    public void setImage(String image){
-        this.image = image;
-    }
-
-    public String getImage(){
-        return image;
-    }
-    public void setImageYdt(String imageYdt){
-        this.imageYdt = imageYdt;
-    }
-
-    public String getImageYdt(){
-        return imageYdt;
-    }
-    public void setIssue(String issue){
-        this.issue = issue;
-    }
-
-    public String getIssue(){
-        return issue;
-    }
-    public void setOpts(String opts){
-        this.opts = opts;
-    }
-
-    public String getOpts(){
-        return opts;
-    }
-    public void setSkillkeyword(String skillkeyword){
-        this.skillkeyword = skillkeyword;
-    }
-
-    public String getSkillkeyword(){
-        return skillkeyword;
-    }
-    public void setTitlekeyword(String titlekeyword){
-        this.titlekeyword = titlekeyword;
-    }
-
-    public String getTitlekeyword(){
-        return titlekeyword;
-    }
-    public void setIssuemp3(String issuemp3){
-        this.issuemp3 = issuemp3;
-    }
-
-    public String getIssuemp3(){
-        return issuemp3;
-    }
-    public void setAnswermp3(String answermp3){
-        this.answermp3 = answermp3;
-    }
-
-    public String getAnswermp3(){
-        return answermp3;
-    }
-    public void setExplainjsmp3(String explainjsmp3){
-        this.explainjsmp3 = explainjsmp3;
-    }
-
-    public String getExplainjsmp3(){
-        return explainjsmp3;
-    }
-    public void setSubject1(String subject1){
-        this.subject1 = subject1;
-    }
-
-    public String getSubject1(){
-        return subject1;
-    }
-    public void setSubject2(String subject2){
-        this.subject2 = subject2;
-    }
-
-    public String getSubject2(){
-        return subject2;
-    }
-    public void setSubject3(String subject3){
-        this.subject3 = subject3;
-    }
-
-    public String getSubject3(){
-        return subject3;
-    }
-    public void setSubject4(String subject4){
-        this.subject4 = subject4;
-    }
-
-    public String getSubject4(){
-        return subject4;
-    }
-    public void setLiceCar(String liceCar){
-        this.liceCar = liceCar;
-    }
-
-    public String getLiceCar(){
-        return liceCar;
-    }
-    public void setLiceBus(String liceBus){
-        this.liceBus = liceBus;
-    }
-
-    public String getLiceBus(){
-        return liceBus;
-    }
-    public void setLiceTruck(String liceTruck){
-        this.liceTruck = liceTruck;
-    }
-
-    public String getLiceTruck(){
-        return liceTruck;
-    }
-    public void setLiceMoto(String liceMoto){
-        this.liceMoto = liceMoto;
-    }
-
-    public String getLiceMoto(){
-        return liceMoto;
-    }
-    public void setSequeIssue(String sequeIssue){
-        this.sequeIssue = sequeIssue;
-    }
-
-    public String getSequeIssue(){
-        return sequeIssue;
-    }
-    public void setClassIssue(String classIssue){
-        this.classIssue = classIssue;
-    }
-
-    public String getClassIssue(){
-        return classIssue;
-    }
-    public void setPlaceIssue(String placeIssue){
-        this.placeIssue = placeIssue;
-    }
-
-    public String getPlaceIssue(){
-        return placeIssue;
-    }
-    public void setExcellIssue(String excellIssue){
-        this.excellIssue = excellIssue;
-    }
-
-    public String getExcellIssue(){
-        return excellIssue;
-    }
-    public void setCopyIssue(String copyIssue){
-        this.copyIssue = copyIssue;
-    }
-
-    public String getCopyIssue(){
-        return copyIssue;
-    }
-    public void setMockIssue(String mockIssue){
-        this.mockIssue = mockIssue;
-    }
-
-    public String getMockIssue(){
-        return mockIssue;
-    }
-    public void setSequeIssueName(String sequeIssueName){
-        this.sequeIssueName = sequeIssueName;
-    }
-
-    public String getSequeIssueName(){
-        return sequeIssueName;
-    }
-    public void setPlaceIssueName(String placeIssueName){
-        this.placeIssueName = placeIssueName;
-    }
-
-    public String getPlaceIssueName(){
-        return placeIssueName;
-    }
-    public void setExcellIssueName(String excellIssueName){
-        this.excellIssueName = excellIssueName;
-    }
-
-    public String getExcellIssueName(){
-        return excellIssueName;
-    }
-    public void setClassIssueName(String classIssueName){
-        this.classIssueName = classIssueName;
-    }
-
-    public String getClassIssueName(){
-        return classIssueName;
-    }
-
-
-
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("number", getNumber())
-            .append("answer", getAnswer())
-            .append("answerkeyword", getAnswerkeyword())
-            .append("explainGif", getExplainGif())
-            .append("explainJq", getExplainJq())
-            .append("explainJs", getExplainJs())
-            .append("explainMp3", getExplainMp3())
-            .append("image", getImage())
-            .append("imageYdt", getImageYdt())
-            .append("issue", getIssue())
-            .append("opts", getOpts())
-            .append("skillkeyword", getSkillkeyword())
-            .append("titlekeyword", getTitlekeyword())
-            .append("issuemp3", getIssuemp3())
-            .append("answermp3", getAnswermp3())
-            .append("explainjsmp3", getExplainjsmp3())
-            .append("subject1", getSubject1())
-            .append("subject2", getSubject2())
-            .append("subject3", getSubject3())
-            .append("subject4", getSubject4())
-            .append("liceCar", getLiceCar())
-            .append("liceBus", getLiceBus())
-            .append("liceTruck", getLiceTruck())
-            .append("liceMoto", getLiceMoto())
-            .append("sequeIssue", getSequeIssue())
-            .append("classIssue", getClassIssue())
-            .append("placeIssue", getPlaceIssue())
-            .append("excellIssue", getExcellIssue())
-            .append("copyIssue", getCopyIssue())
-            .append("mockIssue", getMockIssue())
-            .append("sequeIssueName", getSequeIssueName())
-            .append("placeIssueName", getPlaceIssueName())
-            .append("excellIssueName", getExcellIssueName())
-            .append("classIssueName", getClassIssueName())
-            .append("createTime", getCreateTime())
-            .append("updateTime", getUpdateTime())
-            .toString();
-    }
+
+    /** 题目类型 */
+    @Excel(name = "题目类型")
+    @TableField("question_type")
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
+
 }

+ 5 - 0
twzd-service/src/main/java/com/miaxis/qustion/dto/QuestionCollectionDTO.java

@@ -29,4 +29,9 @@ public class QuestionCollectionDTO {
     @ApiModelProperty(value = "车型(小车 、客车、货车、摩托车)",required=true)
     private String carType;
 
+
+    /** 题目类型 */
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
 }

+ 5 - 0
twzd-service/src/main/java/com/miaxis/qustion/dto/QuestionInfoDTO.java

@@ -163,4 +163,9 @@ public class QuestionInfoDTO extends BaseBusinessEntity{
     private String isRand;
 
 
+    /** 题目类型 */
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
+
 }

+ 2 - 0
twzd-service/src/main/java/com/miaxis/qustion/mapper/QuestionInfoMapper.java

@@ -31,4 +31,6 @@ public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {
     List<QuestionInfoDfVO> selectDfQuestionInfo(QuestionInfoFlDTO questionInfoFlDTO);
 
     List<QuestionInfoFlVO> selectFlQuestionInfo(QuestionInfoFlDTO questionInfoFlDTO);
+
+    List<QuestionInfo> selectNormalQuestionInfoList(QuestionInfoDTO questionInfoDTO);
 }

+ 2 - 0
twzd-service/src/main/java/com/miaxis/qustion/service/IQuestionInfoService.java

@@ -31,4 +31,6 @@ public interface IQuestionInfoService extends IService<QuestionInfo>{
     List<QuestionInfoDfVO> selectDfQuestionInfo(QuestionInfoFlDTO questionInfoFlDTO);
 
     List<QuestionInfoFlVO> selectFlQuestionInfo(QuestionInfoFlDTO questionInfoFlDTO);
+
+    List<QuestionInfo> selectNormalQuestionInfoList(QuestionInfoDTO questionInfoDTO);
 }

+ 5 - 0
twzd-service/src/main/java/com/miaxis/qustion/service/impl/QuestionInfoServiceImpl.java

@@ -55,4 +55,9 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
         return questionInfoMapper.selectFlQuestionInfo(questionInfoFlDTO);
     }
 
+    @Override
+    public List<QuestionInfo> selectNormalQuestionInfoList(QuestionInfoDTO questionInfoDTO) {
+        return questionInfoMapper.selectNormalQuestionInfoList(questionInfoDTO);
+    }
+
 }

+ 43 - 0
twzd-service/src/main/resources/mapper/qustion/QuestionInfoMapper.xml

@@ -92,6 +92,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
 
+    <select id="selectNormalQuestionInfoList" parameterType="QuestionInfoDTO" resultMap="QuestionInfoResult">
+        <include refid="selectQuestionInfoVo"/>
+        <where>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="subject1 != null  and subject1 != ''"> and subject_1 = #{subject1}</if>
+            <if test="subject2 != null  and subject2 != ''"> and subject_2 = #{subject2}</if>
+            <if test="subject3 != null  and subject3 != ''"> and subject_3 = #{subject3}</if>
+            <if test="subject4 != null  and subject4 != ''"> and subject_4 = #{subject4}</if>
+            <if test="liceCar != null  and liceCar != ''"> and lice_car = #{liceCar}</if>
+            <if test="liceBus != null  and liceBus != ''"> and lice_bus = #{liceBus}</if>
+            <if test="liceTruck != null  and liceTruck != ''"> and lice_truck = #{liceTruck}</if>
+            <if test="liceMoto != null  and liceMoto != ''"> and lice_moto = #{liceMoto}</if>
+            <if test="sequeIssue != null  and sequeIssue != ''"> and seque_issue = #{sequeIssue}</if>
+            <if test="classIssue != null  and classIssue != ''"> and class_issue = #{classIssue}</if>
+            <if test="placeIssue != null  and placeIssue != ''"> and place_issue = #{placeIssue}</if>
+            <if test="excellIssue != null  and excellIssue != ''"> and excell_issue = #{excellIssue}</if>
+            <if test="copyIssue != null  and copyIssue != ''"> and copy_issue = #{copyIssue}</if>
+            <if test="mockIssue != null  and mockIssue != ''"> and mock_issue = #{mockIssue}</if>
+            <if test="sequeIssueName != null  and sequeIssueName != ''"> and seque_issue_name like concat('%', #{sequeIssueName}, '%')</if>
+            <if test="placeIssueName != null  and placeIssueName != ''"> and place_issue_name like concat('%', #{placeIssueName}, '%')</if>
+            <if test="excellIssueName != null  and excellIssueName != ''"> and excell_issue_name like concat('%', #{excellIssueName}, '%')</if>
+            <if test="classIssueName != null  and classIssueName != ''"> and class_issue_name like concat('%', #{classIssueName}, '%')</if>
+        </where>
+        limit 0,5
+    </select>
+
+
+
 
     <select id="selectQuestionInfoListIds" parameterType="Long" resultMap="QuestionInfoResult">
         <include refid="selectQuestionInfoVo"/>