<?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.yohoufo.dal.order.SellerEnterApplyMapper"> <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.SellerEnterApply"> <id column="id" jdbcType="INTEGER" property="id" /> <result column="uid" jdbcType="INTEGER" property="uid" /> <result column="order_code" jdbcType="BIGINT" property="orderCode" /> <result column="pre_enter_type" jdbcType="INTEGER" property="preEnterType" /> <result column="enter_type" jdbcType="INTEGER" property="enterType" /> <result column="create_time" jdbcType="INTEGER" property="createTime" /> <result column="update_time" jdbcType="INTEGER" property="updateTime" /> <result column="status" jdbcType="SMALLINT" property="status" /> </resultMap> <sql id="Base_Column_List"> id, uid, order_code, pre_enter_type, enter_type, create_time, update_time, `status` </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from seller_enter_apply where id = #{id,jdbcType=INTEGER} </select> <select id="selectByUOCET" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from seller_enter_apply where uid = #{uid,jdbcType=INTEGER} <if test="orderCode != null"> and order_code = #{orderCode,jdbcType=BIGINT} </if> <if test="enterType != null"> and enter_type = #{enterType,jdbcType=INTEGER} </if> <if test="preEnterType != null"> and pre_enter_type = #{preEnterType,jdbcType=INTEGER} </if> </select> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" useGeneratedKeys="true"> insert into seller_enter_apply (uid, order_code, pre_enter_type, enter_type, create_time, update_time, status) values (#{uid,jdbcType=INTEGER}, #{orderCode,jdbcType=BIGINT}, #{preEnterType,jdbcType=INTEGER}, #{enterType,jdbcType=INTEGER}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{status,jdbcType=SMALLINT}) </insert> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.SellerEnterApply" useGeneratedKeys="true"> insert into seller_enter_apply <trim prefix="(" suffix=")" suffixOverrides=","> <if test="uid != null"> uid, </if> <if test="orderCode != null"> order_code, </if> <if test="preEnterType != null"> pre_enter_type, </if> <if test="enterType != null"> enter_type, </if> <if test="createTime != null"> create_time, </if> <if test="updateTime != null"> update_time, </if> <if test="status != null"> status, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="uid != null"> #{uid,jdbcType=INTEGER}, </if> <if test="orderCode != null"> #{orderCode,jdbcType=BIGINT}, </if> <if test="preEnterType != null"> #{preEnterType,jdbcType=INTEGER}, </if> <if test="enterType != null"> #{enterType,jdbcType=INTEGER}, </if> <if test="createTime != null"> #{createTime,jdbcType=INTEGER}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=INTEGER}, </if> <if test="status != null"> #{status,jdbcType=SMALLINT}, </if> </trim> </insert> <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.SellerEnterApply"> update seller_enter_apply <set> <if test="uid != null"> uid = #{uid,jdbcType=INTEGER}, </if> <if test="orderCode != null"> order_code = #{orderCode,jdbcType=BIGINT}, </if> <if test="preEnterType != null"> pre_enter_type = #{preEnterType,jdbcType=INTEGER}, </if> <if test="enterType != null"> enter_type = #{enterType,jdbcType=INTEGER}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=INTEGER}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=INTEGER}, </if> <if test="status != null"> status = #{status,jdbcType=SMALLINT}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.SellerEnterApply"> update seller_enter_apply set uid = #{uid,jdbcType=INTEGER}, order_code = #{orderCode,jdbcType=BIGINT}, pre_enter_type = #{preEnterType,jdbcType=INTEGER}, enter_type = #{enterType,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=INTEGER}, update_time = #{updateTime,jdbcType=INTEGER}, status = #{status,jdbcType=SMALLINT} where id = #{id,jdbcType=INTEGER} </update> </mapper>