|
|
@@ -3,6 +3,7 @@ package com.xjrsoft.module.internship.controller;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.xjrsoft.common.annotation.XjrLog;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
@@ -17,6 +18,8 @@ import com.xjrsoft.module.internship.entity.StudentInternshipRecord;
|
|
|
import com.xjrsoft.module.internship.service.IStudentInternshipRecordService;
|
|
|
import com.xjrsoft.module.internship.vo.StudentInternshipRecordPageVo;
|
|
|
import com.xjrsoft.module.internship.vo.StudentInternshipRecordVo;
|
|
|
+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;
|
|
|
@@ -46,6 +49,7 @@ public class StudentInternshipRecordController {
|
|
|
|
|
|
|
|
|
private final IStudentInternshipRecordService studentInternshipRecordService;
|
|
|
+ private final IFileService fileService;
|
|
|
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value="学生实习记录表列表(分页)")
|
|
|
@@ -74,7 +78,15 @@ public class StudentInternshipRecordController {
|
|
|
if (studentInternshipRecord == null) {
|
|
|
return RT.error("找不到此数据!");
|
|
|
}
|
|
|
- return RT.ok(BeanUtil.toBean(studentInternshipRecord, StudentInternshipRecordVo.class));
|
|
|
+ File file = fileService.getOne(
|
|
|
+ new QueryWrapper<File>().lambda()
|
|
|
+ .eq(File::getFolderId, studentInternshipRecord.getFolderId())
|
|
|
+ );
|
|
|
+ StudentInternshipRecordVo recordVo = BeanUtil.toBean(studentInternshipRecord, StudentInternshipRecordVo.class);
|
|
|
+ if(file != null){
|
|
|
+ recordVo.setFileUrl(file.getFileUrl());
|
|
|
+ }
|
|
|
+ return RT.ok(recordVo);
|
|
|
}
|
|
|
|
|
|
|