<?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.money.AccountDetailHongBaoMapMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.money.AccountDetailHongBaoMap">
|
<id column="ahm_id" property="id" jdbcType="BIGINT" />
|
|
<result column="ahm_createtime" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="ahm_updatetime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
<association property="hongBao" column="ahm_hongbao_id"
|
javaType="com.yeshi.fanli.entity.bus.user.HongBao">
|
<id column="ahm_hongbao_id" property="id" jdbcType="BIGINT" />
|
</association>
|
|
<association property="accountDetails" column="ahm_account_details_id"
|
javaType="com.yeshi.fanli.entity.bus.user.AccountDetails">
|
<id column="ahm_account_details_id" property="id" jdbcType="BIGINT" />
|
</association>
|
|
</resultMap>
|
<sql id="Base_Column_List">ahm_id,ahm_hongbao_id,ahm_account_details_id,ahm_createtime,ahm_updatetime
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_account_details_hongbao_map where ahm_id =
|
#{id,jdbcType=BIGINT}
|
</select>
|
|
<select id="selectByHongBaoId" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_account_details_hongbao_map where ahm_hongbao_id =#{0}
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_account_details_hongbao_map where ahm_id =
|
#{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert"
|
parameterType="com.yeshi.fanli.entity.money.AccountDetailHongBaoMap"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_account_details_hongbao_map
|
(ahm_id,ahm_hongbao_id,ahm_account_details_id,ahm_createtime,ahm_updatetime)
|
values
|
(#{id,jdbcType=BIGINT},#{hongBao.id,jdbcType=BIGINT},#{accountDetails.id,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective"
|
parameterType="com.yeshi.fanli.entity.money.AccountDetailHongBaoMap"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_account_details_hongbao_map
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">ahm_id,</if>
|
<if test="hongBao != null">ahm_hongbao_id,</if>
|
<if test="accountDetails != null">ahm_account_details_id,</if>
|
<if test="createTime != null">ahm_createtime,</if>
|
<if test="updateTime != null">ahm_updatetime,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="hongBao != null">#{hongBao.id,jdbcType=BIGINT},</if>
|
<if test="accountDetails != null">#{accountDetails.id,jdbcType=BIGINT},</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.money.AccountDetailHongBaoMap">update yeshi_ec_account_details_hongbao_map set
|
ahm_hongbao_id = #{hongBao.id,jdbcType=BIGINT},ahm_account_details_id
|
=
|
#{accountDetails.id,jdbcType=BIGINT},ahm_createtime =
|
#{createTime,jdbcType=TIMESTAMP},ahm_updatetime =
|
#{updateTime,jdbcType=TIMESTAMP} where ahm_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective"
|
parameterType="com.yeshi.fanli.entity.money.AccountDetailHongBaoMap">
|
update yeshi_ec_account_details_hongbao_map
|
<set>
|
<if test="hongBao != null">ahm_hongbao_id=#{hongBao.id,jdbcType=BIGINT},</if>
|
<if test="accountDetails != null">ahm_account_details_id=#{accountDetails.id,jdbcType=BIGINT},
|
</if>
|
<if test="createTime != null">ahm_createtime=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">ahm_updatetime=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where ahm_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|