<?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="cn.com.basic.face.discern.baseApi.mapper.user.FacilityPositionDao" >
|
<resultMap id="BaseResultMap" type="cn.com.basic.face.discern.baseApi.entity.user.FacilityPosition" >
|
<result column="positionID" property="positionid" jdbcType="VARCHAR" />
|
<result column="companyID" property="companyid" jdbcType="VARCHAR" />
|
<result column="positionLabel" property="positionlabel" jdbcType="VARCHAR" />
|
<result column="provice" property="provice" jdbcType="VARCHAR" />
|
<result column="city" property="city" jdbcType="VARCHAR" />
|
<result column="county" property="county" jdbcType="VARCHAR" />
|
<result column="town" property="town" jdbcType="VARCHAR" />
|
<result column="village" property="village" jdbcType="VARCHAR" />
|
<result column="dataStatus" property="datastatus" jdbcType="TINYINT" />
|
<result column="createTime" property="createtime" jdbcType="TIMESTAMP" />
|
<result column="creator" property="creator" jdbcType="VARCHAR" />
|
<result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
|
<result column="updator" property="updator" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Example_Where_Clause" >
|
<where >
|
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
<if test="criteria.valid" >
|
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
#{listItem}
|
</foreach>
|
</when>
|
</choose>
|
</foreach>
|
</trim>
|
</if>
|
</foreach>
|
</where>
|
</sql>
|
<sql id="Update_By_Example_Where_Clause" >
|
<where >
|
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
<if test="criteria.valid" >
|
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
#{listItem}
|
</foreach>
|
</when>
|
</choose>
|
</foreach>
|
</trim>
|
</if>
|
</foreach>
|
</where>
|
</sql>
|
<sql id="Base_Column_List" >
|
<if test="fields == null" >
|
positionID, companyID, positionLabel, provice, city, county, town, village, dataStatus,
|
createTime, creator, updatetime, updator
|
</if>
|
<if test="fields != null" >
|
${fields}
|
</if>
|
</sql>
|
<select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.com.basic.face.discern.baseApi.entity.user.FacilityPositionQuery" >
|
select
|
<if test="distinct" >
|
distinct
|
</if>
|
<include refid="Base_Column_List" />
|
from t_facility_position
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
<if test="orderByClause != null" >
|
order by ${orderByClause}
|
</if>
|
<if test="startRow != null" >
|
limit #{startRow} , #{pageSize}
|
</if>
|
</select>
|
<delete id="deleteByExample" parameterType="cn.com.basic.face.discern.baseApi.entity.user.FacilityPositionQuery" >
|
delete from t_facility_position
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
</delete>
|
<insert id="insert" parameterType="cn.com.basic.face.discern.baseApi.entity.user.FacilityPosition" >
|
insert into t_facility_position (positionID, companyID, positionLabel,
|
provice, city, county,
|
town, village, dataStatus,
|
createTime, creator, updatetime,
|
updator)
|
values (#{positionid,jdbcType=VARCHAR}, #{companyid,jdbcType=VARCHAR}, #{positionlabel,jdbcType=VARCHAR},
|
#{provice,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{county,jdbcType=VARCHAR},
|
#{town,jdbcType=VARCHAR}, #{village,jdbcType=VARCHAR}, #{datastatus,jdbcType=TINYINT},
|
#{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
|
#{updator,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="cn.com.basic.face.discern.baseApi.entity.user.FacilityPosition" >
|
insert into t_facility_position
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="positionid != null" >
|
positionID,
|
</if>
|
<if test="companyid != null" >
|
companyID,
|
</if>
|
<if test="positionlabel != null" >
|
positionLabel,
|
</if>
|
<if test="provice != null" >
|
provice,
|
</if>
|
<if test="city != null" >
|
city,
|
</if>
|
<if test="county != null" >
|
county,
|
</if>
|
<if test="town != null" >
|
town,
|
</if>
|
<if test="village != null" >
|
village,
|
</if>
|
<if test="datastatus != null" >
|
dataStatus,
|
</if>
|
<if test="createtime != null" >
|
createTime,
|
</if>
|
<if test="creator != null" >
|
creator,
|
</if>
|
<if test="updatetime != null" >
|
updatetime,
|
</if>
|
<if test="updator != null" >
|
updator,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="positionid != null" >
|
#{positionid,jdbcType=VARCHAR},
|
</if>
|
<if test="companyid != null" >
|
#{companyid,jdbcType=VARCHAR},
|
</if>
|
<if test="positionlabel != null" >
|
#{positionlabel,jdbcType=VARCHAR},
|
</if>
|
<if test="provice != null" >
|
#{provice,jdbcType=VARCHAR},
|
</if>
|
<if test="city != null" >
|
#{city,jdbcType=VARCHAR},
|
</if>
|
<if test="county != null" >
|
#{county,jdbcType=VARCHAR},
|
</if>
|
<if test="town != null" >
|
#{town,jdbcType=VARCHAR},
|
</if>
|
<if test="village != null" >
|
#{village,jdbcType=VARCHAR},
|
</if>
|
<if test="datastatus != null" >
|
#{datastatus,jdbcType=TINYINT},
|
</if>
|
<if test="createtime != null" >
|
#{createtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="creator != null" >
|
#{creator,jdbcType=VARCHAR},
|
</if>
|
<if test="updatetime != null" >
|
#{updatetime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updator != null" >
|
#{updator,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<select id="countByExample" parameterType="cn.com.basic.face.discern.baseApi.entity.user.FacilityPositionQuery" resultType="java.lang.Integer" >
|
select count(*) from t_facility_position
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
</select>
|
<update id="updateByExampleSelective" parameterType="map" >
|
update t_facility_position
|
<set >
|
<if test="record.positionid != null" >
|
positionID = #{record.positionid,jdbcType=VARCHAR},
|
</if>
|
<if test="record.companyid != null" >
|
companyID = #{record.companyid,jdbcType=VARCHAR},
|
</if>
|
<if test="record.positionlabel != null" >
|
positionLabel = #{record.positionlabel,jdbcType=VARCHAR},
|
</if>
|
<if test="record.provice != null" >
|
provice = #{record.provice,jdbcType=VARCHAR},
|
</if>
|
<if test="record.city != null" >
|
city = #{record.city,jdbcType=VARCHAR},
|
</if>
|
<if test="record.county != null" >
|
county = #{record.county,jdbcType=VARCHAR},
|
</if>
|
<if test="record.town != null" >
|
town = #{record.town,jdbcType=VARCHAR},
|
</if>
|
<if test="record.village != null" >
|
village = #{record.village,jdbcType=VARCHAR},
|
</if>
|
<if test="record.datastatus != null" >
|
dataStatus = #{record.datastatus,jdbcType=TINYINT},
|
</if>
|
<if test="record.createtime != null" >
|
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="record.creator != null" >
|
creator = #{record.creator,jdbcType=VARCHAR},
|
</if>
|
<if test="record.updatetime != null" >
|
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="record.updator != null" >
|
updator = #{record.updator,jdbcType=VARCHAR},
|
</if>
|
</set>
|
<if test="_parameter != null" >
|
<include refid="Update_By_Example_Where_Clause" />
|
</if>
|
</update>
|
<update id="updateByExample" parameterType="map" >
|
update t_facility_position
|
set positionID = #{record.positionid,jdbcType=VARCHAR},
|
companyID = #{record.companyid,jdbcType=VARCHAR},
|
positionLabel = #{record.positionlabel,jdbcType=VARCHAR},
|
provice = #{record.provice,jdbcType=VARCHAR},
|
city = #{record.city,jdbcType=VARCHAR},
|
county = #{record.county,jdbcType=VARCHAR},
|
town = #{record.town,jdbcType=VARCHAR},
|
village = #{record.village,jdbcType=VARCHAR},
|
dataStatus = #{record.datastatus,jdbcType=TINYINT},
|
createTime = #{record.createtime,jdbcType=TIMESTAMP},
|
creator = #{record.creator,jdbcType=VARCHAR},
|
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
updator = #{record.updator,jdbcType=VARCHAR}
|
<if test="_parameter != null" >
|
<include refid="Update_By_Example_Where_Clause" />
|
</if>
|
</update>
|
</mapper>
|