|
@@ -1,12 +1,18 @@
|
|
|
package com.ym.mec.education.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.netflix.hystrix.contrib.javanica.annotation.DefaultProperties;
|
|
|
import com.ym.mec.education.base.BaseResponse;
|
|
|
+import com.ym.mec.education.base.PageResponse;
|
|
|
+import com.ym.mec.education.entity.MusicGroup;
|
|
|
+import com.ym.mec.education.service.IMusicGroupService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.persistence.GenerationType;
|
|
|
|
|
|
/**
|
|
|
* @author : chengp
|
|
@@ -18,6 +24,9 @@ import javax.persistence.GenerationType;
|
|
|
@DefaultProperties(defaultFallback = "defaultFallback")
|
|
|
@Slf4j
|
|
|
public class MusicGroupController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IMusicGroupService musicGroupService;
|
|
|
/**
|
|
|
* 服务降级处理
|
|
|
*
|
|
@@ -30,9 +39,12 @@ public class MusicGroupController {
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
- @GetMapping(value = "/say")
|
|
|
- public String say(){
|
|
|
-
|
|
|
- return "utyrewertyu";
|
|
|
+ @GetMapping(value = "/groupList")
|
|
|
+ public PageResponse groupList(){
|
|
|
+ PageResponse response = new PageResponse();
|
|
|
+ IPage page = new Page();
|
|
|
+ QueryWrapper<MusicGroup> queryWrapper = new QueryWrapper<>();
|
|
|
+ IPage<MusicGroup> queryPage = musicGroupService.page(page,queryWrapper);
|
|
|
+ return response;
|
|
|
}
|
|
|
}
|