haonan 1 год назад
Родитель
Сommit
715eeb990f

+ 2 - 2
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/TenantEntryRecordController.java

@@ -88,11 +88,11 @@ public class TenantEntryRecordController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('tenantApply/entry')")
     public HttpResponseResult<Boolean> entry(@RequestBody TenantApplyRecordWrapper.TenantEntry entry) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
-        TenantInfo tenantInfo = tenantInfoService.lambdaQuery().eq(TenantInfo::getUserId, sysUser.getId())
+        /*TenantInfo tenantInfo = tenantInfoService.lambdaQuery().eq(TenantInfo::getUserId, sysUser.getId())
                 .last("limit 1").one();
         if (tenantInfo == null) {
             throw new BizException("非法请求");
-        }
+        }*/
         Long verifyUserId = sysUser.getId();
 
         return succeed(tenantApplyRecordService.entry(entry,verifyUserId));

+ 54 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/TenantAlbumSheetController.java

@@ -0,0 +1,54 @@
+package com.yonge.cooleshow.teacher;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.biz.dal.service.TenantAlbumMusicService;
+import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumMusicWrapper;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.toolset.base.page.PageInfo;
+import com.yonge.toolset.mybatis.support.PageUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+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.RestController;
+
+/**
+ * 专辑表 web 控制层
+ * @author yzp
+ * @date 2022-03-26 00:21:46
+ * @version v1.0
+ **/
+@RestController
+@RequestMapping("/tenantAlbumMusic")
+@Api(tags = "机构专辑曲目 API接口")
+public class TenantAlbumSheetController extends BaseController {
+
+    @Autowired
+    private TenantAlbumMusicService tenantAlbumMusicService;
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+
+
+
+    @ApiOperation(value = "分页查询")
+    @PostMapping("/page")
+    public HttpResponseResult<PageInfo<TenantAlbumMusicWrapper.StudentTenantAlbumMusic>> page(@RequestBody TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user == null || null == user.getId()) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page = tenantAlbumMusicService.selectPage(QueryInfo.getPage(query), query);
+        return succeed((PageUtil.pageInfo(page)));
+    }
+
+
+}

+ 40 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/UserTenantAlbumRecordController.java

@@ -0,0 +1,40 @@
+package com.yonge.cooleshow.teacher.controller;
+
+import com.yonge.cooleshow.biz.dal.service.MusicAlbumService;
+import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumWrapper;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/userTenantAlbumRecord")
+@Api(tags = "购买训练工具记录")
+public class UserTenantAlbumRecordController {
+
+    @Autowired
+    private MusicAlbumService musicAlbumService;
+
+
+
+
+    @ApiOperation(value = "查询机构专辑详情")
+    @PostMapping("/albumDetail")
+    public HttpResponseResult <TenantAlbumWrapper.TenantAlbum> albumDetail(@RequestParam(defaultValue = "") String albumId) {
+        TenantAlbumWrapper.TenantAlbum tenantAlbum= musicAlbumService.detailAlbum(albumId);
+        return HttpResponseResult.succeed(tenantAlbum);
+    }
+
+
+
+
+
+}