|
@@ -48,15 +48,20 @@
|
|
|
where article_id = #{articleId}
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<select id="selectArticlePage" resultType="com.liangjian11.wx.mp.modle.content.Article">
|
|
|
- select * from (select a.article_id, article_column_id,article_title ,article_author_id,article_createt_date,
|
|
|
- article_realpageviews, article_status,article_typographic_type,
|
|
|
- array_to_string(ARRAY[array_agg(ad.department_id)], ',') from content_article_department ad where ad.article_id = a.article_id) as department_id
|
|
|
+ select * from
|
|
|
+ (select a.article_id, article_column_id,article_classification_id,article_title ,
|
|
|
+ article_author_id,article_createt_date, article_realpageviews, article_status,article_typographic_type,
|
|
|
+ ( select array_to_string(ARRAY[array_agg(ad.department_id)], ',') from content_article_department ad where ad.article_id = a.article_id) as department_id
|
|
|
from content_article a) src
|
|
|
${filterSql} ORDER BY src.article_createt_date DESC LIMIT #{pageSize} offset #{start}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectCountArticle" >
|
|
|
+ select count(*) from content_article
|
|
|
+ ${filterSql}
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertArticle" useGeneratedKeys="true" keyProperty="articleId">
|
|
|
insert into content_article(article_classification_id,article_column_id,article_title,article_status,
|
|
|
article_author_id,article_summary,article_createt_date,article_link_address, article_photoaddress,
|