From 14a3571e8cbd885d9d47ffdb4da14287d32a0718 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 12 八月 2019 11:09:44 +0800 Subject: [PATCH] 队员列表 邀请码、微信绑定验证 --- fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml | 139 ++++++++++++++++++++++++--------------------- 1 files changed, 74 insertions(+), 65 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml index 322a666..d29cbe5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleExtraInfoMapper.xml @@ -1,65 +1,74 @@ -<?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_createtime" property="createTime" jdbcType="TIMESTAMP"/> - <result column="tf_updatetime" property="updateTime" jdbcType="TIMESTAMP"/> - <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_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_createtime,tf_updatetime) values (#{id,jdbcType=BIGINT},#{boss.id,jdbcType=BIGINT},#{worker.id,jdbcType=BIGINT},#{nickname,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</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="createTime != null">tf_createtime,</if> - <if test="updateTime != null">tf_updatetime,</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="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> - <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</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_createtime = #{createTime,jdbcType=TIMESTAMP},tf_updatetime = #{updateTime,jdbcType=TIMESTAMP} 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="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="listbyBossIdAndWorkerId" resultMap="BaseResultMap"> - SELECT * FROM `yeshi_ec_threesale_extra_info` t - WHERE t.`tf_boss_id` = #{bossId} AND t.`tf_worker_id`= #{workerId} - </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> +<?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"/> + + <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_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_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})</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> + </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> + </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} 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="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> -- Gitblit v1.8.0