<?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.HongBaoV2Mapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.HongBaoV2">
|
<id column="hb_id" property="id" jdbcType="BIGINT"/>
|
<result column="hb_urank" property="urank" jdbcType="INTEGER"/>
|
<result column="hb_money" property="money" jdbcType="DECIMAL"/>
|
<result column="hb_type" property="type" jdbcType="INTEGER"/>
|
<result column="hb_state" property="state" jdbcType="INTEGER"/>
|
<result column="hb_version" property="version" jdbcType="INTEGER"/>
|
<result column="hb_beizhu" property="beizhu" jdbcType="VARCHAR"/>
|
<result column="hb_pre_get_time" property="preGetTime" jdbcType="TIMESTAMP"/>
|
<result column="hb_get_time" property="getTime" jdbcType="TIMESTAMP"/>
|
<result column="hb_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="hb_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
<association property="userInfo" column="hb_uid"
|
javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
|
<id column="hb_uid" property="id" jdbcType="BIGINT" />
|
</association>
|
|
<association property="parent" column="hb_pid"
|
javaType="com.yeshi.fanli.entity.push.PushGoods">
|
<id column="hb_pid" property="id" jdbcType="BIGINT" />
|
</association>
|
|
<!-- <association property="userInfo" column="hb_uid" resultMap="com.yeshi.fanli.dao.mybatis.UserInfoMapper.BaseResultMap"/> -->
|
</resultMap>
|
<sql id="Base_Column_List">hb_id,hb_uid,hb_urank,hb_pid,hb_money,hb_type,hb_state,hb_version,hb_beizhu,hb_pre_get_time,hb_get_time,hb_create_time,hb_update_time</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>from yeshi_ec_common_order where hb_id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_common_order where hb_id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.HongBaoV2" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_order (hb_id,hb_uid,hb_urank,hb_pid,hb_money,hb_type,hb_state,hb_version,hb_beizhu,hb_pre_get_time,hb_get_time,hb_create_time,hb_update_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{urank,jdbcType=INTEGER},#{parent.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{version,jdbcType=INTEGER},#{beizhu,jdbcType=VARCHAR},#{preGetTime,jdbcType=TIMESTAMP},#{getTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.HongBaoV2" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_common_order
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">hb_id,</if>
|
<if test="userInfo != null">hb_uid,</if>
|
<if test="urank != null">hb_urank,</if>
|
<if test="parent != null">hb_pid,</if>
|
<if test="money != null">hb_money,</if>
|
<if test="type != null">hb_type,</if>
|
<if test="state != null">hb_state,</if>
|
<if test="version != null">hb_version,</if>
|
<if test="beizhu != null">hb_beizhu,</if>
|
<if test="preGetTime != null">hb_pre_get_time,</if>
|
<if test="getTime != null">hb_get_time,</if>
|
<if test="createTime != null">hb_create_time,</if>
|
<if test="updateTime != null">hb_update_time,</if>
|
</trim>values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if>
|
<if test="urank != null">#{urank,jdbcType=INTEGER},</if>
|
<if test="parent != null">#{parent.id,jdbcType=BIGINT},</if>
|
<if test="money != null">#{money,jdbcType=DECIMAL},</if>
|
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
<if test="state != null">#{state,jdbcType=INTEGER},</if>
|
<if test="version != null">#{version,jdbcType=INTEGER},</if>
|
<if test="beizhu != null">#{beizhu,jdbcType=VARCHAR},</if>
|
<if test="preGetTime != null">#{preGetTime,jdbcType=TIMESTAMP},</if>
|
<if test="getTime != null">#{getTime,jdbcType=TIMESTAMP},</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.HongBaoV2">update yeshi_ec_common_order set hb_uid = #{userInfo.id,jdbcType=BIGINT},hb_urank = #{urank,jdbcType=INTEGER},hb_pid = #{parent.id,jdbcType=BIGINT},hb_money = #{money,jdbcType=DECIMAL},hb_type = #{type,jdbcType=INTEGER},hb_state = #{state,jdbcType=INTEGER},hb_version = #{version,jdbcType=INTEGER},hb_beizhu = #{beizhu,jdbcType=VARCHAR},hb_pre_get_time = #{preGetTime,jdbcType=TIMESTAMP},hb_get_time = #{getTime,jdbcType=TIMESTAMP},hb_create_time = #{createTime,jdbcType=TIMESTAMP},hb_update_time = #{updateTime,jdbcType=TIMESTAMP} where hb_id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.HongBaoV2">update yeshi_ec_common_order
|
<set>
|
<if test="userInfo != null">hb_uid=#{userInfo.id,jdbcType=BIGINT},</if>
|
<if test="urank != null">hb_urank=#{urank,jdbcType=INTEGER},</if>
|
<if test="parent != null">hb_pid=#{parent.id,jdbcType=BIGINT},</if>
|
<if test="money != null">hb_money=#{money,jdbcType=DECIMAL},</if>
|
<if test="type != null">hb_type=#{type,jdbcType=INTEGER},</if>
|
<if test="state != null">hb_state=#{state,jdbcType=INTEGER},</if>
|
<if test="version != null">hb_version=#{version,jdbcType=INTEGER},</if>
|
<if test="beizhu != null">hb_beizhu=#{beizhu,jdbcType=VARCHAR},</if>
|
<if test="preGetTime != null">hb_pre_get_time=#{preGetTime,jdbcType=TIMESTAMP},</if>
|
<if test="getTime != null">hb_get_time=#{getTime,jdbcType=TIMESTAMP},</if>
|
<if test="createTime != null">hb_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">hb_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set> where hb_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|