|  | @@ -17,18 +17,12 @@ import com.yonge.cooleshow.biz.dal.dao.TeacherDao;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dao.UserBindingTeacherDao;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.QueryMyFollowSearch;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.ImGroupMember;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.Student;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.StudentTotal;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.Subject;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.Teacher;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.TenantAlbumPurchase;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.TenantInfo;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.UserBindingTeacher;
 | 
	
		
			
				|  |  | -import com.yonge.cooleshow.biz.dal.entity.UserTenantAlbumRecord;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.entity.*;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.mapper.SysUserMapper;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumMapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumPurchaseMapper;
 | 
	
		
			
				|  |  | +import com.yonge.cooleshow.biz.dal.mapper.TenantAlbumRefMapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.ImGroupMemberService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.ImGroupService;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
 | 
	
	
		
			
				|  | @@ -104,7 +98,10 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
 | 
	
		
			
				|  |  |      private ImGroupMemberService imGroupMemberService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | -    private TenantAlbumPurchaseMapper tenantAlbumPurchaseMapper;
 | 
	
		
			
				|  |  | +    private TenantAlbumRefMapper tenantAlbumRefMapper;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private TenantAlbumMapper tenantAlbumMapper;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private EmployeeDao employeeDao;
 | 
	
	
		
			
				|  | @@ -166,11 +163,18 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
 | 
	
		
			
				|  |  |          TenantInfo tenantInfo = tenantInfoService.detail(detail.getTenantId());
 | 
	
		
			
				|  |  |          if (tenantInfo != null) {
 | 
	
		
			
				|  |  |              studentHomeVo.setTenantName(tenantInfo.getName());
 | 
	
		
			
				|  |  | -            QueryWrapper<TenantAlbumPurchase> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | -            queryWrapper.lambda().eq(TenantAlbumPurchase::getTenantId, detail.getTenantId());
 | 
	
		
			
				|  |  | -            Integer count = tenantAlbumPurchaseMapper.selectCount(queryWrapper);
 | 
	
		
			
				|  |  | -            if (count > 0) {
 | 
	
		
			
				|  |  | -                studentHomeVo.setTenantAlbumStatus(1);
 | 
	
		
			
				|  |  | +            QueryWrapper<TenantAlbumRef> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | +            queryWrapper.lambda().eq(TenantAlbumRef::getTenantId, detail.getTenantId());
 | 
	
		
			
				|  |  | +            List<TenantAlbumRef> albumRefs = tenantAlbumRefMapper.selectList(queryWrapper);
 | 
	
		
			
				|  |  | +            if (!albumRefs.isEmpty()) {
 | 
	
		
			
				|  |  | +                List<Long> albIds = albumRefs.stream().map(TenantAlbumRef::getTenantAlbumId).distinct().collect(Collectors.toList());
 | 
	
		
			
				|  |  | +                QueryWrapper<TenantAlbum> query = new QueryWrapper<>();
 | 
	
		
			
				|  |  | +                query.lambda().in(TenantAlbum::getId, albIds)
 | 
	
		
			
				|  |  | +                        .eq(TenantAlbum::getStatus,true);
 | 
	
		
			
				|  |  | +                Integer count = tenantAlbumMapper.selectCount(query);
 | 
	
		
			
				|  |  | +                if (count > 0) {
 | 
	
		
			
				|  |  | +                    studentHomeVo.setTenantAlbumStatus(1);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              UserTenantAlbumRecord record =
 | 
	
		
			
				|  |  |                      userTenantAlbumRecordService.getNewestByTenantIdAndUserId(tenantInfo.getId(), detail.getUserId(),
 |