xiaofei 6 månader sedan
förälder
incheckning
cbcf73f5b8

+ 6 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

@@ -163,7 +163,7 @@ public class SysController {
                 throw ExceptionResultEnum.ERROR.exception("用户被禁用");
             }
 
-            String decodePassword =  Base64Util.encode(AesECBUtil.decryptSimple(password).getBytes());
+            String decodePassword = Base64Util.encode(AesECBUtil.decryptSimple(password).getBytes());
             if (!decodePassword.equals(userList.get(0).getPassword())) {
                 throw ExceptionResultEnum.ERROR.exception("用户名或密码错误");
             }
@@ -426,7 +426,8 @@ public class SysController {
             BasicSchool basicSchool = null;
             if (StringUtils.isNotBlank(code)) {
                 basicSchool = commonCacheService.schoolCache(code);
-            } else {
+            }
+            if (basicSchool == null) {
                 List<BasicSchool> basicSchoolList = basicSchoolService.listByDefaultSchool(true);
                 if (CollectionUtils.isNotEmpty(basicSchoolList)) {
                     basicSchool = basicSchoolList.get(0);
@@ -454,7 +455,7 @@ public class SysController {
             map.put("schoolCode", code);
             // 广药命题界面提示信息
             map.put("examTaskInstr", basicSchool.getExamTaskInstr());
-            map.put("cardSize",Objects.nonNull(cardSize) ? Arrays.asList(
+            map.put("cardSize", Objects.nonNull(cardSize) ? Arrays.asList(
                     cardSize.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", ")) : null);
         } else {
             SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.ADMIN_LOGO_URL);
@@ -641,8 +642,8 @@ public class SysController {
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
     @Aac(auth = false)
     public void filePreview(@ApiParam(value = "附件id", defaultValue = "") @RequestParam(value = "id", required = false) Long id,
-                              HttpServletResponse response) {
-        if(id == null){
+                            HttpServletResponse response) {
+        if (id == null) {
             throw ExceptionResultEnum.ERROR.exception("请求参数有误");
         }
 

+ 1 - 1
teachcloud-common/src/main/resources/mapper/BasicCourseMapper.xml

@@ -90,7 +90,7 @@
                     AND bc.create_id = #{dpr.requestUserId}
                 </if>
                 <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                    AND bc.org_id IN
+                    AND bc.teaching_room_id IN
                     <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
                         #{item}
                     </foreach>