<?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.MoneyRecordMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.MoneyRecord">
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="money" property="money" jdbcType="DECIMAL" />
|
<result column="title" property="title" jdbcType="VARCHAR" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
<result column="createtime" property="createtime" jdbcType="BIGINT" />
|
<result column="type" property="type" jdbcType="INTEGER" />
|
<!-- <association property="userInfo" column="uid" resultMap="com.yeshi.fanli.entity.dao.mybatis.UserInfoMapper.BaseResultMap"/>
|
<association property="hongBao" column="hid" resultMap="com.yeshi.fanli.entity.dao.mybatis.HongBaoMapper.BaseResultMap"/>
|
<association property="extract" column="eid" resultMap="com.yeshi.fanli.entity.dao.mybatis.ExtractMapper.BaseResultMap"/> -->
|
</resultMap>
|
<sql id="Base_Column_List">id,uid,hid,money,title,remark,createtime,type,eid</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_money_record where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_money_record where id = #{id,jdbcType=BIGINT}
|
</delete>
|
|
<delete id="deleteMoneyRecordByExtractId" parameterType="java.lang.Long">delete
|
from
|
yeshi_ec_money_record where eid = #{0}
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.MoneyRecord"
|
useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_money_record
|
(id,uid,hid,money,title,remark,createtime,type,eid) values
|
(#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{hongBao.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{title,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR},#{createtime,jdbcType=BIGINT},#{type,jdbcType=INTEGER},#{extract.id,jdbcType=BIGINT})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.MoneyRecord"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_money_record
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="userInfo != null">uid,</if>
|
<if test="hongBao != null">hid,</if>
|
<if test="money != null">money,</if>
|
<if test="title != null">title,</if>
|
<if test="remark != null">remark,</if>
|
<if test="createtime != null">createtime,</if>
|
<if test="type != null">type,</if>
|
<if test="extract != null">eid,</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="hongBao != null">#{hongBao.id,jdbcType=BIGINT},</if>
|
<if test="money != null">#{money,jdbcType=DECIMAL},</if>
|
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
|
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
|
<if test="createtime != null">#{createtime,jdbcType=BIGINT},</if>
|
<if test="type != null">#{type,jdbcType=INTEGER},</if>
|
<if test="extract != null">#{extract.id,jdbcType=BIGINT},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.MoneyRecord">update
|
yeshi_ec_money_record set uid = #{userInfo.id,jdbcType=BIGINT},hid =
|
#{hongBao.id,jdbcType=BIGINT},money = #{money,jdbcType=DECIMAL},title
|
= #{title,jdbcType=VARCHAR},remark =
|
#{remark,jdbcType=VARCHAR},createtime =
|
#{createtime,jdbcType=BIGINT},type = #{type,jdbcType=INTEGER},eid =
|
#{extract.id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.MoneyRecord">
|
update yeshi_ec_money_record
|
<set>
|
<if test="userInfo != null">uid=#{userInfo.id,jdbcType=BIGINT},</if>
|
<if test="hongBao != null">hid=#{hongBao.id,jdbcType=BIGINT},</if>
|
<if test="money != null">money=#{money,jdbcType=DECIMAL},</if>
|
<if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
|
<if test="remark != null">remark=#{remark,jdbcType=VARCHAR},</if>
|
<if test="createtime != null">createtime=#{createtime,jdbcType=BIGINT},</if>
|
<if test="type != null">type=#{type,jdbcType=INTEGER},</if>
|
<if test="extract != null">eid=#{extract.id,jdbcType=BIGINT},</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|