<?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.yeshi.fanli.dao.mybatis.ThreeSaleExtraInfoMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">
|
<id column="tf_id" property="id" jdbcType="BIGINT"/>
|
<result column="tf_nickname" property="nickname" jdbcType="VARCHAR"/>
|
<result column="tf_remind_boss" property="remindBoss" jdbcType="INTEGER"/>
|
<result column="tf_remind_worker" property="remindWorker" jdbcType="INTEGER"/>
|
<result column="tf_createtime" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="tf_updatetime" property="updateTime" jdbcType="TIMESTAMP"/>
|
<result column="tf_type" property="type" jdbcType="INTEGER"/>
|
<result column="tf_tags" property="tags" jdbcType="VARCHAR"/>
|
|
<association property="boss" column="tf_boss_id"
|
javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
<id column="tf_boss_id" property="id" jdbcType="BIGINT" />
|
</association>
|
<association property="worker" column="tf_worker_id"
|
javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
<id column="tf_worker_id" property="id" jdbcType="BIGINT" />
|
</association>
|
|
</resultMap>
|
<sql id="Base_Column_List">tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_type,tf_tags,tf_createtime,tf_updatetime</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>from yeshi_ec_threesale_extra_info where tf_id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_threesale_extra_info where tf_id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_threesale_extra_info (tf_id,tf_boss_id,tf_worker_id,tf_nickname,tf_remind_boss,tf_remind_worker,tf_type,tf_tags,tf_createtime,tf_updatetime) values (#{id,jdbcType=BIGINT},#{boss.id,jdbcType=BIGINT},#{worker.id,jdbcType=BIGINT},#{nickname,jdbcType=VARCHAR},#{remindBoss,jdbcType=INTEGER},#{remindWorker,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{type,jdbcType=INTEGER},#{tags,jdbcType=VARCHAR})</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_threesale_extra_info
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">tf_id,</if>
|
<if test="boss != null">tf_boss_id,</if>
|
<if test="worker != null">tf_worker_id,</if>
|
<if test="nickname != null">tf_nickname,</if>
|
<if test="remindBoss != null">tf_remind_boss,</if>
|
<if test="remindWorker != null">tf_remind_worker,</if>
|
<if test="createTime != null">tf_createtime,</if>
|
<if test="updateTime != null">tf_updatetime,</if>
|
<if test="type != null">tf_type,</if>
|
<if test="tags != null">tf_tags,</if>
|
</trim>values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="boss != null">#{boss.id,jdbcType=BIGINT},</if>
|
<if test="worker != null">#{worker.id,jdbcType=BIGINT},</if>
|
<if test="nickname != null">#{nickname,jdbcType=VARCHAR},</if>
|
<if test="remindBoss != null">#{remindBoss,jdbcType=INTEGER},</if>
|
<if test="remindWorker != null">#{remindWorker,jdbcType=INTEGER},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
<if test="tags != null">#{tags,jdbcType=VARCHAR},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">update yeshi_ec_threesale_extra_info set tf_boss_id = #{boss.id,jdbcType=BIGINT},tf_worker_id = #{worker.id,jdbcType=BIGINT},tf_nickname = #{nickname,jdbcType=VARCHAR},tf_remind_boss = #{remindBoss,jdbcType=INTEGER},tf_remind_worker = #{remindWorker,jdbcType=INTEGER},tf_createtime = #{createTime,jdbcType=TIMESTAMP},tf_updatetime = #{updateTime,jdbcType=TIMESTAMP},tf_type = #{type,jdbcType=INTEGER},tf_tags = #{tags,jdbcType=VARCHAR} where tf_id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo">update yeshi_ec_threesale_extra_info
|
<set>
|
<if test="boss != null">tf_boss_id=#{boss.id,jdbcType=BIGINT},</if>
|
<if test="worker != null">tf_worker_id=#{worker.id,jdbcType=BIGINT},</if>
|
<if test="nickname != null">tf_nickname=#{nickname,jdbcType=VARCHAR},</if>
|
<if test="remindBoss != null">tf_remind_boss=#{remindBoss,jdbcType=INTEGER},</if>
|
<if test="remindWorker != null">tf_remind_worker=#{remindWorker,jdbcType=INTEGER},</if>
|
<if test="type != null">tf_type=#{type,jdbcType=INTEGER},</if>
|
<if test="tags != null">tf_tags=#{tags,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">tf_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">tf_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set> where tf_id = #{id,jdbcType=BIGINT}
|
</update>
|
|
<select id="getbyBossIdAndWorkerId" resultMap="BaseResultMap">
|
SELECT * FROM `yeshi_ec_threesale_extra_info` t
|
WHERE t.`tf_boss_id` = #{bossId} AND t.`tf_worker_id`= #{workerId}
|
LIMIT 1
|
</select>
|
|
<delete id="deleteByBossIdAndWorkerId" parameterType="java.lang.Long">
|
delete from yeshi_ec_threesale_extra_info
|
WHERE `tf_boss_id` = #{bossId} AND `tf_worker_id`= #{workerId}
|
</delete>
|
</mapper>
|