|
@@ -0,0 +1,217 @@
|
|
|
+<?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.yx.face.dao.UserFaceRecordsFromDao">
|
|
|
+ <resultMap id="BaseResultMap" type="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="user_face_records_id" jdbcType="INTEGER" property="userFaceRecordsId" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ <result column="img_base" jdbcType="LONGVARBINARY" property="imgBase" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <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">
|
|
|
+ <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">
|
|
|
+ id, user_face_records_id
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ img_base
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExampleWithBLOBs" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom" resultMap="ResultMapWithBLOBs">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user_face_records_from
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByExample" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from user_face_records_from
|
|
|
+ <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">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ ,
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
+ from user_face_records_from
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from user_face_records_from
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ delete from user_face_records_from
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ insert into user_face_records_from (id, user_face_records_id, img_base
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{userFaceRecordsId,jdbcType=INTEGER}, #{imgBase,jdbcType=LONGVARBINARY}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ insert into user_face_records_from
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="userFaceRecordsId != null">
|
|
|
+ user_face_records_id,
|
|
|
+ </if>
|
|
|
+ <if test="imgBase != null">
|
|
|
+ img_base,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="userFaceRecordsId != null">
|
|
|
+ #{userFaceRecordsId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="imgBase != null">
|
|
|
+ #{imgBase,jdbcType=LONGVARBINARY},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom" resultType="java.lang.Long">
|
|
|
+ select count(*) from user_face_records_from
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update user_face_records_from
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.userFaceRecordsId != null">
|
|
|
+ user_face_records_id = #{record.userFaceRecordsId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.imgBase != null">
|
|
|
+ img_base = #{record.imgBase,jdbcType=LONGVARBINARY},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExampleWithBLOBs" parameterType="map">
|
|
|
+ update user_face_records_from
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ user_face_records_id = #{record.userFaceRecordsId,jdbcType=INTEGER},
|
|
|
+ img_base = #{record.imgBase,jdbcType=LONGVARBINARY}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update user_face_records_from
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ user_face_records_id = #{record.userFaceRecordsId,jdbcType=INTEGER}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ update user_face_records_from
|
|
|
+ <set>
|
|
|
+ <if test="userFaceRecordsId != null">
|
|
|
+ user_face_records_id = #{userFaceRecordsId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="imgBase != null">
|
|
|
+ img_base = #{imgBase,jdbcType=LONGVARBINARY},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ update user_face_records_from
|
|
|
+ set user_face_records_id = #{userFaceRecordsId,jdbcType=INTEGER},
|
|
|
+ img_base = #{imgBase,jdbcType=LONGVARBINARY}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.yx.face.model.entity.UserFaceRecordsFrom">
|
|
|
+ update user_face_records_from
|
|
|
+ set user_face_records_id = #{userFaceRecordsId,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|