Kaynağa Gözat

通知列表

change 3 yıl önce
ebeveyn
işleme
6624718c0d

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/impl/InformClassifyServiceImpl.java

@@ -79,6 +79,12 @@ public class InformClassifyServiceImpl extends ServiceImpl<InformClassifyMapper,
         InformClassify update = BeanUtil.toBean(bo, InformClassify.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
+
+        LambdaQueryWrapper<InformClassify> lqw = Wrappers.lambdaQuery();
+        lqw.eq(bo.getParentId() != null, InformClassify::getParentId, bo.getClassifyId());
+        InformClassify informClassify = new InformClassify();
+        informClassify.setStatus(-1);
+        baseMapper.update(informClassify,lqw);
         return this.updateById(update);
     }
 

+ 5 - 5
zhongzheng-system/src/main/resources/mapper/modules/grade/UserPeriodStatusMapper.xml

@@ -28,20 +28,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="userId != null and userId != ''">
             and up.user_id = #{userId}
         </if>
-        <if test="sectionId != null and sectionId != ''">
+        <if test="sectionId != null ">
             and up.section_id = #{sectionId}
         </if>
-        <if test="moduleId != null and moduleId != ''">
+        <if test="moduleId != null ">
             and up.module_id = #{moduleId}
         </if>
 
-        <if test="chapterId != null and chapterId != ''">
+        <if test="chapterId != null a">
             and up.chapter_id = #{chapterId}
         </if>
-        <if test="courseId != null and courseId != ''">
+        <if test="courseId != null ">
             and up.course_id = #{courseId}
         </if>
-        <if test="examId != null and examId != ''">
+        <if test="examId != null ">
             and up.exam_id = #{examId}
         </if>
         ORDER BY

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/inform/InformMapper.xml

@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         i.receipt_status,
         (SELECT COUNT(iu.inform_id) FROM inform_user iu where i.inform_id=iu.inform_id and iu.send_status=1) as receipt_num
         FROM
-        inform i
+        inform i where 1=1
         <if test="status != null and status.size()!=0 ">
             AND i.status in
             <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">