|
@@ -10,6 +10,8 @@ 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.service.ActivityPlanService;
|
|
|
+import com.yonge.cooleshow.biz.dal.vo.ActivityPlanVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.ShareProfitVo;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.AlbumMusicRelateDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.MusicSheetDao;
|
|
@@ -20,6 +22,7 @@ import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.album.PurchaseRecordTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.MusicSheetPurchaseRecordService;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.StatGroupWrapper;
|
|
|
+import com.yonge.cooleshow.common.enums.ActivityShareEnum;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -64,6 +67,8 @@ public class MusicAlbumServiceImpl extends ServiceImpl<MusicAlbumDao,MusicAlbum>
|
|
|
private static final Logger log = LoggerFactory.getLogger(MusicAlbumServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
|
|
+ private ActivityPlanService activityPlanService;
|
|
|
+ @Autowired
|
|
|
private MusicAlbumDao musicAlbumDao;
|
|
|
|
|
|
@Autowired
|
|
@@ -379,6 +384,13 @@ public class MusicAlbumServiceImpl extends ServiceImpl<MusicAlbumDao,MusicAlbum>
|
|
|
public ShareProfitVo albumShareProfit(SysUser sysUser, Long albumId) {
|
|
|
MusicAlbumDetailSearch query = new MusicAlbumDetailSearch();
|
|
|
|
|
|
+
|
|
|
+ ShareProfitVo shareProfitVo = new ShareProfitVo();
|
|
|
+ ActivityPlanVo activityPlanVo = activityPlanService.activityShare(ActivityShareEnum.VIP, sysUser.getId());
|
|
|
+ if (activityPlanVo != null) {
|
|
|
+ shareProfitVo.setActivityId(activityPlanVo.getId());
|
|
|
+ shareProfitVo.setDiscount(YesOrNoEnum.YES);
|
|
|
+ }
|
|
|
query.setId(albumId);
|
|
|
query.setType(2);
|
|
|
query.setRows(200);
|
|
@@ -387,7 +399,6 @@ public class MusicAlbumServiceImpl extends ServiceImpl<MusicAlbumDao,MusicAlbum>
|
|
|
if (detail == null) {
|
|
|
throw new BizException("未找到专辑信息");
|
|
|
}
|
|
|
- ShareProfitVo shareProfitVo = new ShareProfitVo();
|
|
|
shareProfitVo.setTeacherId(sysUser.getId());
|
|
|
shareProfitVo.setName(sysUser.getUsername());
|
|
|
shareProfitVo.setAvatar(sysUser.getAvatar());
|