反馈-vo-修改typeEnumList结构
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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(){
|
||||
|
Reference in New Issue
Block a user