| 
					
				 | 
			
			
				@@ -9,11 +9,13 @@ import com.yonge.cooleshow.biz.dal.dto.search.VipRecordSearch; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.entity.Student; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.entity.TenantActivationCode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.entity.TenantGroup; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yonge.cooleshow.biz.dal.entity.UserTenantAlbumRecord; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.enums.ClientEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.service.MemberPriceSettingsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.service.StudentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.service.TenantActivationCodeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.service.TenantGroupService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.yonge.cooleshow.biz.dal.service.UserTenantAlbumRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.service.VipCardRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.vo.StudentVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.biz.dal.vo.VipRecordVo; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -79,6 +81,10 @@ public class StudentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private TenantActivationCodeService tenantActivationCodeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private UserTenantAlbumRecordService userTenantAlbumRecordService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @GetMapping("/detail/{id}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "详情", notes = "传入id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiImplicitParams({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -87,9 +93,18 @@ public class StudentController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@pcs.hasPermissions('student/detail')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public HttpResponseResult<StudentVo> detail(@PathVariable("id") Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         StudentVo detail = studentService.detail(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (detail != null && detail.getTenantGroupId() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            TenantGroup group = tenantGroupService.getById(detail.getTenantGroupId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            detail.setTenantGroupName(group == null ? "" : group.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (detail != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            UserTenantAlbumRecord one = userTenantAlbumRecordService.lambdaQuery() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    .eq(UserTenantAlbumRecord::getUserId, id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    .orderByDesc(UserTenantAlbumRecord::getEndTime) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    .last("limit 1").one(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (one != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                detail.setTenantAlbumEndTime(one.getEndTime()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (detail.getTenantGroupId() != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                TenantGroup group = tenantGroupService.getById(detail.getTenantGroupId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                detail.setTenantGroupName(group == null ? "" : group.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return succeed(detail); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |