فهرست منبع

修复若干BUG

wangliang 2 سال پیش
والد
کامیت
9f5667d1e4

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

@@ -531,7 +531,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 != ''">

+ 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>