|
|
@@ -2,11 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.kede.common.dao.NewsMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
<result column="publisher" jdbcType="VARCHAR" property="publisher" />
|
|
|
@@ -14,197 +9,39 @@
|
|
|
<result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
<result column="sort" jdbcType="INTEGER" property="sort" />
|
|
|
+ <result column="content" jdbcType="VARCHAR" property="content" />
|
|
|
<result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
|
|
|
+ <result column="keywords" jdbcType="VARCHAR" property="keywords" />
|
|
|
</resultMap>
|
|
|
- <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- <result column="content" jdbcType="LONGVARCHAR" property="content" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Example_Where_Clause">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- <where>
|
|
|
- <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
- <if test="criteria.valid">
|
|
|
- <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
- <foreach collection="criteria.criteria" item="criterion">
|
|
|
- <choose>
|
|
|
- <when test="criterion.noValue">
|
|
|
- and ${criterion.condition}
|
|
|
- </when>
|
|
|
- <when test="criterion.singleValue">
|
|
|
- and ${criterion.condition} #{criterion.value}
|
|
|
- </when>
|
|
|
- <when test="criterion.betweenValue">
|
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
- </when>
|
|
|
- <when test="criterion.listValue">
|
|
|
- and ${criterion.condition}
|
|
|
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
- #{listItem}
|
|
|
- </foreach>
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </if>
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <sql id="Update_By_Example_Where_Clause">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- <where>
|
|
|
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
- <if test="criteria.valid">
|
|
|
- <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
- <foreach collection="criteria.criteria" item="criterion">
|
|
|
- <choose>
|
|
|
- <when test="criterion.noValue">
|
|
|
- and ${criterion.condition}
|
|
|
- </when>
|
|
|
- <when test="criterion.singleValue">
|
|
|
- and ${criterion.condition} #{criterion.value}
|
|
|
- </when>
|
|
|
- <when test="criterion.betweenValue">
|
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
- </when>
|
|
|
- <when test="criterion.listValue">
|
|
|
- and ${criterion.condition}
|
|
|
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
- #{listItem}
|
|
|
- </foreach>
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </if>
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- id, title, publisher, type, picture_url, status, sort, release_status, create_time,
|
|
|
- release_time
|
|
|
+ id, title, publisher, `type`, picture_url, `status`, sort, content, release_status,
|
|
|
+ create_time, release_time, keywords
|
|
|
</sql>
|
|
|
- <sql id="Blob_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- content
|
|
|
- </sql>
|
|
|
- <select id="selectByExampleWithBLOBs" parameterType="com.kede.common.model.NewsExample" resultMap="ResultMapWithBLOBs">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
- <if test="distinct">
|
|
|
- distinct
|
|
|
- </if>
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- ,
|
|
|
- <include refid="Blob_Column_List" />
|
|
|
- from news
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- <if test="orderByClause != null">
|
|
|
- order by ${orderByClause}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectByExample" parameterType="com.kede.common.model.NewsExample" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- select
|
|
|
- <if test="distinct">
|
|
|
- distinct
|
|
|
- </if>
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from news
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- <if test="orderByClause != null">
|
|
|
- order by ${orderByClause}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- ,
|
|
|
- <include refid="Blob_Column_List" />
|
|
|
from news
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
delete from news
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <delete id="deleteByExample" parameterType="com.kede.common.model.NewsExample">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- delete from news
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
<insert id="insert" parameterType="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- insert into news (id, title, publisher,
|
|
|
- type, picture_url, status,
|
|
|
- sort, release_status, create_time,
|
|
|
- release_time, content)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{publisher,jdbcType=VARCHAR},
|
|
|
- #{type,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
- #{sort,jdbcType=INTEGER}, #{releaseStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{releaseTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
|
|
|
+ insert into news (id, title, publisher,
|
|
|
+ `type`, picture_url, `status`,
|
|
|
+ sort, content, release_status,
|
|
|
+ create_time, release_time, keywords
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{publisher,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
|
|
+ #{sort,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{releaseStatus,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{releaseTime,jdbcType=TIMESTAMP}, #{keywords,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
insert into news
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -217,17 +54,20 @@
|
|
|
publisher,
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
- type,
|
|
|
+ `type`,
|
|
|
</if>
|
|
|
<if test="pictureUrl != null">
|
|
|
picture_url,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status,
|
|
|
+ `status`,
|
|
|
</if>
|
|
|
<if test="sort != null">
|
|
|
sort,
|
|
|
</if>
|
|
|
+ <if test="content != null">
|
|
|
+ content,
|
|
|
+ </if>
|
|
|
<if test="releaseStatus != null">
|
|
|
release_status,
|
|
|
</if>
|
|
|
@@ -237,8 +77,8 @@
|
|
|
<if test="releaseTime != null">
|
|
|
release_time,
|
|
|
</if>
|
|
|
- <if test="content != null">
|
|
|
- content,
|
|
|
+ <if test="keywords != null">
|
|
|
+ keywords,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -263,6 +103,9 @@
|
|
|
<if test="sort != null">
|
|
|
#{sort,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="content != null">
|
|
|
+ #{content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="releaseStatus != null">
|
|
|
#{releaseStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
@@ -272,117 +115,12 @@
|
|
|
<if test="releaseTime != null">
|
|
|
#{releaseTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="content != null">
|
|
|
- #{content,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="keywords != null">
|
|
|
+ #{keywords,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <select id="countByExample" parameterType="com.kede.common.model.NewsExample" resultType="java.lang.Long">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- select count(*) from news
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <update id="updateByExampleSelective" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- update news
|
|
|
- <set>
|
|
|
- <if test="record.id != null">
|
|
|
- id = #{record.id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.title != null">
|
|
|
- title = #{record.title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.publisher != null">
|
|
|
- publisher = #{record.publisher,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.type != null">
|
|
|
- type = #{record.type,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.pictureUrl != null">
|
|
|
- picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.status != null">
|
|
|
- status = #{record.status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.sort != null">
|
|
|
- sort = #{record.sort,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.releaseStatus != null">
|
|
|
- release_status = #{record.releaseStatus,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.createTime != null">
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.releaseTime != null">
|
|
|
- release_time = #{record.releaseTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.content != null">
|
|
|
- content = #{record.content,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
- <update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- update news
|
|
|
- set id = #{record.id,jdbcType=INTEGER},
|
|
|
- title = #{record.title,jdbcType=VARCHAR},
|
|
|
- publisher = #{record.publisher,jdbcType=VARCHAR},
|
|
|
- type = #{record.type,jdbcType=INTEGER},
|
|
|
- picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
- status = #{record.status,jdbcType=INTEGER},
|
|
|
- sort = #{record.sort,jdbcType=INTEGER},
|
|
|
- release_status = #{record.releaseStatus,jdbcType=INTEGER},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- release_time = #{record.releaseTime,jdbcType=TIMESTAMP},
|
|
|
- content = #{record.content,jdbcType=LONGVARCHAR}
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
- <update id="updateByExample" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- update news
|
|
|
- set id = #{record.id,jdbcType=INTEGER},
|
|
|
- title = #{record.title,jdbcType=VARCHAR},
|
|
|
- publisher = #{record.publisher,jdbcType=VARCHAR},
|
|
|
- type = #{record.type,jdbcType=INTEGER},
|
|
|
- picture_url = #{record.pictureUrl,jdbcType=VARCHAR},
|
|
|
- status = #{record.status,jdbcType=INTEGER},
|
|
|
- sort = #{record.sort,jdbcType=INTEGER},
|
|
|
- release_status = #{record.releaseStatus,jdbcType=INTEGER},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- release_time = #{record.releaseTime,jdbcType=TIMESTAMP}
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
update news
|
|
|
<set>
|
|
|
<if test="title != null">
|
|
|
@@ -392,17 +130,20 @@
|
|
|
publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
- type = #{type,jdbcType=INTEGER},
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="pictureUrl != null">
|
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="sort != null">
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="content != null">
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="releaseStatus != null">
|
|
|
release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
@@ -412,66 +153,44 @@
|
|
|
<if test="releaseTime != null">
|
|
|
release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="content != null">
|
|
|
- content = #{content,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="keywords != null">
|
|
|
+ keywords = #{keywords,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
- update news
|
|
|
- set title = #{title,jdbcType=VARCHAR},
|
|
|
- publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
- type = #{type,jdbcType=INTEGER},
|
|
|
- picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
- sort = #{sort,jdbcType=INTEGER},
|
|
|
- release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
- content = #{content,jdbcType=LONGVARCHAR}
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.kede.common.model.News">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Dec 25 16:41:04 CST 2019.
|
|
|
- -->
|
|
|
update news
|
|
|
set title = #{title,jdbcType=VARCHAR},
|
|
|
publisher = #{publisher,jdbcType=VARCHAR},
|
|
|
- type = #{type,jdbcType=INTEGER},
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
picture_url = #{pictureUrl,jdbcType=VARCHAR},
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
sort = #{sort,jdbcType=INTEGER},
|
|
|
+ content = #{content,jdbcType=VARCHAR},
|
|
|
release_status = #{releaseStatus,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- release_time = #{releaseTime,jdbcType=TIMESTAMP}
|
|
|
+ release_time = #{releaseTime,jdbcType=TIMESTAMP},
|
|
|
+ keywords = #{keywords,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectByid" resultType="com.kede.news.bo.OutNews">
|
|
|
select id, title, publisher, type, picture_url pictureUrl, status, sort, release_status releaseStatus,content,
|
|
|
- date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,
|
|
|
+ date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,
|
|
|
date_format(release_time,'%Y-%m-%d %H:%i:%S') as releaseTimeConvert ,release_time releaseTime
|
|
|
from news where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<select id="findNewsList" resultType="com.kede.news.bo.OutNews">
|
|
|
select id, title, publisher, type, picture_url pictureUrl, status, sort, release_status releaseStatus,content,
|
|
|
- date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,
|
|
|
+ date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert,create_time createTime,
|
|
|
date_format(release_time,'%Y-%m-%d %H:%i:%S') as releaseTimeConvert ,release_time releaseTime
|
|
|
from news where 1=1
|
|
|
<if test="n.id!=null">
|
|
|
and id = #{n.id}
|
|
|
</if>
|
|
|
<if test="n.title!=null">
|
|
|
- and title like concat('%',#{n.title},'%')
|
|
|
+ and title like concat('%',#{n.title},'%')
|
|
|
</if>
|
|
|
<if test="n.releaseStatus!=null">
|
|
|
and release_status = #{n.releaseStatus}
|
|
|
@@ -487,7 +206,7 @@
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findNewsCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from news where 1=1
|
|
|
@@ -495,7 +214,7 @@
|
|
|
and id = #{n.id}
|
|
|
</if>
|
|
|
<if test="n.title!=null">
|
|
|
- and title like concat('%',#{n.title},'%')
|
|
|
+ and title like concat('%',#{n.title},'%')
|
|
|
</if>
|
|
|
<if test="n.releaseStatus!=null">
|
|
|
and release_status = #{n.releaseStatus}
|
|
|
@@ -507,5 +226,5 @@
|
|
|
and type = #{n.type}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+
|
|
|
+</mapper>
|