xiaofei 10 сар өмнө
parent
commit
b6d4a8fbea

+ 7 - 15
paper-library-business/src/main/java/com/qmth/paper/library/business/mapper/PictureManageMapper.java

@@ -9,21 +9,13 @@ import java.util.List;
 
 public interface PictureManageMapper {
 
-    IPage<PictureManageDetailResult> pageData(Page<PictureManageDetailResult> page, @Param(value = "semesterId") Long semesterId,
-            @Param(value = "examId") Long examId, @Param(value = "courseCode") String courseCode,
-            @Param(value = "collegeName") String collegeName, @Param(value = "majorName") String majorName,
-            @Param(value = "className") String className, @Param(value = "teacher") String teacher, @Param(value = "teachClass") String teachClass,
-            @Param(value = "param") String param, @Param(value = "startStudentCode") String startStudentCode,
-            @Param(value = "endStudentCode") String endStudentCode, @Param(value = "pictureSymbol") String pictureSymbol,
-            @Param(value = "pictureCount") Integer pictureCount);
-
-    List<PictureManageDetailResult> pageData(@Param(value = "semesterIds") List<Long> semesterIds,
-            @Param(value = "examIds") List<Long> examIds, @Param(value = "courseCodes") List<String> courseCodes,
-            @Param(value = "collegeNames") List<String> collegeNames, @Param(value = "majorNames") List<String> majorNames,
-            @Param(value = "classNames") List<String> classNames, @Param(value = "teacher") String teacher, @Param(value = "teachClass") String teachClass,
-            @Param(value = "param") String param, @Param(value = "minScore") Double minScore,
-            @Param(value = "maxScore") Double maxScore, @Param(value = "pictureSymbol") String pictureSymbol,
-            @Param(value = "pictureCount") Integer pictureCount);
+    IPage<PictureManageDetailResult> pageData(Page<PictureManageDetailResult> page, @Param(value = "schoolId") Long schoolId,
+                                              @Param(value = "semesterId") Long semesterId, @Param(value = "examId") Long examId, @Param(value = "courseCode") String courseCode,
+                                              @Param(value = "collegeName") String collegeName, @Param(value = "majorName") String majorName,
+                                              @Param(value = "className") String className, @Param(value = "teacher") String teacher, @Param(value = "teachClass") String teachClass,
+                                              @Param(value = "param") String param, @Param(value = "startStudentCode") String startStudentCode,
+                                              @Param(value = "endStudentCode") String endStudentCode, @Param(value = "pictureSymbol") String pictureSymbol,
+                                              @Param(value = "pictureCount") Integer pictureCount);
 
     List<PictureManageDetailResult> pageDataByStudentIds(@Param("studentIds") List<Long> studentIds);
 }

+ 3 - 1
paper-library-business/src/main/java/com/qmth/paper/library/business/service/impl/PictureManageServiceImpl.java

@@ -11,6 +11,7 @@ import com.qmth.paper.library.business.service.PictureManageService;
 import com.qmth.paper.library.common.bean.params.DownloadPictureParams;
 import com.qmth.paper.library.common.enums.ExceptionResultEnum;
 import com.qmth.paper.library.common.util.FileStoreUtil;
+import com.qmth.paper.library.common.util.ServletUtil;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
@@ -40,7 +41,8 @@ public class PictureManageServiceImpl implements PictureManageService {
     public IPage<PictureManageDetailResult> pageData(Long semesterId, Long examId, String courseCode, String collegeName,
                                                      String majorName, String className, String teacher, String teachClass, String param, String startStudentCode, String endStudentCode,
                                                      String pictureSymbol, Integer pictureCount, Integer pageNumber, Integer pageSize) {
-        IPage<PictureManageDetailResult> picturePage = pictureManageMapper.pageData(new Page<>(pageNumber, pageSize), semesterId, examId,
+        Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
+        IPage<PictureManageDetailResult> picturePage = pictureManageMapper.pageData(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId,
                 courseCode, collegeName, majorName, className, teacher,
                 teachClass, param, startStudentCode, endStudentCode, pictureSymbol, pictureCount);
         List<PictureManageDetailResult> records = picturePage.getRecords();

+ 1 - 0
paper-library-business/src/main/resources/mapper/PictureManageMapper.xml

@@ -25,6 +25,7 @@
         left join basic_exam ea on es.exam_id = ea.id
         left join basic_semester bs on es.semester_id = bs.id
         WHERE es.bind_count>0
+          AND es.school_id = #{schoolId}
         <if test="semesterId != null">
             AND bs.id = #{semesterId}
         </if>