|
@@ -18,6 +18,7 @@ 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.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -181,6 +182,13 @@ public class TenantAlbumController {
|
|
|
@ApiOperation(value = "新增专辑", notes = "新增专辑")
|
|
|
@PreAuthorize("@pcs.hasPermissions('tenantAlbum/save')")
|
|
|
public HttpResponseResult<Boolean> save(@Validated @RequestBody TenantAlbumVo.TenantAlbum album) {
|
|
|
+ //判断当前机构是否已经绑定机构专辑
|
|
|
+ Long tenantId = album.getTenantId();
|
|
|
+ List<TenantAlbumMusic> list = tenantAlbumMusicService.lambdaQuery().eq(TenantAlbumMusic::getTenantId, tenantId).list();
|
|
|
+ if (CollectionUtils.isNotEmpty(list)){
|
|
|
+ throw new BizException("当前机构已有专辑");
|
|
|
+ }
|
|
|
+
|
|
|
TenantAlbum tenantAlbum = JSON.parseObject(album.jsonString(), TenantAlbum.class);
|
|
|
List<TenantAlbumVo.MusicSheetData> musicSheetData = album.getMusicSheetData();
|
|
|
|