|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.system.mapper.NewsInfoMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="NewsInfo" id="NewsInfoResult">
|
|
|
<result property="newsInfoId" column="news_info_id" />
|
|
|
<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">
|
|
|
<include refid="selectNewsInfoVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<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="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>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
+ <select id="selectBySiteXML" resultMap="NewsInfoResult">
|
|
|
+ SELECT news_info_id,news_info_title FROM news_info
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectNewsInfoByNewsInfoId" parameterType="Long" resultMap="NewsInfoResult">
|
|
|
<include refid="selectNewsInfoVo"/>
|
|
|
where news_info_id = #{newsInfoId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertNewsInfo" parameterType="NewsInfo" useGeneratedKeys="true" keyProperty="newsInfoId">
|
|
|
insert into news_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -108,10 +112,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<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=")">
|
|
|
#{newsInfoId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
|
|
|
-</mapper>
|
|
|
+</mapper>
|