<?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.yoho.unions.dal.UnionCallbackOrderMapper" > <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionCallbackOrder" > <id column="order_code" property="orderCode" jdbcType="VARCHAR" /> <result column="date_id" property="dateId" jdbcType="INTEGER" /> <result column="uid" property="uid" jdbcType="INTEGER" /> <result column="udid" property="udid" jdbcType="VARCHAR" /> <result column="client_type" property="clientType" jdbcType="INTEGER" /> <result column="idfa" property="idfa" jdbcType="VARCHAR" /> <result column="order_time" property="orderTime" jdbcType="INTEGER" /> <result column="wakeup_date" property="wakeupDate" jdbcType="INTEGER" /> <result column="union_type" property="unionType" jdbcType="VARCHAR" /> <result column="source" property="source" jdbcType="INTEGER" /> <result column="create_time" property="createTime" jdbcType="INTEGER" /> <result column="callback_time" property="callbackTime" jdbcType="INTEGER" /> <result column="is_callback" property="isCallback" jdbcType="INTEGER" /> <result column="is_ufo" property="isUfo" jdbcType="INTEGER" /> </resultMap> <sql id="Base_Column_List" > order_code, date_id, uid, udid, client_type, idfa, order_time, wakeup_date, union_type, source, create_time, callback_time, is_callback,is_ufo </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > select <include refid="Base_Column_List" /> from union_callback_order where order_code = #{orderCode,jdbcType=VARCHAR} </select> <select id="selectExistByOrderCodes" resultType="java.lang.String" > select order_code from union_callback_order where order_code in <foreach collection="orderCodes" item="item" separator="," index="index" open="(" close=")"> #{item} </foreach> </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > delete from union_callback_order where order_code = #{orderCode,jdbcType=VARCHAR} </delete> <insert id="insert" parameterType="com.yoho.unions.dal.model.UnionCallbackOrder" > insert into union_callback_order (order_code, date_id, uid, udid, client_type, idfa, order_time, wakeup_date, union_type, source, create_time, callback_time, is_callback, is_ufo) values (#{orderCode,jdbcType=VARCHAR}, #{dateId,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{udid,jdbcType=VARCHAR}, #{clientType,jdbcType=INTEGER}, #{idfa,jdbcType=VARCHAR}, #{orderTime,jdbcType=INTEGER}, #{wakeupDate,jdbcType=INTEGER}, #{unionType,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{callbackTime,jdbcType=INTEGER}, #{isCallback,jdbcType=INTEGER}, #{is_ufo,jdbcType=INTEGER}) </insert> <insert id="insertSelective" parameterType="com.yoho.unions.dal.model.UnionCallbackOrder" > insert into union_callback_order <trim prefix="(" suffix=")" suffixOverrides="," > <if test="orderCode != null" > order_code, </if> <if test="dateId != null" > date_id, </if> <if test="uid != null" > uid, </if> <if test="udid != null" > udid, </if> <if test="clientType != null" > client_type, </if> <if test="idfa != null" > idfa, </if> <if test="orderTime != null" > order_time, </if> <if test="wakeupDate != null" > wakeup_date, </if> <if test="unionType != null" > union_type, </if> <if test="source != null" > source, </if> <if test="createTime != null" > create_time, </if> <if test="callbackTime != null" > callback_time, </if> <if test="isCallback != null" > is_callback, </if> <if test="isUfo != null" > is_ufo, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="orderCode != null" > #{orderCode,jdbcType=VARCHAR}, </if> <if test="dateId != null" > #{dateId,jdbcType=INTEGER}, </if> <if test="uid != null" > #{uid,jdbcType=INTEGER}, </if> <if test="udid != null" > #{udid,jdbcType=VARCHAR}, </if> <if test="clientType != null" > #{clientType,jdbcType=INTEGER}, </if> <if test="idfa != null" > #{idfa,jdbcType=VARCHAR}, </if> <if test="orderTime != null" > #{orderTime,jdbcType=INTEGER}, </if> <if test="wakeupDate != null" > #{wakeupDate,jdbcType=INTEGER}, </if> <if test="unionType != null" > #{unionType,jdbcType=VARCHAR}, </if> <if test="source != null" > #{source,jdbcType=INTEGER}, </if> <if test="createTime != null" > #{createTime,jdbcType=INTEGER}, </if> <if test="callbackTime != null" > #{callbackTime,jdbcType=INTEGER}, </if> <if test="isCallback != null" > #{isCallback,jdbcType=INTEGER}, </if> <if test="isUfo != null" > #{isUfo,jdbcType=INTEGER}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionCallbackOrder" > update union_callback_order <set > <if test="dateId != null" > date_id = #{dateId,jdbcType=INTEGER}, </if> <if test="uid != null" > uid = #{uid,jdbcType=INTEGER}, </if> <if test="udid != null" > udid = #{udid,jdbcType=VARCHAR}, </if> <if test="clientType != null" > client_type = #{clientType,jdbcType=INTEGER}, </if> <if test="idfa != null" > idfa = #{idfa,jdbcType=VARCHAR}, </if> <if test="orderTime != null" > order_time = #{orderTime,jdbcType=INTEGER}, </if> <if test="wakeupDate != null" > wakeup_date = #{wakeupDate,jdbcType=INTEGER}, </if> <if test="unionType != null" > union_type = #{unionType,jdbcType=VARCHAR}, </if> <if test="source != null" > source = #{source,jdbcType=INTEGER}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=INTEGER}, </if> <if test="callbackTime != null" > callback_time = #{callbackTime,jdbcType=INTEGER}, </if> <if test="isCallback != null" > is_callback = #{isCallback,jdbcType=INTEGER}, </if> <if test="isUfo != null" > is_ufo = #{isUfo,jdbcType=INTEGER}, </if> </set> where order_code = #{orderCode,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionCallbackOrder" > update union_callback_order set date_id = #{dateId,jdbcType=INTEGER}, uid = #{uid,jdbcType=INTEGER}, udid = #{udid,jdbcType=VARCHAR}, client_type = #{clientType,jdbcType=INTEGER}, idfa = #{idfa,jdbcType=VARCHAR}, order_time = #{orderTime,jdbcType=INTEGER}, wakeup_date = #{wakeupDate,jdbcType=INTEGER}, union_type = #{unionType,jdbcType=VARCHAR}, source = #{source,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=INTEGER}, callback_time = #{callbackTime,jdbcType=INTEGER}, is_ufo = #{isUfo,jdbcType=INTEGER}, is_callback = #{isCallback,jdbcType=INTEGER} where order_code = #{orderCode,jdbcType=VARCHAR} </update> <update id="updateCallback" parameterType="com.yoho.unions.dal.model.UnionCallbackOrder" > update union_callback_order set callback_time = #{callbackTime,jdbcType=INTEGER}, is_callback = #{isCallback,jdbcType=INTEGER} where order_code = #{orderCode,jdbcType=VARCHAR} </update> </mapper>