301 lines
11 KiB
XML
301 lines
11 KiB
XML
<?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.yutou.mybatis.dao.MAppHomeConfigMapper">
|
|
<resultMap id="BaseResultMap" type="com.yutou.mybatis.MAppHomeConfig">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="url" jdbcType="VARCHAR" property="url" />
|
|
<result column="startdate" jdbcType="TIMESTAMP" property="startdate" />
|
|
<result column="enddate" jdbcType="TIMESTAMP" property="enddate" />
|
|
<result column="state" jdbcType="INTEGER" property="state" />
|
|
</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 Mon May 13 14:48:33 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 Mon May 13 14:48:33 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 Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
id, name, url, startdate, enddate, state
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.yutou.mybatis.MAppHomeConfigExample" resultMap="BaseResultMap">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from m_app_home_config
|
|
<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="BaseResultMap">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from m_app_home_config
|
|
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 Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
delete from m_app_home_config
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.yutou.mybatis.MAppHomeConfigExample">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
delete from m_app_home_config
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.yutou.mybatis.MAppHomeConfig">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
SELECT LAST_INSERT_ID()
|
|
</selectKey>
|
|
insert into m_app_home_config (name, url, startdate,
|
|
enddate, state)
|
|
values (#{name,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{startdate,jdbcType=TIMESTAMP},
|
|
#{enddate,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.yutou.mybatis.MAppHomeConfig">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
|
SELECT LAST_INSERT_ID()
|
|
</selectKey>
|
|
insert into m_app_home_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="url != null">
|
|
url,
|
|
</if>
|
|
<if test="startdate != null">
|
|
startdate,
|
|
</if>
|
|
<if test="enddate != null">
|
|
enddate,
|
|
</if>
|
|
<if test="state != null">
|
|
state,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="url != null">
|
|
#{url,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startdate != null">
|
|
#{startdate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="enddate != null">
|
|
#{enddate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="state != null">
|
|
#{state,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.yutou.mybatis.MAppHomeConfigExample" resultType="java.lang.Long">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
select count(*) from m_app_home_config
|
|
<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 Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
update m_app_home_config
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.url != null">
|
|
url = #{record.url,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.startdate != null">
|
|
startdate = #{record.startdate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.enddate != null">
|
|
enddate = #{record.enddate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.state != null">
|
|
state = #{record.state,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
<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 Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
update m_app_home_config
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
url = #{record.url,jdbcType=VARCHAR},
|
|
startdate = #{record.startdate,jdbcType=TIMESTAMP},
|
|
enddate = #{record.enddate,jdbcType=TIMESTAMP},
|
|
state = #{record.state,jdbcType=INTEGER}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yutou.mybatis.MAppHomeConfig">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
update m_app_home_config
|
|
<set>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="url != null">
|
|
url = #{url,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="startdate != null">
|
|
startdate = #{startdate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="enddate != null">
|
|
enddate = #{enddate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="state != null">
|
|
state = #{state,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.yutou.mybatis.MAppHomeConfig">
|
|
<!--
|
|
WARNING - @mbg.generated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
This element was generated on Mon May 13 14:48:33 CST 2019.
|
|
-->
|
|
update m_app_home_config
|
|
set name = #{name,jdbcType=VARCHAR},
|
|
url = #{url,jdbcType=VARCHAR},
|
|
startdate = #{startdate,jdbcType=TIMESTAMP},
|
|
enddate = #{enddate,jdbcType=TIMESTAMP},
|
|
state = #{state,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper> |