反馈-vo-修改typeEnumList结构

This commit is contained in:
khalil
2025-06-13 22:33:51 +08:00
parent 3d5d485e26
commit 2279874191
4 changed files with 7 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@Api(tags = "反馈")
@RestController
@@ -23,8 +24,8 @@ public class FeedbackRecordAdminController {
private FeedbackService service;
@GetMapping("/listType")
public BusiResult<List<FeedbackTypeEnum>> listFeedbackType() {
List<FeedbackTypeEnum> list = service.listFeedbackType();
public BusiResult<List<Map<String, String>>> listFeedbackType() {
List<Map<String, String>> list = service.listFeedbackType();
return BusiResult.success(list);
}

View File

@@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@Getter
@AllArgsConstructor
public enum FeedbackTypeEnum {

View File

@@ -13,7 +13,7 @@ import java.util.Map;
public class FeedbackConfigVo {
@ApiModelProperty("类型选项列表")
private List<FeedbackTypeEnum> typeEnumList;
private List<Map<String, String>> typeEnumList;
@ApiModelProperty("客服联系方式")
private Map<String, Object> customContactMap;

View File

@@ -27,8 +27,9 @@ public class FeedbackService {
@Autowired
private FeedbackRecordMapper recordMapper;
public List<FeedbackTypeEnum> listFeedbackType(){
return Arrays.stream(FeedbackTypeEnum.values()).collect(Collectors.toList());
public List<Map<String, String>> listFeedbackType(){
return Arrays.stream(FeedbackTypeEnum.values())
.map(feedbackTypeEnum -> Map.of("type", feedbackTypeEnum.name(), "desc", feedbackTypeEnum.getDesc())).collect(Collectors.toList());
}
public Map<String, Object> mapCustomContact(){