|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.his.mapper.FsArticleMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="FsArticle" id="FsArticleResult">
|
|
|
<result property="articleId" column="article_id" />
|
|
|
<result property="cateId" column="cate_id" />
|
|
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectFsArticleList" parameterType="FsArticle" resultMap="FsArticleResult">
|
|
|
<include refid="selectFsArticleVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="cateId != null "> and cate_id = #{cateId}</if>
|
|
|
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
|
|
<if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
|
@@ -38,29 +38,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
order by article_id desc
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectFsArticleByArticleId" parameterType="Long" resultMap="FsArticleResult">
|
|
|
<include refid="selectFsArticleVo"/>
|
|
|
where article_id = #{articleId}
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectFsArticleListUVO" resultType="com.fs.his.vo.FsArticleListUVO">
|
|
|
- select
|
|
|
- a.*
|
|
|
- from fs_article a
|
|
|
- inner join fs_article_cate c on c.cate_id = a.cate_id
|
|
|
- where c.status = 1 and c.is_del = 0
|
|
|
- <if test = 'maps.cateId != null and maps.cateId !=0'>
|
|
|
- and a.cate_id = #{maps.cateId}
|
|
|
- </if>
|
|
|
- <if test = 'maps.isTui != null'>
|
|
|
- and a.is_tui = #{maps.isTui}
|
|
|
- </if>
|
|
|
- <if test="maps.keyword != null and maps.keyword != ''">
|
|
|
- and a.title like concat('%', #{maps.keyword}, '%')
|
|
|
- </if>
|
|
|
- order by a.article_id desc
|
|
|
- </select>
|
|
|
+
|
|
|
|
|
|
<insert id="insertFsArticle" parameterType="FsArticle" useGeneratedKeys="true" keyProperty="articleId">
|
|
|
insert into fs_article
|
|
@@ -115,9 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteFsArticleByArticleIds" parameterType="String">
|
|
|
- delete from fs_article where article_id in
|
|
|
+ delete from fs_article where article_id in
|
|
|
<foreach item="articleId" collection="array" open="(" separator="," close=")">
|
|
|
#{articleId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|