songshuai 5 år sedan
förälder
incheckning
e8bff9430e

+ 6 - 1
src/main/java/cn/efunbox/audio/impl/res/ResCategoryServiceImpl.java

@@ -5,6 +5,7 @@ import cn.efunbox.audio.repository.res.ResCategoryRepository;
 import cn.efunbox.audio.service.res.ResCategoryService;
 import cn.efunbox.audio.utils.ApiResult;
 import cn.efunbox.audio.utils.ResApiResult;
+import cn.efunbox.audio.vo.res.ResCategoryVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -23,8 +24,12 @@ public class ResCategoryServiceImpl implements ResCategoryService {
     @Override
     public ResApiResult getResCategoryList() {
 
+        //查询
         List<ResCategory> resCategoryList = resCategoryRepository.getResCategoryList();
 
-        return ResApiResult.ok(resCategoryList);
+        //响应
+        ResCategoryVO resCategoryVO = new ResCategoryVO();
+        resCategoryVO.setTypeList(resCategoryList);
+        return ResApiResult.ok(resCategoryVO);
     }
 }

+ 12 - 0
src/main/java/cn/efunbox/audio/vo/res/ResCategoryVO.java

@@ -0,0 +1,12 @@
+package cn.efunbox.audio.vo.res;
+
+import cn.efunbox.audio.entity.res.ResCategory;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ResCategoryVO {
+    //分类列表
+    private List<ResCategory> typeList;
+}