<?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.shop.BanLiShopOrderMapper">
|
<resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.shop.BanLiShopOrder">
|
<id column="so_id" property="id" jdbcType="BIGINT" />
|
<result column="so_uid" property="uid" jdbcType="BIGINT" />
|
<result column="so_order_no" property="orderNo" jdbcType="VARCHAR" />
|
<result column="so_payment_hongbao" property="hongBaoPayment"
|
jdbcType="DECIMAL" />
|
<result column="so_payment_hongbao_state" property="hongBaoPaymentState"
|
jdbcType="INTEGER" />
|
<result column="so_payment_money" property="moneyPayment"
|
jdbcType="DECIMAL" />
|
<result column="so_payment_money_state" property="moneyPaymentState"
|
jdbcType="INTEGER" />
|
<result column="so_payment_balance" property="balancePayment"
|
jdbcType="DECIMAL" />
|
<result column="so_payment_balance_state" property="balancePaymentState"
|
jdbcType="INTEGER" />
|
<result column="so_pay_time" property="payTime" jdbcType="TIMESTAMP" />
|
<result column="so_reject_time" property="rejectTime" jdbcType="TIMESTAMP" />
|
<result column="so_success_time" property="successTime"
|
jdbcType="TIMESTAMP" />
|
<result column="so_state" property="state" jdbcType="INTEGER" />
|
<result column="so_state_desc" property="stateDesc" jdbcType="VARCHAR" />
|
<result column="so_charge_account" property="chargeAccount"
|
jdbcType="VARCHAR" />
|
<result column="so_charge_account2" property="chargeAccount2"
|
jdbcType="VARCHAR" />
|
<result column="so_beizhu" property="beiZhu" jdbcType="VARCHAR" />
|
<result column="so_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="so_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="so_charge_account_type" property="chargeAccountType"
|
jdbcType="VARCHAR" />
|
<association property="goods" column="so_goods_id"
|
javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods">
|
<id column="so_goods_id" property="id" jdbcType="BIGINT" />
|
</association>
|
<association property="goodsSet" column="so_goods_set_id"
|
javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
<id column="so_goods_set_id" property="id" jdbcType="BIGINT" />
|
</association>
|
<association property="orderGoods" column="so_order_goods_id"
|
javaType="com.yeshi.fanli.entity.shop.BanLiShopGoods"
|
select="com.yeshi.fanli.dao.mybatis.shop.BanLiShopOrderGoodsMapper.selectByPrimaryKey" />
|
|
|
</resultMap>
|
<sql id="Base_Column_List">so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_order where so_id = #{0} for update
|
</select>
|
<select id="listByUidAndState" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_order where 1=1
|
|
<if test="uid!=null">
|
and so_uid = #{uid}
|
</if>
|
|
<if test="stateList!=null">
|
<foreach collection="stateList" item="state" open=" and ("
|
close=")" separator=" or ">so_state=#{state}</foreach>
|
</if>
|
order by so_id desc limit #{start},#{count}
|
</select>
|
|
<select id="selectByOrderNo" resultMap="BaseResultMap"
|
parameterType="java.lang.String">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_order where so_order_no = #{0}
|
</select>
|
|
|
<select id="countByUidAndState" resultType="java.lang.Long">
|
select count(*) from yeshi_ec_shop_order where 1=1
|
<if test="uid!=null">
|
and so_uid = #{uid}
|
</if>
|
|
<if test="stateList!=null">
|
<foreach collection="stateList" item="state" open=" and ("
|
close=")" separator=" or ">so_state=#{state}</foreach>
|
</if>
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_shop_order where so_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
|
useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_shop_order
|
(so_id,so_uid,so_order_no,so_goods_id,so_goods_set_id,so_payment_hongbao,so_payment_hongbao_state,so_payment_money,so_payment_money_state,so_payment_balance,so_payment_balance_state,so_pay_time,so_reject_time,so_success_time,so_state,so_state_desc,so_charge_account,so_charge_account2,so_beizhu,so_create_time,so_update_time,so_order_goods_id,so_charge_account_type)
|
values
|
(#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{orderNo,jdbcType=VARCHAR},#{goods.id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{hongBaoPayment,jdbcType=DECIMAL},#{hongBaoPaymentState,jdbcType=INTEGER},#{moneyPayment,jdbcType=DECIMAL},#{moneyPaymentState,jdbcType=INTEGER},#{balancePayment,jdbcType=DECIMAL},#{balancePaymentState,jdbcType=INTEGER},#{payTime,jdbcType=TIMESTAMP},#{rejectTime,jdbcType=TIMESTAMP},#{successTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{stateDesc,jdbcType=VARCHAR},#{chargeAccount,jdbcType=VARCHAR},#{chargeAccount2,jdbcType=VARCHAR},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{orderGoods.id,jdbcType=BIGINT},#{chargeAccountType,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_shop_order
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">so_id,</if>
|
<if test="uid != null">so_uid,</if>
|
<if test="orderNo != null">so_order_no,</if>
|
<if test="goods != null">so_goods_id,</if>
|
<if test="goodsSet != null">so_goods_set_id,</if>
|
<if test="hongBaoPayment != null">so_payment_hongbao,</if>
|
<if test="hongBaoPaymentState != null">so_payment_hongbao_state,</if>
|
<if test="balancePayment != null"> so_payment_balance,</if>
|
<if test="balancePaymentState != null">so_payment_balance_state,</if>
|
<if test="moneyPayment != null">so_payment_money,</if>
|
<if test="moneyPaymentState != null">so_payment_money_state,</if>
|
<if test="payTime != null">so_pay_time,</if>
|
<if test="rejectTime != null">so_reject_time,</if>
|
<if test="successTime != null">so_success_time,</if>
|
<if test="state != null">so_state,</if>
|
<if test="stateDesc != null">so_state_desc,</if>
|
<if test="chargeAccount != null">so_charge_account,</if>
|
<if test="chargeAccount2 != null">so_charge_account2,</if>
|
<if test="beiZhu != null">so_beizhu,</if>
|
<if test="createTime != null">so_create_time,</if>
|
<if test="updateTime != null">so_update_time,</if>
|
<if test="orderGoods != null">so_order_goods_id,</if>
|
<if test="chargeAccountType != null">so_charge_account_type,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
<if test="orderNo != null">#{orderNo,jdbcType=VARCHAR},</if>
|
<if test="goods != null">#{goods.id,jdbcType=BIGINT},</if>
|
<if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if>
|
<if test="hongBaoPayment != null">#{hongBaoPayment,jdbcType=DECIMAL},</if>
|
<if test="hongBaoPaymentState != null">#{hongBaoPaymentState,jdbcType=INTEGER},</if>
|
<if test="balancePayment != null">#{balancePayment,jdbcType=DECIMAL},</if>
|
<if test="balancePaymentState != null">#{balancePaymentState,jdbcType=INTEGER},</if>
|
<if test="moneyPayment != null">#{moneyPayment,jdbcType=DECIMAL},</if>
|
<if test="moneyPaymentState != null">#{moneyPaymentState,jdbcType=INTEGER},</if>
|
<if test="payTime != null">#{payTime,jdbcType=TIMESTAMP},</if>
|
<if test="rejectTime != null">#{rejectTime,jdbcType=TIMESTAMP},</if>
|
<if test="successTime != null">#{successTime,jdbcType=TIMESTAMP},</if>
|
<if test="state != null">#{state,jdbcType=INTEGER},</if>
|
<if test="stateDesc != null">#{stateDesc,jdbcType=VARCHAR},</if>
|
<if test="chargeAccount != null">#{chargeAccount,jdbcType=VARCHAR},</if>
|
<if test="chargeAccount2 != null">#{chargeAccount2,jdbcType=VARCHAR},</if>
|
<if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="orderGoods != null">#{orderGoods.id,jdbcType=BIGINT},</if>
|
<if test="chargeAccountType != null">#{chargeAccountType,jdbcType=VARCHAR}</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">update
|
yeshi_ec_shop_order set so_uid = #{uid,jdbcType=BIGINT},so_order_no =
|
#{orderNo,jdbcType=VARCHAR},so_goods_id =
|
#{goods.id,jdbcType=BIGINT},so_goods_set_id =
|
#{goodsSet.id,jdbcType=BIGINT},so_payment_hongbao =
|
#{hongBaoPayment,jdbcType=DECIMAL},so_payment_hongbao_state =
|
#{hongBaoPaymentState,jdbcType=INTEGER},so_payment_money =
|
#{moneyPayment,jdbcType=DECIMAL},so_payment_money_state =
|
#{moneyPaymentState,jdbcType=INTEGER},so_payment_balance =
|
#{balancePayment,jdbcType=DECIMAL},so_payment_balance_state =
|
#{balancePaymentState,jdbcType=INTEGER},so_pay_time =
|
#{payTime,jdbcType=TIMESTAMP},so_reject_time =
|
#{rejectTime,jdbcType=TIMESTAMP},so_success_time =
|
#{successTime,jdbcType=TIMESTAMP},so_state =
|
#{state,jdbcType=INTEGER},so_state_desc =
|
#{stateDesc,jdbcType=VARCHAR},so_charge_account =
|
#{chargeAccount,jdbcType=VARCHAR},so_charge_account2 =
|
#{chargeAccount2,jdbcType=VARCHAR},so_beizhu =
|
#{beiZhu,jdbcType=VARCHAR},so_create_time =
|
#{createTime,jdbcType=TIMESTAMP},so_update_time =
|
#{updateTime,jdbcType=TIMESTAMP} ,so_order_goods_id
|
=#{orderGoods.id,jdbcType=BIGINT} ,so_charge_account_type
|
=#{chargeAccountType,jdbcType=VARCHAR} where so_id =
|
#{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopOrder">
|
update yeshi_ec_shop_order
|
<set>
|
<if test="uid != null">so_uid=#{uid,jdbcType=BIGINT},</if>
|
<if test="orderNo != null">so_order_no=#{orderNo,jdbcType=VARCHAR},</if>
|
<if test="goods != null">so_goods_id=#{goods.id,jdbcType=BIGINT},</if>
|
<if test="goodsSet != null">so_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if>
|
<if test="hongBaoPayment != null">so_payment_hongbao=#{hongBaoPayment,jdbcType=DECIMAL},
|
</if>
|
<if test="hongBaoPaymentState != null">so_payment_hongbao_state=#{hongBaoPaymentState,jdbcType=INTEGER},
|
</if>
|
<if test="balancePayment != null">so_payment_balance=#{balancePayment,jdbcType=DECIMAL},
|
</if>
|
<if test="balancePaymentState != null">so_payment_balance_state=#{balancePaymentState,jdbcType=INTEGER},
|
</if>
|
<if test="moneyPayment != null">so_payment_money=#{moneyPayment,jdbcType=DECIMAL},</if>
|
<if test="moneyPaymentState != null">so_payment_money_state=#{moneyPaymentState,jdbcType=INTEGER},
|
</if>
|
<if test="payTime != null">so_pay_time=#{payTime,jdbcType=TIMESTAMP},</if>
|
<if test="rejectTime != null">so_reject_time=#{rejectTime,jdbcType=TIMESTAMP},</if>
|
<if test="successTime != null">so_success_time=#{successTime,jdbcType=TIMESTAMP},</if>
|
<if test="state != null">so_state=#{state,jdbcType=INTEGER},</if>
|
<if test="stateDesc != null">so_state_desc=#{stateDesc,jdbcType=VARCHAR},</if>
|
<if test="chargeAccount != null">so_charge_account=#{chargeAccount,jdbcType=VARCHAR},</if>
|
<if test="chargeAccount2 != null">so_charge_account2=#{chargeAccount2,jdbcType=VARCHAR},
|
</if>
|
<if test="beiZhu != null">so_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">so_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">so_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="orderGoods !=null">so_order_goods_id =#{orderGoods.id,jdbcType=BIGINT},</if>
|
<if test="chargeAccountType !=null">so_charge_account_type
|
=#{chargeAccountType,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where so_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|