|
@@ -1,11 +1,33 @@
|
|
|
package com.yonge.cooleshow.admin.controller;
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.AdjustModel;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.MusicSheetDto;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.MusicSheetExport;
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.MusicSheetRenderDto;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.ReasonDto;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.req.TeacherMusicSheetAuditReq;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.MusicSheetSearch;
|
|
@@ -37,24 +59,6 @@ import com.yonge.toolset.utils.easyexcel.ErrMsg;
|
|
|
import com.yonge.toolset.utils.easyexcel.ExcelDataReader;
|
|
|
import com.yonge.toolset.utils.easyexcel.ExcelException;
|
|
|
import com.yonge.toolset.utils.easyexcel.ExcelUtils;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import io.swagger.annotations.ApiParam;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import javax.validation.Valid;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 曲谱表 web 控制层
|
|
@@ -187,6 +191,36 @@ public class MusicSheetController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "修改", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
+ @PostMapping(value="/updateRenderFile", consumes="application/json", produces="application/json")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('music/sheet/updateRenderFile')")
|
|
|
+ public HttpResponseResult<Object> updateRenderFile(@Valid @RequestBody MusicSheetRenderDto musicSheetRenderDto) {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null || sysUser.getId() == null) {
|
|
|
+ return failed("用户信息获取失败");
|
|
|
+ }
|
|
|
+ if (musicSheetRenderDto.getMusicSheetId()==null){
|
|
|
+ return failed("缺少ID");
|
|
|
+ }
|
|
|
+ MusicSheet musicSheet = musicSheetService.getById(musicSheetRenderDto.getMusicSheetId());
|
|
|
+
|
|
|
+ if(musicSheet == null){
|
|
|
+ return failed("参数异常");
|
|
|
+ }
|
|
|
+ musicSheet.setMusicFirstSvg(musicSheetRenderDto.getMusicFirstSvg());
|
|
|
+ musicSheet.setMusicJianSvg(musicSheetRenderDto.getMusicJianSvg());
|
|
|
+ musicSheet.setMusicJSON(musicSheetRenderDto.getMusicJSON());
|
|
|
+ musicSheet.setMusicSvg(musicSheetRenderDto.getMusicSvg());
|
|
|
+
|
|
|
+ musicSheet.setUpdateBy(sysUser.getId());
|
|
|
+ musicSheet.setUpdateTime(new Date());
|
|
|
+ if ( musicSheetService.updateById(musicSheet)){
|
|
|
+ return succeed("修改成功");
|
|
|
+ } else {
|
|
|
+ return failed("修改失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "分页查询", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
@PostMapping(value="/list", consumes="application/json", produces="application/json")
|
|
|
@PreAuthorize("@pcs.hasPermissions('music/sheet/list')")
|