Browse Source

Merge branch 'feature/0721-tenant' of http://git.dayaedu.com/yonge/cooleshow into feature/0721-tenant

liujc 1 year ago
parent
commit
5b68e94b9a

+ 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();

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantInfoServiceImpl.java

@@ -249,7 +249,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoMapper, TenantI
             sysUser = sysUsers.get(0);
             TenantStaff tenantStaff = tenantStaffMapper.selectByUserId(sysUser.getId());
             if ( !ObjectUtil.isEmpty(tenantStaff) && !ObjectUtil.isEmpty(oldTenantInfo) &&
-                    !tenantStaff.getUserId().equals(oldTenantInfo.getUserId())) {
+                    !tenantInfo.getPhone().equals(oldTenantInfo.getPhone())) {
                 throw new BizException("手机号已经注册机构账号");
             }
             //获取当前账户的用户类型