|
@@ -0,0 +1,37 @@
|
|
|
+package com.yonge.cooleshow.admin.controller;
|
|
|
+
|
|
|
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.MusicSheetService;
|
|
|
+import com.yonge.cooleshow.common.controller.BaseController;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/music")
|
|
|
+@Api(tags = "乐谱 web controller")
|
|
|
+public class MusicSheetController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private SysUserFeignService sysUserFeignService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private MusicSheetService musicSheetService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "新增曲谱")
|
|
|
+ @RequestMapping("/sheet/create")
|
|
|
+ public Object create(@RequestBody MusicSheet musicSheet) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ musicSheet.setCreateBy(0L);
|
|
|
+ musicSheetService.insert(musicSheet);
|
|
|
+ return succeed();
|
|
|
+ }
|
|
|
+}
|