|
@@ -0,0 +1,37 @@
|
|
|
+package com.ym.mec.student.controller;
|
|
|
+
|
|
|
+import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
+import com.ym.mec.biz.dal.page.ReplacementInstrumentQueryInfo;
|
|
|
+import com.ym.mec.biz.service.ReplacementInstrumentService;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+@RequestMapping("replacementInstrument")
|
|
|
+@Api(tags = "乐器置换商品服务")
|
|
|
+@RestController
|
|
|
+public class ReplacementInstrumentController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ReplacementInstrumentService replacementInstrumentService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "分页查询列表")
|
|
|
+ @GetMapping("/queryPage")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('managerDownload/queryPage')")
|
|
|
+ public Object queryPage(ReplacementInstrumentQueryInfo queryInfo) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ return succeed(replacementInstrumentService.queryPage(queryInfo));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|