<?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.boco.nbd.wios.manage.mapper.extdb.SingleMapper" > <resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Single" > <id column="id" property="id" jdbcType="VARCHAR" /> <result column="type" property="type" jdbcType="INTEGER" /> <result column="receiver" property="receiver" jdbcType="VARCHAR" /> <result column="shipping_address" property="shippingAddress" jdbcType="VARCHAR" /> <result column="contact_number" property="contactNumber" jdbcType="VARCHAR" /> <result column="status" property="status" jdbcType="INTEGER" /> <result column="info" property="info" jdbcType="VARCHAR" /> <result column="transfer_in" property="transferIn" jdbcType="VARCHAR" /> <result column="transfer_out" property="transferOut" jdbcType="VARCHAR" /> <result column="appkey" property="appkey" jdbcType="VARCHAR" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="create_account" property="createAccount" jdbcType="VARCHAR" /> <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" /> <result column="modify_account" property="modifyAccount" 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" > id, type, receiver, shipping_address, contact_number, status, info, transfer_in, transfer_out, appkey, create_time, create_account, modify_time, modify_account </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" > select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from t_single <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > select <include refid="Base_Column_List" /> from t_single where id = #{id,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > delete from t_single where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" > delete from t_single <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" > insert into t_single (id, type, receiver, shipping_address, contact_number, status, info, transfer_in, transfer_out, appkey, create_time, create_account, modify_time, modify_account) values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{receiver,jdbcType=VARCHAR}, #{shippingAddress,jdbcType=VARCHAR}, #{contactNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{info,jdbcType=VARCHAR}, #{transferIn,jdbcType=VARCHAR}, #{transferOut,jdbcType=VARCHAR}, #{appkey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}) </insert> <insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" > insert into t_single <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > id, </if> <if test="type != null" > type, </if> <if test="receiver != null" > receiver, </if> <if test="shippingAddress != null" > shipping_address, </if> <if test="contactNumber != null" > contact_number, </if> <if test="status != null" > status, </if> <if test="info != null" > info, </if> <if test="transferIn != null" > transfer_in, </if> <if test="transferOut != null" > transfer_out, </if> <if test="appkey != null" > appkey, </if> <if test="createTime != null" > create_time, </if> <if test="createAccount != null" > create_account, </if> <if test="modifyTime != null" > modify_time, </if> <if test="modifyAccount != null" > modify_account, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null" > #{id,jdbcType=VARCHAR}, </if> <if test="type != null" > #{type,jdbcType=INTEGER}, </if> <if test="receiver != null" > #{receiver,jdbcType=VARCHAR}, </if> <if test="shippingAddress != null" > #{shippingAddress,jdbcType=VARCHAR}, </if> <if test="contactNumber != null" > #{contactNumber,jdbcType=VARCHAR}, </if> <if test="status != null" > #{status,jdbcType=INTEGER}, </if> <if test="info != null" > #{info,jdbcType=VARCHAR}, </if> <if test="transferIn != null" > #{transferIn,jdbcType=VARCHAR}, </if> <if test="transferOut != null" > #{transferOut,jdbcType=VARCHAR}, </if> <if test="appkey != null" > #{appkey,jdbcType=VARCHAR}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="createAccount != null" > #{createAccount,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="modifyAccount != null" > #{modifyAccount,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" resultType="java.lang.Integer" > select count(*) from t_single <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update t_single <set > <if test="record.id != null" > id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.type != null" > type = #{record.type,jdbcType=INTEGER}, </if> <if test="record.receiver != null" > receiver = #{record.receiver,jdbcType=VARCHAR}, </if> <if test="record.shippingAddress != null" > shipping_address = #{record.shippingAddress,jdbcType=VARCHAR}, </if> <if test="record.contactNumber != null" > contact_number = #{record.contactNumber,jdbcType=VARCHAR}, </if> <if test="record.status != null" > status = #{record.status,jdbcType=INTEGER}, </if> <if test="record.info != null" > info = #{record.info,jdbcType=VARCHAR}, </if> <if test="record.transferIn != null" > transfer_in = #{record.transferIn,jdbcType=VARCHAR}, </if> <if test="record.transferOut != null" > transfer_out = #{record.transferOut,jdbcType=VARCHAR}, </if> <if test="record.appkey != null" > appkey = #{record.appkey,jdbcType=VARCHAR}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.createAccount != null" > create_account = #{record.createAccount,jdbcType=VARCHAR}, </if> <if test="record.modifyTime != null" > modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, </if> <if test="record.modifyAccount != null" > modify_account = #{record.modifyAccount,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > update t_single set id = #{record.id,jdbcType=VARCHAR}, type = #{record.type,jdbcType=INTEGER}, receiver = #{record.receiver,jdbcType=VARCHAR}, shipping_address = #{record.shippingAddress,jdbcType=VARCHAR}, contact_number = #{record.contactNumber,jdbcType=VARCHAR}, status = #{record.status,jdbcType=INTEGER}, info = #{record.info,jdbcType=VARCHAR}, transfer_in = #{record.transferIn,jdbcType=VARCHAR}, transfer_out = #{record.transferOut,jdbcType=VARCHAR}, appkey = #{record.appkey,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_account = #{record.createAccount,jdbcType=VARCHAR}, modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}, modify_account = #{record.modifyAccount,jdbcType=VARCHAR} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" > update t_single <set > <if test="type != null" > type = #{type,jdbcType=INTEGER}, </if> <if test="receiver != null" > receiver = #{receiver,jdbcType=VARCHAR}, </if> <if test="shippingAddress != null" > shipping_address = #{shippingAddress,jdbcType=VARCHAR}, </if> <if test="contactNumber != null" > contact_number = #{contactNumber,jdbcType=VARCHAR}, </if> <if test="status != null" > status = #{status,jdbcType=INTEGER}, </if> <if test="info != null" > info = #{info,jdbcType=VARCHAR}, </if> <if test="transferIn != null" > transfer_in = #{transferIn,jdbcType=VARCHAR}, </if> <if test="transferOut != null" > transfer_out = #{transferOut,jdbcType=VARCHAR}, </if> <if test="appkey != null" > appkey = #{appkey,jdbcType=VARCHAR}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="createAccount != null" > create_account = #{createAccount,jdbcType=VARCHAR}, </if> <if test="modifyTime != null" > modify_time = #{modifyTime,jdbcType=TIMESTAMP}, </if> <if test="modifyAccount != null" > modify_account = #{modifyAccount,jdbcType=VARCHAR}, </if> </set> where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" > update t_single set type = #{type,jdbcType=INTEGER}, receiver = #{receiver,jdbcType=VARCHAR}, shipping_address = #{shippingAddress,jdbcType=VARCHAR}, contact_number = #{contactNumber,jdbcType=VARCHAR}, status = #{status,jdbcType=INTEGER}, info = #{info,jdbcType=VARCHAR}, transfer_in = #{transferIn,jdbcType=VARCHAR}, transfer_out = #{transferOut,jdbcType=VARCHAR}, appkey = #{appkey,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, create_account = #{createAccount,jdbcType=VARCHAR}, modify_time = #{modifyTime,jdbcType=TIMESTAMP}, modify_account = #{modifyAccount,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} </update> </mapper>