feat(questionnaire): 新增问卷管理 V2 版本接口

- 添加了新的 QuestionnaireV2Controller 类,实现了问卷管理的 CRUD操作
- 新增了问卷答案查看和统计功能相关接口
- 重构了 ResponseDetailResponse 类,将 AnswerDetailResponse 类独立出来- 简化了 CreateQuestionOptionRequest 类的结构
This commit is contained in:
2025-09-06 01:09:17 +08:00
parent 180f89042c
commit 32f7660dc0
4 changed files with 284 additions and 22 deletions

View File

@@ -0,0 +1,20 @@
package com.ycwl.basic.integration.questionnaire.dto.answer;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class AnswerDetailResponse {
@JsonProperty("questionId")
private Long questionId;
@JsonProperty("questionTitle")
private String questionTitle;
@JsonProperty("questionType")
private Integer questionType;
@JsonProperty("answer")
private String answer;
}

View File

@@ -26,19 +26,3 @@ public class ResponseDetailResponse {
@JsonProperty("answers")
private List<AnswerDetailResponse> answers;
}
@Data
class AnswerDetailResponse {
@JsonProperty("questionId")
private Long questionId;
@JsonProperty("questionTitle")
private String questionTitle;
@JsonProperty("questionType")
private Integer questionType;
@JsonProperty("answer")
private String answer;
}

View File

@@ -25,10 +25,4 @@ public class CreateQuestionOptionRequest {
@JsonProperty("sort")
private Integer sort = 0;
public CreateQuestionOptionRequest(String text, String value, Integer sort) {
this.text = text;
this.value = value;
this.sort = sort;
}
}