<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.xzx.gc.system.mapper.SysNewsMapper">
|
|
<select id="selectSysNewsListVo" resultType="com.xzx.gc.system.vo.SysNewsListVo">
|
select * from xzx_sys_news
|
where del_flag=0
|
order by sort ASC
|
</select>
|
|
<select id="selectById" resultType="com.xzx.gc.entity.SysNews">
|
select * from xzx_sys_news where news_id = #{id}
|
order by sort ASC
|
</select>
|
|
|
<update id="updateById" parameterType="java.util.Map">
|
update xzx_sys_news
|
set del_flag=1
|
where news_id = #{newsId}
|
</update>
|
|
|
<update id="updateStatusById" parameterType="java.util.Map">
|
update xzx_sys_news
|
set status = #{status}
|
where news_id = #{newsId}
|
</update>
|
|
<update id="updateSysNews" parameterType="java.util.Map">
|
update xzx_sys_news
|
set title = #{title},
|
content = #{content},
|
sort = #{sort}
|
where news_id = #{newsId}
|
</update>
|
|
<select id="selectSysNews" resultType="com.xzx.gc.system.vo.ApiNewsListVo">
|
select * from xzx_sys_news
|
where del_flag=0 and status = 2
|
order by sort ASC
|
</select>
|
|
<select id="selectSysNewsInfo" resultType="com.xzx.gc.system.vo.ApiNewsInfoVo">
|
select * from xzx_sys_news
|
where news_id = #{record.id}
|
order by sort ASC
|
</select>
|
|
|
</mapper>
|