|
@@ -83,6 +83,10 @@ public class StudentController extends BaseController {
|
|
|
@ApiOperation(value = "详情", notes = "传入id")
|
|
|
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());
|
|
|
+ }
|
|
|
return succeed(detail);
|
|
|
}
|
|
|
|
|
@@ -103,8 +107,8 @@ public class StudentController extends BaseController {
|
|
|
}
|
|
|
|
|
|
//如果真实姓名字段为空 把真实姓名赋值给昵称
|
|
|
- rows.stream().forEach(r -> {
|
|
|
- if (StringUtils.isEmpty(r.getRealName())) {
|
|
|
+ rows.stream().forEach(r->{
|
|
|
+ if (StringUtils.isEmpty(r.getRealName())){
|
|
|
if (StringUtils.isNotEmpty(r.getUsername()))
|
|
|
r.setRealName(r.getUsername());
|
|
|
}
|
|
@@ -123,7 +127,7 @@ public class StudentController extends BaseController {
|
|
|
List<Long> tenantGroupIds = rows.stream().map(Student::getTenantGroupId)
|
|
|
.filter(next -> next != null && next != -1L).distinct().collect(Collectors.toList());
|
|
|
Map<Long, String> tenantGroupIdNameMap = new HashMap<>();
|
|
|
- if (!tenantGroupIds.isEmpty()) {
|
|
|
+ if(!tenantGroupIds.isEmpty()){
|
|
|
Map<Long, String> tenantGroupMap = tenantGroupService.lambdaQuery()
|
|
|
.eq(TenantGroup::getTenantId, tenantInfo.getId())
|
|
|
.in(TenantGroup::getId, tenantGroupIds)
|