Przeglądaj źródła

1、照片上传接口调整
2、学生基本信息只查询在读的

dzx 1 rok temu
rodzic
commit
4c0c1d06fd

+ 1 - 1
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -198,7 +198,7 @@ public class StudentManagerController {
     @PostMapping("upload-image")
     @ApiOperation(value = "上传学生学籍照片")
     @SaCheckPermission("studentmanager:add")
-    public R uploadImage(@Valid Long userId, @RequestParam("file") MultipartFile file) throws IOException {
+    public R uploadImage(@RequestParam("file") MultipartFile file, @Valid @RequestParam Long userId) throws IOException {
         return R.ok(studentManagerService.uploadImage(userId, file));
     }
 

+ 1 - 1
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -964,7 +964,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     public Boolean uploadImage(Long userId, MultipartFile file) throws IOException {
         BaseStudentUser studentUser = studentbaseManagerBaseStudentUserMapper.selectById(userId);
         String[] imgSuffix = new String[]{"png", "jpg", "jpeg"};
-        String suffix = StringUtils.substringAfterLast(file.getName(), StringPool.DOT);
+        String suffix = StringUtils.substringAfterLast(file.getOriginalFilename(), StringPool.DOT);
         if (!Arrays.asList(imgSuffix).contains(suffix)) {
             throw new MyException("图片格式不正确!");
         }

+ 1 - 0
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -63,6 +63,7 @@
         LEFT JOIN xjr_dictionary_detail t9 ON t3.student_type = t9.code AND t9.item_id = 2023000000000000028
         LEFT JOIN xjr_dictionary_detail t10 ON t3.learn_status = t10.code AND t9.item_id = 1762024751192084482
         WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
+        and t3.archives_status = 'FB2901'
         <if test="dto.name != null and dto.name != ''">
             and t1.name like concat('%', #{dto.name},'%')
         </if>