|
@@ -0,0 +1,46 @@
|
|
|
+package com.ym.mec.web.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.entity.StudentInstrument;
|
|
|
+import com.ym.mec.biz.dal.page.StudentInstrumentQueryInfo;
|
|
|
+import com.ym.mec.biz.service.StudentInstrumentService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+
|
|
|
+@RequestMapping("studentInstrument")
|
|
|
+@Api(tags = "乐器与月保服务")
|
|
|
+@RestController
|
|
|
+public class StudentInstrumentController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private StudentInstrumentService studentInstrumentService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取乐器与月保列表")
|
|
|
+ @GetMapping("/getList")
|
|
|
+ public HttpResponseResult<PageInfo<StudentInstrument>> getList(StudentInstrumentQueryInfo queryInfo) {
|
|
|
+ SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
+ if (user == null || user.getId() == null) {
|
|
|
+ return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
+ }
|
|
|
+ queryInfo.setStudentId(user.getId());
|
|
|
+ return succeed(studentInstrumentService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|