|
@@ -20,7 +20,11 @@ import com.xjrsoft.module.base.service.IBaseClassDynamicsService;
|
|
|
import com.xjrsoft.module.base.service.IBaseUserStudentService;
|
|
|
import com.xjrsoft.module.base.vo.BaseClassDynamicsPageVo;
|
|
|
import com.xjrsoft.module.base.vo.BaseClassDynamicsVo;
|
|
|
+import com.xjrsoft.module.organization.entity.User;
|
|
|
+import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
|
|
|
+import com.xjrsoft.module.system.entity.File;
|
|
|
+import com.xjrsoft.module.system.service.IFileService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
@@ -37,7 +41,6 @@ import javax.validation.Valid;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @title: 班级动态表
|
|
@@ -55,6 +58,8 @@ public class BaseClassDynamicsController {
|
|
|
private final IBaseClassDynamicsService baseClassDynamicsService;
|
|
|
private final IBaseStudentSchoolRollService rollService;
|
|
|
private final IBaseUserStudentService userStudentService;
|
|
|
+ private final IUserService userService;
|
|
|
+ private final IFileService fileService;
|
|
|
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value="班级动态表列表(分页)")
|
|
@@ -112,7 +117,18 @@ public class BaseClassDynamicsController {
|
|
|
if (baseClassDynamics == null) {
|
|
|
return RT.error("找不到此数据!");
|
|
|
}
|
|
|
- return RT.ok(BeanUtil.toBean(baseClassDynamics, BaseClassDynamicsVo.class));
|
|
|
+ BaseClassDynamicsVo dynamicsVo = BeanUtil.toBean(baseClassDynamics, BaseClassDynamicsVo.class);
|
|
|
+ User user = userService.getById(baseClassDynamics.getCreateUserId());
|
|
|
+ dynamicsVo.setCreateUserName(user.getName());
|
|
|
+
|
|
|
+ if(dynamicsVo.getFolderId() != null){
|
|
|
+ File file = fileService.getOne(new QueryWrapper<File>().lambda().eq(File::getFolderId, dynamicsVo.getFolderId()));
|
|
|
+ if(file != null){
|
|
|
+ dynamicsVo.setFileUrl(file.getFileUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return RT.ok(dynamicsVo);
|
|
|
}
|
|
|
|
|
|
|