Kaynağa Gözat

fix 会议,活动,通知修改好

Administrator 1 yıl önce
ebeveyn
işleme
264b0dcac7

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxNoticeServiceImpl.java

@@ -52,6 +52,13 @@ public class ZxNoticeServiceImpl implements IZxNoticeService
         zxUserNotice.setZxNoticeId(zxNoticeId);
         zxUserNotice.setZxNoticeType("Y");
         zxNoticeMapper.updateZxNoticeUser(zxUserNotice);
+        ZxFj zxFj = new ZxFj();
+        zxFj.setSourceId(zxNotice.getZxNoticeId());
+        zxFj.setType(THR);
+        List<ZxFj> zxFjs = zxFjMapper.selectZxFjList(zxFj);
+        if (zxFjs != null){
+            zxNotice.setZxFjList(zxFjs);
+        }
         return zxNotice;
     }
 
@@ -79,6 +86,7 @@ public class ZxNoticeServiceImpl implements IZxNoticeService
     public int insertZxNotice(ZxNotice zxNotice)
     {
         zxNotice.setCreateTime(DateUtils.getNowDate());
+        zxNotice.setIssuerTime(DateUtils.getNowDate());
         int rows = zxNoticeMapper.insertZxNotice(zxNotice);
         List<SysUser> sysUsers = sysUserMapper.selectUserList(new SysUser());
         if (sysUsers != null && sysUsers.size() >0){

+ 4 - 9
ruoyi-system/src/main/resources/mapper/system/ZxNoticeMapper.xml

@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap id="ZxNoticeZxUserNoticeResult" type="ZxNotice" extends="ZxNoticeResult">
         <collection property="zxUserNoticeList" notNullColumn="sub_user_id" javaType="java.util.List" resultMap="ZxUserNoticeResult" />
-        <collection property="zxFjList" notNullColumn="fj_source_id" javaType="java.util.List" resultMap="ZxFjResult" />
+        <collection property="zxFjList"  javaType="java.util.List" resultMap="ZxFjResult" />
 
     </resultMap>
 
@@ -57,13 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time,
             a.remark,
             b.user_id as sub_user_id,
-            b.zx_notice_type  as type,
-            f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
+            b.zx_notice_type  as type
             from zx_notice a
             left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
-            left join zx_fj f on f.source_id = a.zx_notice_id
             <where>
-                f.type = '3'
             <if test="userId != null">and b.user_id = #{userId}</if>
             <if test="zxNoticeId != null">and a.zx_notice_id = #{zxNoticeId}</if>
             <if test="noticeTitle != null  and noticeTitle != ''">and a.notice_title = #{noticeTitle}</if>
@@ -84,12 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <select id="selectZxNoticeByZxNoticeId" parameterType="Long" resultMap="ZxNoticeZxUserNoticeResult">
         select a.zx_notice_id, a.notice_title, a.notice_type, a.notice_content, a.status, a.issuer, a.issuer_dept, a.issuer_dept_id, a.issuer_time, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
-        b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time,
-        f.id as fj_id,f.main_id as fj_main_id, f.source_id as fj_source_id, f.name as fj_name, f.url as fj_url, f.type as fj_type,f.stytle as fj_stytle
+        b.user_id as sub_user_id, b.user_name as sub_user_name,b.zx_notice_type as sub_zx_notice_type, b.zx_notice_id as sub_zx_notice_id, b.create_time as sub_create_time
         from zx_notice a
         left join zx_user_notice b on b.zx_notice_id = a.zx_notice_id
-        left join zx_fj f on f.source_id = a.zx_notice_id
-        where a.zx_notice_id = #{zxNoticeId} and f.type = '3'
+        where a.zx_notice_id = #{zxNoticeId}
     </select>
     <select id="selectZxUserNoticeByUserIdAndNoticeId" resultType="java.lang.Integer">
         select count(1) from zx_user_notice where user_id = #{userId} and zx_notice_id =#{zxNoticeId}