|
@@ -3,6 +3,7 @@ package com.yonge.cooleshow.admin.controller;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetApplicationExtendClientWrapper;
|
|
import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetApplicationExtendClientWrapper;
|
|
import com.microsvc.toolkit.common.response.template.R;
|
|
import com.microsvc.toolkit.common.response.template.R;
|
|
|
|
+import com.yonge.cooleshow.biz.dal.dto.AdjustModel;
|
|
import com.yonge.cooleshow.biz.dal.dto.ReasonDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.ReasonDto;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.MusicSheetSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.MusicSheetSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.StudentMusicSheetOrderSearch;
|
|
import com.yonge.cooleshow.biz.dal.dto.search.StudentMusicSheetOrderSearch;
|
|
@@ -116,10 +117,87 @@ public class MusicSheetController extends BaseController {
|
|
return succeed(PageUtil.pageInfo(musicSheetService.selectTeacherPage(PageUtil.getPage(query),query)));
|
|
return succeed(PageUtil.pageInfo(musicSheetService.selectTeacherPage(PageUtil.getPage(query),query)));
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping(value = "music/sheet/buySendMessage")
|
|
|
|
- @ApiOperation(value = "发送学生购买老师曲目信息")
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 审核中心-乐谱审核列表
|
|
|
|
+ */
|
|
|
|
+ @PostMapping(value = "/audit/list", consumes="application/json", produces="application/json")
|
|
|
|
+ @ApiOperation(value = "审核中心-乐谱审核列表", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('music/sheet/audit/list')")
|
|
|
|
+ public HttpResponseResult<PageInfo<TeacherMusicSheetVo>> audit(@RequestBody TeacherMusicSheetAuditSearch query) {
|
|
|
|
+ return succeed(PageUtil.pageInfo(musicSheetService.selectAuditPage(PageUtil.getPage(query),query)));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 审核中心-乐谱审核
|
|
|
|
+ */
|
|
|
|
+ @PostMapping(value = "/audit", consumes="application/json", produces="application/json")
|
|
|
|
+ @ApiOperation(value = "审核中心-乐谱审核", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('music/sheet/audit')")
|
|
|
|
+ public HttpResponseResult<Boolean> audit(@Valid @RequestBody TeacherMusicSheetAuditReq param) {
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+ if (sysUser == null || sysUser.getId() == null) {
|
|
|
|
+ return failed("用户信息获取失败");
|
|
|
|
+ }
|
|
|
|
+ return status(musicSheetService.audit(param,sysUser.getId()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 审核中心-乐谱审核
|
|
|
|
+ */
|
|
|
|
+ @GetMapping(value = "/auditDetail/{authMusicSheetId}")
|
|
|
|
+ @ApiOperation(value = "审核中心-乐谱审核详情", notes = "传入曲目审核id")
|
|
|
|
+ public HttpResponseResult<MusicSheetDetailVo> auditDetail(@PathVariable Long authMusicSheetId) {
|
|
|
|
+
|
|
|
|
+ return succeed(musicSheetService.auditDetail(authMusicSheetId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 审核中心-乐谱审核记录列表
|
|
|
|
+ */
|
|
|
|
+ @GetMapping(value = "/auditDetailList/{authMusicSheetId}")
|
|
|
|
+ @ApiOperation(value = "审核中心-乐谱审核详情历史记录", notes = "传入曲目审核id")
|
|
|
|
+ public HttpResponseResult<List<MusicSheetDetailVo>> auditDetailList(@PathVariable Long authMusicSheetId) {
|
|
|
|
+
|
|
|
|
+ return succeed(musicSheetService.auditDetailList(authMusicSheetId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping(value = "/buySendMessage", consumes="application/json", produces="application/json")
|
|
|
|
+ @ApiOperation(value = "发送学生购买老师曲目信息", httpMethod="POST", consumes="application/json", produces="application/json")
|
|
public HttpResponseResult<Boolean> buySendMessage(@Valid @RequestBody MusicSheetStudentByMessage param) {
|
|
public HttpResponseResult<Boolean> buySendMessage(@Valid @RequestBody MusicSheetStudentByMessage param) {
|
|
return status(musicSheetService.sendBuyMessage(param.getTeacherId(), param.getStudentId(), param.getMusicSheetId(),
|
|
return status(musicSheetService.sendBuyMessage(param.getTeacherId(), param.getStudentId(), param.getMusicSheetId(),
|
|
ClientEnum.STUDENT, OrderTypeEnum.MUSIC));
|
|
ClientEnum.STUDENT, OrderTypeEnum.MUSIC));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 置顶
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/top/{id}")
|
|
|
|
+ @ApiOperation(value = "置顶曲目", notes = "传入id")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('music/sheet/top')")
|
|
|
|
+ public HttpResponseResult<Boolean> top(@ApiParam(value = "曲目编号", required = true) @PathVariable Long id) {
|
|
|
|
+ if (StringUtil.isEmpty(id)) {
|
|
|
|
+ return failed("参数不能为空");
|
|
|
|
+ }
|
|
|
|
+ return status(musicSheetService.top(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 设置排序值 和加精
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/adjust")
|
|
|
|
+ @ApiOperation(value = "曲目调整设置")
|
|
|
|
+ public HttpResponseResult<Boolean> adjust(@RequestBody @Valid AdjustModel model) {
|
|
|
|
+
|
|
|
|
+ MusicSheet musicSheet = new MusicSheet();
|
|
|
|
+ musicSheet.setId(model.getId());
|
|
|
|
+ musicSheet.setSortNumber(model.getSort());
|
|
|
|
+ musicSheet.setExquisiteFlag(model.getExquisiteFlag());
|
|
|
|
+
|
|
|
|
+ musicSheetService.updateById(musicSheet);
|
|
|
|
+
|
|
|
|
+ return succeed();
|
|
|
|
+ }
|
|
}
|
|
}
|