更新注释 #1

Closed
p5yt4qn87 wants to merge 0 commits from feature/wy into develop

@ -3,9 +3,6 @@ package lsgwr.exam;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Spring BootSpring Boot
*/
@SpringBootApplication @SpringBootApplication
public class ExamApplication { public class ExamApplication {

@ -1,6 +1,9 @@
/** /***********************************************************
* @Description : REST,HTTP,, * @Description :
*/ * @author : 广(Laing Shan Guang)
* @date : 2019-05-28 08:04
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.controller; package lsgwr.exam.controller;
import lsgwr.exam.entity.Exam; import lsgwr.exam.entity.Exam;
@ -19,16 +22,11 @@ import java.util.List;
@RestController @RestController
@Api(tags = "Exam APIs") @Api(tags = "Exam APIs")
//将此控制器中的所有端点映射到/api/exam URL路径
@RequestMapping("/api/exam") @RequestMapping("/api/exam")
public class ExamController { public class ExamController {
@Autowired //注入一个ExamService实例用于处理与考试和问题相关的业务逻辑 @Autowired
private ExamService examService; private ExamService examService;
/**
* @Description: 使examService.getQuestionAll(),ResultVO,
* @ApiOperationAPI,SwaggerUI
*/
@GetMapping("/question/all") @GetMapping("/question/all")
@ApiOperation("获取所有问题的列表") @ApiOperation("获取所有问题的列表")
ResultVO<List<QuestionVo>> getQuestionAll() { ResultVO<List<QuestionVo>> getQuestionAll() {
@ -43,10 +41,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: QuestionVo使examService.updateQuestion()
* @param questionVo QuestionVo
*/
@PostMapping("/question/update") @PostMapping("/question/update")
@ApiOperation("更新问题") @ApiOperation("更新问题")
ResultVO<QuestionVo> questionUpdate(@RequestBody QuestionVo questionVo) { ResultVO<QuestionVo> questionUpdate(@RequestBody QuestionVo questionVo) {
@ -61,13 +55,6 @@ public class ExamController {
} }
} }
/**
*
* @Description: QuestionCreateSimplifyVoQuestionCreateVoID使examService.questionCreate()
* @param questionCreateSimplifyVo QuestionCreateSimplifyVo
* @param request HttpServletRequestID
* @return ResultVO<String>
*/
@PostMapping("/question/create") @PostMapping("/question/create")
@ApiOperation("创建问题") @ApiOperation("创建问题")
ResultVO<String> questionCreate(@RequestBody QuestionCreateSimplifyVo questionCreateSimplifyVo, HttpServletRequest request) { ResultVO<String> questionCreate(@RequestBody QuestionCreateSimplifyVo questionCreateSimplifyVo, HttpServletRequest request) {
@ -87,10 +74,6 @@ public class ExamController {
} }
} }
/**
* @Description: ,使examService.getSelections()ResultVO
* @return ResultVO<QuestionAllVo>
*/
@GetMapping("/question/selection") @GetMapping("/question/selection")
@ApiOperation("获取问题分类的相关选项") @ApiOperation("获取问题分类的相关选项")
ResultVO<QuestionSelectionVo> getSelections() { ResultVO<QuestionSelectionVo> getSelections() {
@ -102,11 +85,6 @@ public class ExamController {
} }
} }
/**
* @Description: 使examService.getQuestionDetail(id),ResultVO,
* @param id id
* @return ResultVO<QuestionDetailVo>
*/
@GetMapping("/question/detail/{id}") @GetMapping("/question/detail/{id}")
@ApiOperation("根据问题的id获取问题的详细信息") @ApiOperation("根据问题的id获取问题的详细信息")
ResultVO<QuestionDetailVo> getQuestionDetail(@PathVariable String id) { ResultVO<QuestionDetailVo> getQuestionDetail(@PathVariable String id) {
@ -123,10 +101,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.getExamAll(),ResultVO,
* @return ResultVO<QuestionDetailVo>
*/
@GetMapping("/all") @GetMapping("/all")
@ApiOperation("获取全部考试的列表") @ApiOperation("获取全部考试的列表")
ResultVO<List<ExamVo>> getExamAll() { ResultVO<List<ExamVo>> getExamAll() {
@ -142,10 +116,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.getExamQuestionTypeList(),ResultVO,
* @return ResultVO<ExamQuestionTypeVo>
*/
@GetMapping("/question/type/list") @GetMapping("/question/type/list")
@ApiOperation("获取问题列表,按照单选、多选和判断题分类返回") @ApiOperation("获取问题列表,按照单选、多选和判断题分类返回")
ResultVO<ExamQuestionTypeVo> getExamQuestionTypeList() { ResultVO<ExamQuestionTypeVo> getExamQuestionTypeList() {
@ -161,12 +131,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.createExam(),ResultVO,
* @param examCreateVo
* @param request id
* @return ResultVO<Exam>
*/
@PostMapping("/create") @PostMapping("/create")
@ApiOperation("创建考试") @ApiOperation("创建考试")
ResultVO<Exam> createExam(@RequestBody ExamCreateVo examCreateVo, HttpServletRequest request) { ResultVO<Exam> createExam(@RequestBody ExamCreateVo examCreateVo, HttpServletRequest request) {
@ -183,12 +147,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.updateExam(),ResultVO,
* @param examVo
* @param request id
* @return
*/
@PostMapping("/update") @PostMapping("/update")
@ApiOperation("更新考试") @ApiOperation("更新考试")
ResultVO<Exam> updateExam(@RequestBody ExamVo examVo, HttpServletRequest request) { ResultVO<Exam> updateExam(@RequestBody ExamVo examVo, HttpServletRequest request) {
@ -205,10 +163,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description:
* @return ResultVO<List<ExamCardVo>>
*/
@GetMapping("/card/list") @GetMapping("/card/list")
@ApiOperation("获取考试列表,适配前端卡片列表") @ApiOperation("获取考试列表,适配前端卡片列表")
ResultVO<List<ExamCardVo>> getExamCardList() { ResultVO<List<ExamCardVo>> getExamCardList() {
@ -224,11 +178,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: id
* @param id id
* @return ResultVO<ExamDetailVo>
*/
@GetMapping("/detail/{id}") @GetMapping("/detail/{id}")
@ApiOperation("根据考试的id获取考试详情") @ApiOperation("根据考试的id获取考试详情")
ResultVO<ExamDetailVo> getExamDetail(@PathVariable String id) { ResultVO<ExamDetailVo> getExamDetail(@PathVariable String id) {
@ -243,13 +192,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.finishExam,ResultVO,
* @param examId id
* @param answersMap
* @param request id
* @return
*/
@PostMapping("/finish/{examId}") @PostMapping("/finish/{examId}")
@ApiOperation("根据用户提交的答案对指定id的考试判分") @ApiOperation("根据用户提交的答案对指定id的考试判分")
ResultVO<ExamRecord> finishExam(@PathVariable String examId, @RequestBody HashMap<String, List<String>> answersMap, HttpServletRequest request) { ResultVO<ExamRecord> finishExam(@PathVariable String examId, @RequestBody HashMap<String, List<String>> answersMap, HttpServletRequest request) {
@ -267,11 +209,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.getExamRecordList,ResultVO,
* @param request id
* @return ResultVO<List<ExamRecordVo>> ResultVOResultVO
*/
@GetMapping("/record/list") @GetMapping("/record/list")
@ApiOperation("获取当前用户的考试记录") @ApiOperation("获取当前用户的考试记录")
ResultVO<List<ExamRecordVo>> getExamRecordList(HttpServletRequest request) { ResultVO<List<ExamRecordVo>> getExamRecordList(HttpServletRequest request) {
@ -289,11 +226,6 @@ public class ExamController {
return resultVO; return resultVO;
} }
/**
* @Description: 使examService.getExamRecordDetail,ResultVO,id
* @param recordId id
* @return ResultVO<RecordDetailVo> ResultVOResultVO
*/
@GetMapping("/record/detail/{recordId}") @GetMapping("/record/detail/{recordId}")
@ApiOperation("根据考试记录id获取考试记录详情") @ApiOperation("根据考试记录id获取考试记录详情")
ResultVO<RecordDetailVo> getExamRecordDetail(@PathVariable String recordId) { ResultVO<RecordDetailVo> getExamRecordDetail(@PathVariable String recordId) {

@ -1,12 +1,5 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019/5/14 07:46
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.entity; package lsgwr.exam.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
@ -15,25 +8,70 @@ import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import java.util.Date; import java.util.Date;
/**
* Question
* 使Lombok@Datagettersetter
* Hibernate@EntityJPA
* &#064;DynamicUpdate
*/
@Data @Data
@Entity @Entity
@DynamicUpdate @DynamicUpdate
public class Question { public class Question {
/**
* ID
*/
@Id @Id
private String questionId; private String questionId;
/**
*
*/
private String questionName; private String questionName;
/**
*
*/
private Integer questionScore; private Integer questionScore;
/**
* ID
*/
private String questionCreatorId; private String questionCreatorId;
/**
* ID
*/
private Integer questionLevelId; private Integer questionLevelId;
/**
* ID
*/
private Integer questionTypeId; private Integer questionTypeId;
/**
* ID
*/
private Integer questionCategoryId; private Integer questionCategoryId;
/**
*
*/
private String questionDescription; private String questionDescription;
/**
* IDs
*/
private String questionOptionIds; private String questionOptionIds;
/**
* IDs
*/
private String questionAnswerOptionIds; private String questionAnswerOptionIds;
/** /**
* , Java * , Java
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; private Date createTime;

@ -6,7 +6,11 @@
***********************************************************/ ***********************************************************/
package lsgwr.exam.entity; package lsgwr.exam.entity;
/**
* QuestionCategory
* @EntityJPA
* Lombok@DatagettersettertoStringequalshashCode
*/
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
@ -17,15 +21,26 @@ import javax.persistence.Id;
@Data @Data
@Entity @Entity
public class QuestionCategory { public class QuestionCategory {
/**
* ID
* &#064;Id
* &#064;GeneratedValue
* &#064;JsonPropertyJSON
*/
@Id @Id
@GeneratedValue @GeneratedValue
@JsonProperty("id") @JsonProperty("id")
private Integer questionCategoryId; private Integer questionCategoryId;
/**
*
* &#064;JsonPropertyJSON
*/
@JsonProperty("name") @JsonProperty("name")
private String questionCategoryName; private String questionCategoryName;
/**
*
* &#064;JsonPropertyJSON
*/
@JsonProperty("description") @JsonProperty("description")
private String questionCategoryDescription; private String questionCategoryDescription;
} }

@ -20,11 +20,11 @@ public class QuestionLevel {
@Id @Id
@GeneratedValue @GeneratedValue
@JsonProperty("id") @JsonProperty("id")
private Integer questionLevelId; private Integer questionLevelId;//题目难度等级ID
@JsonProperty("name") @JsonProperty("name")
private String questionLevelName; private String questionLevelName;//题目难度等级名称
@JsonProperty("description") @JsonProperty("description")
private String questionLevelDescription; private String questionLevelDescription;//题目难度等级描述
} }

@ -11,12 +11,19 @@ import lombok.Data;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
/**
*
* 使 @Entity JPA ORM
* 使 Lombok @Data gettersetter equalshash toString
*/
@Data @Data
@Entity @Entity
public class QuestionOption { public class QuestionOption {
/**
* 使 @Id
*/
@Id @Id
private String questionOptionId; private String questionOptionId;
private String questionOptionContent; private String questionOptionContent;// 选项内容,描述选项的文本或信息
private String questionOptionDescription; private String questionOptionDescription;// 选项描述,对选项的详细解释或注释
} }

@ -13,18 +13,25 @@ import lombok.Data;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
/**
* QuestionType
* ID
*/
@Data @Data
@Entity @Entity
public class QuestionType { public class QuestionType {
/**
*
* @JsonProperty"id"
*/
@Id @Id
@GeneratedValue @GeneratedValue
@JsonProperty("id") @JsonProperty("id")
private Integer questionTypeId; private Integer questionTypeId;
/// 问题类型的名称。
@JsonProperty("name") @JsonProperty("name")
private String questionTypeName; private String questionTypeName;
//问题类型的描述。
@JsonProperty("description") @JsonProperty("description")
private String questionTypeDescription; private String questionTypeDescription;
} }

@ -18,12 +18,12 @@ public enum QuestionEnum {
CHECK(2, "多选题"), CHECK(2, "多选题"),
JUDGE(3, "判断题"); JUDGE(3, "判断题");
//构造函数,用于创建一个新的题目类型实例
QuestionEnum(Integer id, String role) { QuestionEnum(Integer id, String role) {
this.id = id; this.id = id;
this.role = role; this.role = role;
} }
private Integer id; private Integer id;// 角色id
private String role; private String role;// 角色名称
} }

@ -10,4 +10,6 @@ import lsgwr.exam.entity.QuestionCategory;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface QuestionCategoryRepository extends JpaRepository<QuestionCategory, Integer> { public interface QuestionCategoryRepository extends JpaRepository<QuestionCategory, Integer> {
// 该接口继承了JpaRepository用于处理QuestionCategory实体的数据库操作
// Integer类型作为实体的主键类型
} }

@ -1,13 +1,14 @@
/*********************************************************** /**
* @Description : * 访
* @author : 广(Laing Shan Guang) * JpaRepositoryQuestionLevel
* @date : 2019-05-14 08:26 * JpaRepositoryCRUD
* @email : liangshanguang2@gmail.com */
***********************************************************/
package lsgwr.exam.repository; package lsgwr.exam.repository;
import lsgwr.exam.entity.QuestionLevel; import lsgwr.exam.entity.QuestionLevel;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface QuestionLevelRepository extends JpaRepository<QuestionLevel, Integer> { public interface QuestionLevelRepository extends JpaRepository<QuestionLevel, Integer> {
// 该接口继承了JpaRepository用于处理QuestionLevel实体的数据库操作
// Integer类型参数表示实体的主键类型
} }

@ -1,13 +1,9 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-05-14 08:27
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.repository; package lsgwr.exam.repository;
import lsgwr.exam.entity.QuestionOption; import lsgwr.exam.entity.QuestionOption;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface QuestionOptionRepository extends JpaRepository<QuestionOption, String> { public interface QuestionOptionRepository extends JpaRepository<QuestionOption, String> {
} // 该接口继承了JpaRepository用于处理QuestionOption实体的数据库操作
// 没有定义额外的方法意味着它利用JpaRepository提供的标准CRUD操作
}

@ -1,19 +1,28 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-05-14 08:25
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.repository; package lsgwr.exam.repository;
import lsgwr.exam.entity.Question; import lsgwr.exam.entity.Question;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import java.util.List; import java.util.List;
/**
* QuestionQuestion
*/
public interface QuestionRepository extends JpaRepository<Question, String> { public interface QuestionRepository extends JpaRepository<Question, String> {
/**
* ID
*
* @param id ID
* @return ID
*/
List<Question> findByQuestionTypeId(Integer id); List<Question> findByQuestionTypeId(Integer id);
/**
*
*
* @return
*/
@Query("select q from Question q order by q.updateTime desc") @Query("select q from Question q order by q.updateTime desc")
List<Question> findAll(); List<Question> findAll();
} }

@ -1,13 +1,9 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-05-14 08:28
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.repository; package lsgwr.exam.repository;
import lsgwr.exam.entity.QuestionType; import lsgwr.exam.entity.QuestionType;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface QuestionTypeRepository extends JpaRepository<QuestionType, Integer> { public interface QuestionTypeRepository extends JpaRepository<QuestionType, Integer> {
} // 该接口继承了JpaRepository用于处理QuestionType实体的数据库操作
// Integer类型作为实体的主键类型
}

@ -1,38 +1,24 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-06-23 19:30
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/**
* @Description: ,便JSON
* API,JSON
* Lombok@Datagettersetter
* Jackson@JsonPropertyJSON使
*/
@Data @Data
public class ExamCardVo { public class ExamCardVo {
/**
* ID
*/
@JsonProperty("id") @JsonProperty("id")
private String examId; private String examId;
/**
*
*/
@JsonProperty("title") @JsonProperty("title")
private String examName; private String examName;
/**
*
*/
@JsonProperty("avatar") @JsonProperty("avatar")
private String examAvatar; private String examAvatar;
/**
*
*/
@JsonProperty("content") @JsonProperty("content")
private String examDescription; private String examDescription;
/**
*
*/
@JsonProperty("score") @JsonProperty("score")
private Integer examScore; private Integer examScore;
/** /**

@ -1,9 +1,3 @@
/***********************************************************
* @Description : ,
* @author : 广(Laing Shan Guang)
* @date : 2019-06-02 13:26
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -11,6 +5,9 @@ import lombok.Data;
import java.util.List; import java.util.List;
/**
* VO
*/
@Data @Data
public class QuestionCreateSimplifyVo { public class QuestionCreateSimplifyVo {
/** /**
@ -19,6 +16,9 @@ public class QuestionCreateSimplifyVo {
@JsonProperty("name") @JsonProperty("name")
private String questionName; private String questionName;
/**
*
*/
@JsonProperty("desc") @JsonProperty("desc")
private String questionDescription; private String questionDescription;

@ -1,9 +1,3 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-06-02 13:26
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -11,6 +5,9 @@ import lombok.Data;
import java.util.List; import java.util.List;
/**
*
*/
@Data @Data
public class QuestionCreateVo { public class QuestionCreateVo {
/** /**
@ -19,6 +16,9 @@ public class QuestionCreateVo {
@JsonProperty("name") @JsonProperty("name")
private String questionName; private String questionName;
/**
*
*/
@JsonProperty("desc") @JsonProperty("desc")
private String questionDescription; private String questionDescription;

@ -1,9 +1,3 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-10-20 09:51
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import lsgwr.exam.entity.QuestionOption; import lsgwr.exam.entity.QuestionOption;
@ -12,6 +6,9 @@ import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
*
*/
@Data @Data
public class QuestionDetailVo { public class QuestionDetailVo {
/** /**
@ -28,14 +25,17 @@ public class QuestionDetailVo {
* *
*/ */
private String description; private String description;
/** /**
* *
*/ */
private String type; private String type;
/** /**
* *
*/ */
private List<QuestionOption> options; private List<QuestionOption> options;
/** /**
* ,id * ,id
*/ */

@ -1,25 +1,29 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-06-02 20:23
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/**
*
*
*/
@Data @Data
public class QuestionOptionCreateVo { public class QuestionOptionCreateVo {
/** /**
* *
* 使@JsonPropertyJSON
* JSONJava
* JSON"content"Java"questionOptionContent"
*/ */
@JsonProperty("content") @JsonProperty("content")
private String questionOptionContent; private String questionOptionContent;
/** /**
* *
* false
* 使@JsonPropertyJSON
* JSON"answer"Java"answer"
*/ */
@JsonProperty("answer") @JsonProperty("answer")
private Boolean answer = false; private Boolean answer = false;

@ -1,25 +1,45 @@
/*********************************************************** /**
* @Description : * QuestionOptionVo
* @author : 广(Laing Shan Guang) *
* @date : 2019-06-01 09:45 * 使Lombok@Datagettersetter
* @email : liangshanguang2@gmail.com * 使Jackson@JsonProperty便JSON
***********************************************************/ */
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/**
*
*/
@Data @Data
public class QuestionOptionVo { public class QuestionOptionVo {
/**
*
* 使@JsonPropertyJSON
*/
@JsonProperty("id") @JsonProperty("id")
private String questionOptionId; private String questionOptionId;
/**
*
* 使@JsonPropertyJSON
*/
@JsonProperty("content") @JsonProperty("content")
private String questionOptionContent; private String questionOptionContent;
/**
*
* false
* 使@JsonPropertyJSON
*/
@JsonProperty("answer") @JsonProperty("answer")
private Boolean answer = false; private Boolean answer = false;
/**
*
* 使@JsonPropertyJSON
*/
@JsonProperty("description") @JsonProperty("description")
private String questionOptionDescription; private String questionOptionDescription;
} }

@ -1,9 +1,3 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-05-28 22:09
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -11,6 +5,9 @@ import lombok.Data;
import java.util.List; import java.util.List;
/**
*
*/
@Data @Data
public class QuestionPageVo { public class QuestionPageVo {

@ -1,9 +1,7 @@
/*********************************************************** /**
* @Description : *
* @author : 广(Laing Shan Guang) *
* @date : 2019-06-03 07:35 */
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -14,14 +12,30 @@ import lombok.Data;
import java.util.List; import java.util.List;
/**
*
*
*/
@Data @Data
public class QuestionSelectionVo { public class QuestionSelectionVo {
/**
*
*
*/
@JsonProperty("types") @JsonProperty("types")
private List<QuestionType> questionTypeList; private List<QuestionType> questionTypeList;
/**
*
*
*/
@JsonProperty("categories") @JsonProperty("categories")
private List<QuestionCategory> questionCategoryList; private List<QuestionCategory> questionCategoryList;
/**
*
*
*/
@JsonProperty("levels") @JsonProperty("levels")
private List<QuestionLevel> questionLevelList; private List<QuestionLevel> questionLevelList;
} }

@ -1,9 +1,3 @@
/***********************************************************
* @Description :
* @author : 广(Laing Shan Guang)
* @date : 2019-05-28 08:17
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.vo; package lsgwr.exam.vo;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -13,14 +7,27 @@ import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
/**
* QuestionVo
* 使Lombok@Datagettersetter
*/
@Data @Data
public class QuestionVo { public class QuestionVo {
/**
*
*/
@JsonProperty("id") @JsonProperty("id")
private String questionId; private String questionId;
/**
*
*/
@JsonProperty("name") @JsonProperty("name")
private String questionName; private String questionName;
/**
*
*/
@JsonProperty("score") @JsonProperty("score")
private Integer questionScore; private Integer questionScore;
@ -66,7 +73,9 @@ public class QuestionVo {
@JsonProperty("categoryId") @JsonProperty("categoryId")
private int questionCategoryId; private int questionCategoryId;
/**
*
*/
@JsonProperty("description") @JsonProperty("description")
private String questionDescription; private String questionDescription;
@ -76,7 +85,6 @@ public class QuestionVo {
@JsonProperty("options") @JsonProperty("options")
private List<QuestionOptionVo> questionOptionVoList; private List<QuestionOptionVo> questionOptionVoList;
/** /**
* Java * Java
* @DynamicUpdate * @DynamicUpdate

Loading…
Cancel
Save