Bläddra i källkod

机构专辑购买分页fix

haonan 1 år sedan
förälder
incheckning
96ff27ee7e

+ 4 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantAlbumMusicServiceImpl.java

@@ -8,6 +8,7 @@ import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 import com.yonge.cooleshow.biz.dal.enums.SubjectTypeEnum;
 import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
 import com.yonge.cooleshow.biz.dal.service.*;
+import com.yonge.toolset.base.exception.BizException;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -68,6 +69,9 @@ public class TenantAlbumMusicServiceImpl extends ServiceImpl<TenantAlbumMusicMap
     @Override
     public IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> selectPage(IPage<TenantAlbumMusicWrapper.StudentTenantAlbumMusic> page, TenantAlbumMusicWrapper.StudentTenantAlbumMusicQuery query) {
         List<Long> albumIds = query.getAlbumIds();
+        if (CollectionUtils.isEmpty(albumIds)){
+            throw new BizException("该机构未绑定相关专辑");
+        }
         SubjectTypeEnum subjectType = query.getSubjectType();
         String s = subjectType.toString();
         String type = query.getType();