展览系统
This commit is contained in:
parent
8445b55c99
commit
f496348f4d
@ -70,4 +70,14 @@ public interface IArticleContentDao {
|
|||||||
* @throws SearchException
|
* @throws SearchException
|
||||||
*/
|
*/
|
||||||
Integer countArticleCount(Map<String, Object> params) throws SearchException;
|
Integer countArticleCount(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文章内容列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<ArticleContentDTO> listArticleContentAll(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -126,4 +126,14 @@ public interface IArticleContentService {
|
|||||||
* @throws SearchException
|
* @throws SearchException
|
||||||
*/
|
*/
|
||||||
SuccessResultData<Integer> countArticleCount(Map<String, Object> params) throws SearchException;
|
SuccessResultData<Integer> countArticleCount(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文章内容列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<ArticleContentDTO> listArticleContentAll(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -160,4 +160,9 @@ public class ArticleContentServiceImpl extends AbstractService implements IArtic
|
|||||||
Integer countArticleCount = articleContentDao.countArticleCount(params);
|
Integer countArticleCount = articleContentDao.countArticleCount(params);
|
||||||
return new SuccessResultData<>(countArticleCount == null ? 0 : countArticleCount);
|
return new SuccessResultData<>(countArticleCount == null ? 0 : countArticleCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ArticleContentDTO> listArticleContentAll(Map<String, Object> params) throws SearchException {
|
||||||
|
return articleContentDao.listArticleContentAll(params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,69 @@
|
|||||||
<result column="summary_join_by_article_category_id" property="summaryJoinByArticleCategoryId"/>
|
<result column="summary_join_by_article_category_id" property="summaryJoinByArticleCategoryId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 文章内容列表 -->
|
||||||
|
<select id="listArticleContentAll" parameterType="map" resultMap="articleContentDTO">
|
||||||
|
SELECT
|
||||||
|
t1.title,
|
||||||
|
t1.sub_title,
|
||||||
|
t1.summary,
|
||||||
|
t1.source,
|
||||||
|
t1.author,
|
||||||
|
t1.publish_date,
|
||||||
|
t1.is_publish,
|
||||||
|
t1.content,
|
||||||
|
t1.article_category_id,
|
||||||
|
jt1.title title_join_by_article_category_id,
|
||||||
|
jt1.summary summary_join_by_article_category_id,
|
||||||
|
t1.sort,
|
||||||
|
t1.article_content_id
|
||||||
|
FROM
|
||||||
|
article_content t1
|
||||||
|
INNER JOIN
|
||||||
|
article_category jt1
|
||||||
|
ON
|
||||||
|
t1.article_category_id = jt1.article_category_id
|
||||||
|
AND
|
||||||
|
jt1.is_delete = 0
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
<if test="keywords != null and keywords != ''">
|
||||||
|
AND
|
||||||
|
t1.title LIKE CONCAT('%s', #{keywords}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="articleCategoryId != null and articleCategoryId != ''">
|
||||||
|
AND
|
||||||
|
t1.article_category_id = #{articleCategoryId}
|
||||||
|
</if>
|
||||||
|
<if test="articleContentIds != null and articleContentIds.size > 0">
|
||||||
|
AND
|
||||||
|
t1.article_content_id IN
|
||||||
|
<foreach collection="articleContentIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{articleContentIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="creator != null and creator != ''">
|
||||||
|
AND
|
||||||
|
t1.creator = #{creator}
|
||||||
|
</if>
|
||||||
|
<if test="creators != null and creators.size > 0">
|
||||||
|
AND
|
||||||
|
t1.creator IN
|
||||||
|
<foreach collection="creators" index="index" open="(" separator="," close=")">
|
||||||
|
#{creators[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
ORDER BY t1.publish_date DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 新增文章内容 -->
|
<!-- 新增文章内容 -->
|
||||||
<insert id="saveArticleContent" parameterType="map">
|
<insert id="saveArticleContent" parameterType="map">
|
||||||
INSERT INTO article_content(
|
INSERT INTO article_content(
|
||||||
@ -168,7 +231,7 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND
|
AND
|
||||||
t1.title LIKE CONCAT('%s', #{keywords}, '%')
|
t1.title LIKE CONCAT('%', #{keywords}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
AND
|
AND
|
||||||
@ -200,6 +263,7 @@
|
|||||||
#{creators[${index}]}
|
#{creators[${index}]}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY t1.publish_date DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 统计文章数量 -->
|
<!-- 统计文章数量 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user