<?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.integral.UserGetIntegralFromOrderRecordMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord">
|
<id column="fo_id" property="id" jdbcType="BIGINT" />
|
<result column="fo_event_type" property="eventType" jdbcType="INTEGER" />
|
<result column="fo_uid" property="uid" jdbcType="BIGINT" />
|
<result column="fo_order_no" property="orderNo" jdbcType="VARCHAR" />
|
<result column="fo_order_source_type" property="orderSourceType"
|
jdbcType="INTEGER" />
|
<result column="fo_integral_count" property="integralCount"
|
jdbcType="INTEGER" />
|
<result column="fo_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="fo_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List">fo_id,fo_event_type,fo_uid,fo_order_no,fo_order_source_type,fo_integral_count,fo_create_time,fo_update_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_integral_get_from_order where fo_id =
|
#{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_integral_get_from_order where fo_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert"
|
parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_integral_get_from_order
|
(fo_id,fo_event_type,fo_uid,fo_order_no,fo_order_source_type,fo_integral_count,fo_create_time,fo_update_time)
|
values
|
(#{id,jdbcType=BIGINT},#{eventType,jdbcType=INTEGER},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{orderSourceType,jdbcType=INTEGER},#{integralCount,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective"
|
parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_integral_get_from_order
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">fo_id,</if>
|
<if test="eventType != null">fo_event_type,</if>
|
<if test="uid != null">fo_uid,</if>
|
<if test="orderNo != null">fo_order_no,</if>
|
<if test="orderSourceType != null">fo_order_source_type,</if>
|
<if test="integralCount != null">fo_integral_count,</if>
|
<if test="createTime != null">fo_create_time,</if>
|
<if test="updateTime != null">fo_update_time,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="eventType != null">#{eventType,jdbcType=INTEGER},</if>
|
<if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
<if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
|
<if test="orderSourceType != null">#{orderSourceType,jdbcType=INTEGER},</if>
|
<if test="integralCount != null">#{integralCount,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.integral.UserGetIntegralFromOrderRecord">update yeshi_ec_integral_get_from_order set
|
fo_event_type = #{eventType,jdbcType=INTEGER},fo_uid =
|
#{uid,jdbcType=BIGINT},fo_order_no =
|
#{orderNo,jdbcType=VARCHAR},fo_order_source_type =
|
#{orderSourceType,jdbcType=INTEGER},fo_integral_count =
|
#{integralCount,jdbcType=INTEGER},fo_create_time =
|
#{createTime,jdbcType=TIMESTAMP},fo_update_time =
|
#{updateTime,jdbcType=TIMESTAMP} where fo_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective"
|
parameterType="com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord">
|
update yeshi_ec_integral_get_from_order
|
<set>
|
<if test="eventType != null">fo_event_type=#{eventType,jdbcType=INTEGER},</if>
|
<if test="uid != null">fo_uid=#{uid,jdbcType=BIGINT},</if>
|
<if test="orderNo != null">fo_order_no=#{orderNo,jdbcType=VARCHAR},</if>
|
<if test="orderSourceType != null">fo_order_source_type=#{orderSourceType,jdbcType=INTEGER},
|
</if>
|
<if test="integralCount != null">fo_integral_count=#{integralCount,jdbcType=INTEGER},</if>
|
<if test="createTime != null">fo_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">fo_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where fo_id = #{id,jdbcType=BIGINT}
|
</update>
|
|
|
|
<select id="countByRecordInfo" resultType="java.lang.Long" useCache="false" flushCache="true">
|
select
|
count(*)
|
from yeshi_ec_integral_get_from_order where 1=1
|
|
<if test="record!=null">
|
<if test="record.eventType!=null">
|
and fo_event_type=#{record.eventType}
|
</if>
|
|
<if test="record.uid!=null">
|
and fo_uid=#{record.uid}
|
</if>
|
|
<if test="record.orderNo!=null">
|
and fo_order_no=#{record.orderNo}
|
</if>
|
|
<if test="record.orderSourceType!=null">
|
and fo_order_source_type=#{record.orderSourceType}
|
</if>
|
</if>
|
</select>
|
</mapper>
|