|
@@ -4,7 +4,9 @@ import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.ShareProfitVo;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -246,6 +248,21 @@ public class MusicAlbumServiceImpl extends ServiceImpl<MusicAlbumDao,MusicAlbum>
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ShareProfitVo albumShareProfit(SysUser sysUser, Long albumId) {
|
|
|
+ MusicAlbumVo musicAlbum = baseMapper.selectMusicAlbumById(albumId);
|
|
|
+ if (musicAlbum == null) {
|
|
|
+ throw new BizException("未找到专辑信息");
|
|
|
+ }
|
|
|
+ ShareProfitVo shareProfitVo = new ShareProfitVo();
|
|
|
+ shareProfitVo.setTeacherId(sysUser.getId());
|
|
|
+ shareProfitVo.setName(sysUser.getUsername());
|
|
|
+ shareProfitVo.setAvatar(sysUser.getAvatar());
|
|
|
+ shareProfitVo.setType("ALBUM");
|
|
|
+ shareProfitVo.setMusicAlbum(musicAlbum);
|
|
|
+ return shareProfitVo;
|
|
|
+ }
|
|
|
+
|
|
|
private boolean checkNameRepeat(String albumName, Long id) {
|
|
|
LambdaQueryChainWrapper<MusicAlbum> eq = this.lambdaQuery()
|
|
|
.eq(MusicAlbum::getDelFlag,0)
|