| 
					
				 | 
			
			
				@@ -30,6 +30,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="subject_id_list_" property="subjectIdList" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="organ_id_list_" property="organIdList" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="subject_name_" property="subjectName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result column="organ_name_list_" property="organNameList" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<resultMap type="com.ym.mec.cms.dto.SysNewsInformationDto" id="SysNewsInformationDto" extends="SysNewsInformation"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,6 +62,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="subjectId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				and find_in_set(#{subjectId},sni.subject_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="organId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				and (find_in_set(#{organId},sni.organ_id_list_) or sni.organ_id_list_ is null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="clientName != 'manage'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				<choose> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					<when test="memo != null and memo != ''"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -86,8 +90,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 向数据库增加一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<insert id="insert" parameterType="com.ym.mec.cms.dal.entity.SysNewsInformation" useGeneratedKeys="true" keyColumn="id" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		INSERT INTO sys_news_information (id_,title_,content_,cover_image_,video_cover_image_,type_,online_time_,offline_time_,sub_type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,tenant_id_,attribute1_,attribute2_,subject_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{tenantId},#{attribute1},#{attribute2},#{subjectIdList}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		INSERT INTO sys_news_information (id_,title_,content_,cover_image_,video_cover_image_,type_,online_time_,offline_time_,sub_type_,status_,create_time_,update_time_,link_url_,href_target_,order_,del_flag_,memo_,tenant_id_,attribute1_,attribute2_,subject_id_list_,organ_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		VALUES(#{id},#{title},#{content},#{coverImage},#{videoCoverImage},#{type},#{onlineTime},#{offlineTime},#{subType},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now(),#{linkUrl},#{hrefTarget},#{order},0,#{memo},#{tenantId},#{attribute1},#{attribute2},#{subjectIdList},#{organIdList}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 根据主键查询一条记录 --> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -151,6 +155,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="subjectIdList != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				subject_id_list_ = #{subjectIdList}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="organIdList != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				organ_id_list_ = #{organIdList}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		WHERE id_ = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -162,7 +169,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 分页查询 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="queryPage" resultMap="SysNewsInformation" parameterType="map"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		SELECT sni.*,GROUP_CONCAT(s.name_) subject_name_ FROM sys_news_information sni left join subject s on find_in_set(s.id_,sni.subject_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		SELECT sni.*,GROUP_CONCAT(distinct s.name_) subject_name_,GROUP_CONCAT(distinct o.name_) organ_name_list_ FROM sys_news_information sni left join subject s on find_in_set(s.id_,sni.subject_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		left join organization o on find_in_set(o.id_,sni.organ_id_list_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<include refid="queryCondition" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		group by sni.id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		order by sni.status_ desc,sni.order_ desc,sni.update_time_ desc 
			 |