Jelajahi Sumber

fix:
1.成绩管理报告管理数据权限由mark_paper表的user_id改为teach_course表
2.题库单点登录优化支持url结尾带"/"

caozixuan 1 tahun lalu
induk
melakukan
b49eae34fd

+ 3 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/SsoServiceImpl.java

@@ -233,6 +233,9 @@ public class SsoServiceImpl implements SsoService {
         SysConfig sysConfig = commonCacheService.addSysConfigCache(basicSchool.getId(), SystemConstant.QUESTION_HOST_URL);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置题库地址"));
         String questionLoginUrl = sysConfig.getConfigValue();
+        if (questionLoginUrl.endsWith("/")){
+            questionLoginUrl = questionLoginUrl.substring(0,questionLoginUrl.length() - 1);
+        }
         if (questionLoginUrl.contains(SystemConstant.PATH_MATCH)) {
             questionLoginUrl = questionLoginUrl.replace(SystemConstant.PATH_MATCH, basicSchool.getCode());
         }

+ 2 - 2
distributed-print-business/src/main/resources/mapper/TCUsualScoreMapper.xml

@@ -16,8 +16,8 @@
             mark_paper t
             left join basic_exam be on be.id = t.exam_id
             left join basic_semester bs on bs.id = be.semester_id
-            left join sys_user su on t.user_id = su.id
             left join teach_course tc ON tc.exam_id = t.exam_id and tc.course_code = t.course_code
+            left join sys_user su on tc.user_id = su.id
             left join sys_user creator ON creator.id = tc.user_id
         <where>
             <if test="examId != null and examId != ''">
@@ -29,7 +29,7 @@
             AND t.status = 'FINISH'
             <if test="dpr != null">
                 <if test="dpr.requestUserId != null">
-                    AND t.user_id = #{dpr.requestUserId}
+                    AND tc.user_id = #{dpr.requestUserId}
                 </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
                     AND su.org_id IN