package com.aijia.kmt.vo; import com.aijia.core.web.BaseRequest; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.TreeSet; import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.toCollection; public class AuditingV1Request extends BaseRequest{ private static final long serialVersionUID = 1L; @ApiModelProperty(name = "type", value = "类型, 0提交审核,1发布,4解析提交,5解析发布,6答案校对修改, 默认0", required = true) private int type; @ApiModelProperty(name = "questions", value = "题目ids", required = true) private List questions; @ApiModelProperty(name = "detailIds", value = "关联的知识点", required = false) private List detailIds; @ApiModelProperty(name = "parentId", value = "大题的id", required = false) private String parentId; public int getType() { return type; } public void setType(int type) { this.type = type; } public List getQuestions() { return questions; } public void setQuestions(List questions) { this.questions = questions; } public List getDetailIds() { return detailIds; } public void setDetailIds(List detailIds) { this.detailIds = detailIds.stream().collect(collectingAndThen( toCollection(() -> new TreeSet<>(Comparator.comparing(HowDetailPointsRequest::getDetailId))), ArrayList::new)); } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } }