Browse Source

修复部分bug

houlai 6 months ago
parent
commit
e417086454

+ 3 - 1
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentscollegemanage/vo/AidingStudentsCollegeManageProjectInfoRespVO.java

@@ -93,10 +93,12 @@ public class AidingStudentsCollegeManageProjectInfoRespVO {
     @Schema(description = "家庭经济困难学生认定项目评审规则文件")
     private String diNoticeFile;
 
-    //@TableField(value = "di_notice_file_name")
     @Schema(description = "家庭经济困难学生认定项目评审规则文件名称", example = "芋艿")
     private String diNoticeFileName;
 
+    @Schema(description = "创建人")
+    private String creator;
+
     /*@Schema(description = "助学项目管理vo类")
     private AidingStudentsManageRespVO projectInfo;
     @Schema(description = "助学项目学院管理vo类")

+ 1 - 1
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/controller/admin/aidingstudentsimportlist/AidingStudentsImportListController.java

@@ -113,7 +113,7 @@ public class AidingStudentsImportListController {
     @PreAuthorize("@ss.hasPermission('as:aiding-students-import-list:reimport')")
     public CommonResult<Boolean> reImportExcel(@RequestParam(value = "aidingStudentsManageId", required = true) Long aidingStudentsManageId,
                                                                        @RequestParam("file") MultipartFile file,
-                                                                       @RequestParam("strategyId") Integer strategyId) throws Exception {
+                                                                       @RequestParam(value = "strategyId",defaultValue = "1") Integer strategyId) throws Exception {
         List<AidingStudentsImportExcelVO> list = ExcelUtils.read(file, AidingStudentsImportExcelVO.class);
         aidingStudentsImportListService.aidingStudentsImportExcelReImport(list, aidingStudentsManageId, strategyId);
         return success(true);

+ 4 - 3
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/dal/mysql/aidingstudentscollegemanage/AidingStudentsCollegeManageMapper.java

@@ -35,10 +35,11 @@ public interface AidingStudentsCollegeManageMapper extends BaseMapperX<AidingStu
                 .orderByDesc(AidingStudentsCollegeManageDO::getId));
     }
 
-    @Select("SELECT as_aiding_students_manage.id,di_name,di_status,di_notice,di_notice_file,di_notice_file_name,di_end_time," +
-            "submit_time,evaluation_time,audit_time,publicity_time,com_status,manage_id,college_id,college_notice_file,college_notice_file_name,reporting_time,as_aiding_students_college_manage.create_time " +
+    @Select("SELECT as_aiding_students_manage.id,di_name,di_status,di_notice,di_notice_file,di_notice_file_name,di_end_time, " +
+            "submit_time,evaluation_time,audit_time,publicity_time,com_status,manage_id,college_id,college_notice_file,college_notice_file_name,reporting_time,as_aiding_students_manage.create_time ,as_aiding_students_manage.creator " +
             "FROM as_aiding_students_manage left join as_aiding_students_college_manage on  as_aiding_students_manage.id= as_aiding_students_college_manage.manage_id and as_aiding_students_college_manage.deleted=false " +
-            "where as_aiding_students_manage.deleted=false  limit #{pageSize} offset #{offset} ")
+            "where as_aiding_students_manage.deleted=false and as_aiding_students_manage.di_status=1  " +
+            "ORDER BY as_aiding_students_manage.create_time DESC  limit #{pageSize} offset #{offset}")
     List<AidingStudentsCollegeManageProjectInfoRespVO> selectProjectInfoPage(@Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
 
     @Select("SELECT count(1) FROM as_aiding_students_manage left join as_aiding_students_college_manage on  as_aiding_students_manage.id= as_aiding_students_college_manage.manage_id and as_aiding_students_college_manage.deleted=false " +

+ 5 - 0
yudao-module-as/yudao-module-as-biz/src/main/java/cn/iocoder/yudao/module/as/service/aidingstudentscollegemanage/AidingStudentsCollegeManageServiceImpl.java

@@ -136,6 +136,11 @@ public class AidingStudentsCollegeManageServiceImpl implements AidingStudentsCol
         Integer offset = (pageNo - 1) *pageSize;
         List<AidingStudentsCollegeManageProjectInfoRespVO> aidingStudentsCollegeManageProjectInfoRespVOS = aidingStudentsCollegeManageMapper.selectProjectInfoPage(pageSize,offset);
         if (aidingStudentsCollegeManageProjectInfoRespVOS != null){
+            //获得学校项目创建人
+            aidingStudentsCollegeManageProjectInfoRespVOS.forEach(aidingStudentsCollegeManageProjectInfoRespVO -> {
+                aidingStudentsCollegeManageProjectInfoRespVO.setCreator(adminUserApi.getUser(Long.valueOf(aidingStudentsManageMapper.selectById(aidingStudentsCollegeManageProjectInfoRespVO.getId()).getCreator())).getNickname());
+            });
+            //返回项目信息
             return new PageResult<>(aidingStudentsCollegeManageProjectInfoRespVOS,aidingStudentsCollegeManageMapper.selectProjectInfoPageCount());
         }
         return null;