AuditingV1Request.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package com.aijia.kmt.vo;
  2. import com.aijia.core.web.BaseRequest;
  3. import io.swagger.annotations.ApiModelProperty;
  4. import java.util.ArrayList;
  5. import java.util.Comparator;
  6. import java.util.List;
  7. import java.util.TreeSet;
  8. import static java.util.stream.Collectors.collectingAndThen;
  9. import static java.util.stream.Collectors.toCollection;
  10. public class AuditingV1Request extends BaseRequest{
  11. private static final long serialVersionUID = 1L;
  12. @ApiModelProperty(name = "type", value = "类型, 0提交审核,1发布,4解析提交,5解析发布,6答案校对修改, 默认0", required = true)
  13. private int type;
  14. @ApiModelProperty(name = "questions", value = "题目ids", required = true)
  15. private List<QuestionUpdateRequest> questions;
  16. @ApiModelProperty(name = "detailIds", value = "关联的知识点", required = false)
  17. private List<HowDetailPointsRequest> detailIds;
  18. @ApiModelProperty(name = "parentId", value = "大题的id", required = false)
  19. private String parentId;
  20. public int getType() {
  21. return type;
  22. }
  23. public void setType(int type) {
  24. this.type = type;
  25. }
  26. public List<QuestionUpdateRequest> getQuestions() {
  27. return questions;
  28. }
  29. public void setQuestions(List<QuestionUpdateRequest> questions) {
  30. this.questions = questions;
  31. }
  32. public List<HowDetailPointsRequest> getDetailIds() {
  33. return detailIds;
  34. }
  35. public void setDetailIds(List<HowDetailPointsRequest> detailIds) {
  36. this.detailIds = detailIds.stream().collect(collectingAndThen(
  37. toCollection(() -> new TreeSet<>(Comparator.comparing(HowDetailPointsRequest::getDetailId))), ArrayList::new));
  38. }
  39. public String getParentId() {
  40. return parentId;
  41. }
  42. public void setParentId(String parentId) {
  43. this.parentId = parentId;
  44. }
  45. }