소스 검색

Merge branch 'dev_v3.2.1' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.2.1

xiaof 2 년 전
부모
커밋
a32c0a28c6

+ 5 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/result/CustomPrivilegeResult.java

@@ -28,6 +28,11 @@ public class CustomPrivilegeResult implements Serializable {
 
     }
 
+    public CustomPrivilegeResult(List<PrivilegeDto> customPrivilegeList, List<String> sysPdfSize) {
+        this.customPrivilegeList = customPrivilegeList;
+        this.sysPdfSize = sysPdfSize;
+    }
+
     public CustomPrivilegeResult(List<PrivilegeDto> customPrivilegeList, List<String> sysPdfSize, boolean accountSmsVerify) {
         this.customPrivilegeList = customPrivilegeList;
         this.sysPdfSize = sysPdfSize;

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamCardServiceImpl.java

@@ -537,7 +537,7 @@ public class ExamCardServiceImpl extends ServiceImpl<ExamCardMapper, ExamCard> i
             throw ExceptionResultEnum.ERROR.exception("通用规则未设置");
         }
 
-        if (StringUtils.isBlank(examCardParams.getMakeMethod().name())) {
+        if (Objects.nonNull(examCardParams.getMakeMethod()) && StringUtils.isBlank(examCardParams.getMakeMethod().name())) {
             throw ExceptionResultEnum.ERROR.exception("题卡制作方式不能为空");
         }
         if (examCardParams.getStatus() == null) {

+ 1 - 1
distributed-print-business/src/main/resources/mapper/BasicCardRuleMapper.xml

@@ -37,7 +37,7 @@
             <if test="schoolId != null and schoolId != ''">
                 and school_id = #{schoolId}
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and enable = #{enable}
             </if>
             <if test="name != null and name != ''">

+ 1 - 1
distributed-print-business/src/main/resources/mapper/BasicExamMapper.xml

@@ -40,7 +40,7 @@
             <if test="semesterId != null and semesterId != ''">
                 and a.semester_id = #{semesterId}
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and a.enable = #{enable}
             </if>
         </where>

+ 1 - 1
distributed-print-business/src/main/resources/mapper/BasicPrintConfigMapper.xml

@@ -36,7 +36,7 @@
             <if test="examId != null and examId != ''">
                 and exam_id = #{examId}
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and enable = #{enable}
             </if>
             <if test="createStartTime != null and createStartTime != ''">

+ 1 - 1
distributed-print-business/src/main/resources/mapper/BasicTemplateMapper.xml

@@ -45,7 +45,7 @@
             <if test="name != null and name != ''">
                 and name like concat('%',#{name}, '%')
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and enable = #{enable}
             </if>
             <if test="startTime != null and startTime != ''">

+ 1 - 1
distributed-print-business/src/main/resources/mapper/ExamCardMapper.xml

@@ -197,7 +197,7 @@
             <if test="createMethod != null and createMethod != ''">
                 and create_method = #{createMethod}
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and enable = #{enable}
             </if>
             <if test="createStartTime != null and createStartTime != ''">

+ 1 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/MenuCustomController.java

@@ -72,8 +72,7 @@ public class MenuCustomController {
         List<PrivilegeDto> customPrivilegeList = sysPrivilegeService.addCustomList();
         SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.SYS_PDF_SIZE_LIST);
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置全局pdf格式清单"));
-        SysConfig sysConfigAccount = commonCacheService.addSysConfigCache(SystemConstant.ACCOUNT_SMS_VERIFY);
-        return ResultUtil.ok(new CustomPrivilegeResult(customPrivilegeList, Arrays.asList(sysConfig.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", ")), Objects.nonNull(sysConfigAccount) ? Boolean.valueOf(sysConfigAccount.getConfigValue()) : false));
+        return ResultUtil.ok(new CustomPrivilegeResult(customPrivilegeList, Arrays.asList(sysConfig.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", "))));
     }
 
     @ApiOperation(value = "学校新增/修改自定义菜单权限")

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

@@ -44,13 +44,19 @@
             <if test="name != null and name != ''">
                 and name like concat('%', #{name}, '%')
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and enable = #{enable}
             </if>
         </where>
         union
         select id, school_id, name, enable, type, create_id, create_time, update_id, update_time, default_role, interpret from sys_role
         where default_role = 1 and type <![CDATA[ <> ]]> 'ADMIN'
+            <if test="name != null and name != ''">
+                and name like concat('%', #{name}, '%')
+            </if>
+            <if test="enable != null and enable != '' or enable == 0">
+                and enable = #{enable}
+            </if>
             ) t
         ORDER BY t.create_time
     </select>

+ 4 - 4
teachcloud-common/src/main/resources/mapper/SysUserMapper.xml

@@ -60,7 +60,7 @@
                 and a.school_id = #{schoolId}
             </if>
             <if test="userInfo != null and userInfo != ''">
-                and a.login_name like concat('%', #{userInfo} , '%') or a.real_name like concat('%', #{userInfo} , '%') or a.mobile_number like concat('%', #{userInfo} , '%')
+                and (a.login_name like concat('%', #{userInfo} , '%') or a.real_name like concat('%', #{userInfo} , '%') or a.mobile_number like concat('%', #{userInfo} , '%'))
             </if>
             <if test="orgId != null and orgId != ''">
                 and a.org_id = #{orgId}
@@ -68,7 +68,7 @@
             <if test="roleId != null and roleId != ''">
                 and a.id in (select user_id from sys_user_role b where b.role_id = #{roleId})
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and a.enable = #{enable}
             </if>
         </where>
@@ -98,7 +98,7 @@
             <if test="roleId != null and roleId != ''">
                 and a.id in (select user_id from sys_user_role b where b.role_id = #{roleId})
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and a.enable = #{enable}
             </if>
             <if test="loginName != null and loginName != ''">
@@ -164,7 +164,7 @@
             <if test="realName != null and realName != ''">
                 and a.real_name like concat('%', #{realName} , '%')
             </if>
-            <if test="enable != null">
+            <if test="enable != null and enable != '' or enable == 0">
                 and a.enable = #{enable}
             </if>
         </where>