|
@@ -31,18 +31,9 @@
|
|
|
|
|
|
<resultMap type="com.ruoyi.common.core.domain.entity.ImageDatas" id="ImageDataResult">
|
|
|
<result property="imageId" column="image_id"/>
|
|
|
- <result property="newsId" column="news_id"/>
|
|
|
<result property="imageName" column="image_name"/>
|
|
|
<result property="imageContent" column="image_content"/>
|
|
|
<result property="imageIntroduce" column="image_introduce"/>
|
|
|
- <result property="status" column="status"/>
|
|
|
- <result property="type" column="type"/>
|
|
|
- <result property="isDel" column="is_del"/>
|
|
|
- <result property="createBy" column="create_by"/>
|
|
|
- <result property="createTime" column="create_time"/>
|
|
|
- <result property="updateBy" column="update_by"/>
|
|
|
- <result property="updateTime" column="update_time"/>
|
|
|
- <result property="remark" column="remark"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectColumnNewsVo">
|
|
@@ -95,14 +86,14 @@
|
|
|
i.image_id, i.image_name,i.image_content,i.image_introduce
|
|
|
from column_news n
|
|
|
left join column_navigation_bar c on n.column_id = c.column_id
|
|
|
- left join image_data i on n.news_id = i.news_id
|
|
|
+ left join image_data i on n.news_id = i.news_id and i.is_del = 'N'
|
|
|
where n.news_id = #{newsId}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectColumnNewsDetailMenHu" parameterType="Integer" resultMap="ColumnNewsResult">
|
|
|
select n.news_id, n.news_title, n.column_id, n.news_content,n.is_rotation,n.views_num,n.reprint_url,n.author, n.status,n.release_time, n.reason, n.create_by, n.create_time, n.update_by, n.update_time, n.remark,n.news_image,
|
|
|
i.image_id, i.image_name,i.image_content,i.image_introduce
|
|
|
- from column_news n left join image_data i on n.news_id = i.news_id
|
|
|
+ from column_news n left join image_data i on n.news_id = i.news_id and i.is_del = 'N'
|
|
|
where n.news_id = #{newsId} order by n.create_time DESC,n.update_time DESC
|
|
|
</select>
|
|
|
|