条件查询新增查询条件,项目打war包

hehai
shijie 4 years ago
parent e929a380c0
commit 38c044b1ee
  1. 8
      pom.xml
  2. 8
      src/main/java/com/msdw/tms/TmsApplication.java
  3. 2
      src/main/java/com/msdw/tms/entity/QuestionsEntity.java
  4. 9
      src/main/java/com/msdw/tms/entity/request/QuestionsQueryRequest.java
  5. 12
      src/main/java/com/msdw/tms/service/impl/QuestionsServiceImpl.java

@ -14,6 +14,7 @@
<name>tms</name>
<description>测评管理系统</description>
<packaging>war</packaging>
<properties>
<java.version>1.8</java.version>
</properties>
@ -39,6 +40,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--打包的时候可以不用包进去,别的设施会提供。事实上该依赖理论上可以参与编译,测试,运行等周期。
相当于compile,但是打包阶段做了exclude操作-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>

@ -2,12 +2,18 @@ package com.msdw.tms;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
public class TmsApplication {
public class TmsApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(TmsApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(TmsApplication.class);
}
}

@ -23,7 +23,7 @@ public class QuestionsEntity implements Serializable {
@TableId
private Integer id;
/**
* 题型号用于区分是什么题型
* 题型号1单选题2多选题3判断题
*/
private Integer questionTypeNo;
/**

@ -19,10 +19,11 @@ public class QuestionsQueryRequest {
@ApiModelProperty(value = "题干,问题描述", name = "questionStem", example = "世界上最大的哺乳动物是什么?")
private String questionStem;
// /**
// * 题型id
// */
// private Integer questionType;
/**
* 题型id
*/
@ApiModelProperty(value = "题型号:1、单选题,2、多选题,3、判断题", name = "questionTypeNo", example = "1")
private Integer questionTypeNo;
// /**
// * 参考答案
// */

@ -70,14 +70,14 @@ public class QuestionsServiceImpl extends ServiceImpl<QuestionsDao, QuestionsEnt
if (request.getQuestionStem() != null) {
queryWrapper.like("question_stem", request.getQuestionStem());
}
//TODO 扩展搜索条件
// 题型:判断题型是否为空,不为空则加入搜索条件
// if (questionsRequest.getQuestionType() != null) {
// queryWrapper.eq("question_type", questionsRequest.getQuestionType());
// }
if (request.getQuestionTypeNo() != null) {
queryWrapper.eq("question_type_no", request.getQuestionTypeNo());
}
//TODO 扩展搜索条件
// 修改时间:判断修改时间是否为空,不为空则加入搜索条件
// if (questionsRequest.getModifyTime() != null) {
// queryWrapper.eq("modify_time", questionsRequest.getModifyTime());
// if (request.getModifyTime() != null) {
// queryWrapper.eq("modify_time", request.getModifyTime());
// }
}

Loading…
Cancel
Save