|
@@ -3,7 +3,7 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.NewsInfoMapper">
|
|
<mapper namespace="com.ruoyi.system.mapper.NewsInfoMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="NewsInfo" id="NewsInfoResult">
|
|
<resultMap type="NewsInfo" id="NewsInfoResult">
|
|
<result property="newsInfoId" column="news_info_id" />
|
|
<result property="newsInfoId" column="news_info_id" />
|
|
<result property="newsInfoTitle" column="news_info_title" />
|
|
<result property="newsInfoTitle" column="news_info_title" />
|
|
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectNewsInfoList" parameterType="NewsInfo" resultMap="NewsInfoResult">
|
|
<select id="selectNewsInfoList" parameterType="NewsInfo" resultMap="NewsInfoResult">
|
|
<include refid="selectNewsInfoVo"/>
|
|
<include refid="selectNewsInfoVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
<if test="newsInfoId != null "> and news_info_id = #{newsInfoId}</if>
|
|
<if test="newsInfoId != null "> and news_info_id = #{newsInfoId}</if>
|
|
<if test="newsInfoTitle != null and newsInfoTitle != ''"> and news_info_title like concat('%', #{newsInfoTitle}, '%')</if>
|
|
<if test="newsInfoTitle != null and newsInfoTitle != ''"> and news_info_title like concat('%', #{newsInfoTitle}, '%')</if>
|
|
<if test="newsInfoAuthor != null and newsInfoAuthor != ''"> and news_info_author = #{newsInfoAuthor}</if>
|
|
<if test="newsInfoAuthor != null and newsInfoAuthor != ''"> and news_info_author = #{newsInfoAuthor}</if>
|
|
@@ -43,12 +43,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="newsInfoContent != null and newsInfoContent != ''"> and news_info_content like concat('%', #{newsInfoContent}, '%')</if>
|
|
<if test="newsInfoContent != null and newsInfoContent != ''"> and news_info_content like concat('%', #{newsInfoContent}, '%')</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ <select id="selectBySiteXML" resultMap="NewsInfoResult">
|
|
|
|
+ SELECT news_info_id,news_info_title FROM news_info
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="selectNewsInfoByNewsInfoId" parameterType="Long" resultMap="NewsInfoResult">
|
|
<select id="selectNewsInfoByNewsInfoId" parameterType="Long" resultMap="NewsInfoResult">
|
|
<include refid="selectNewsInfoVo"/>
|
|
<include refid="selectNewsInfoVo"/>
|
|
where news_info_id = #{newsInfoId}
|
|
where news_info_id = #{newsInfoId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertNewsInfo" parameterType="NewsInfo" useGeneratedKeys="true" keyProperty="newsInfoId">
|
|
<insert id="insertNewsInfo" parameterType="NewsInfo" useGeneratedKeys="true" keyProperty="newsInfoId">
|
|
insert into news_info
|
|
insert into news_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -108,10 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteNewsInfoByNewsInfoIds" parameterType="String">
|
|
<delete id="deleteNewsInfoByNewsInfoIds" parameterType="String">
|
|
- delete from news_info where news_info_id in
|
|
|
|
|
|
+ delete from news_info where news_info_id in
|
|
<foreach item="newsInfoId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="newsInfoId" collection="array" open="(" separator="," close=")">
|
|
#{newsInfoId}
|
|
#{newsInfoId}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|