<?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.BanLiShopGoodsSetsPayMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">
|
<id column="sp_id" property="id" jdbcType="BIGINT" />
|
<result column="sp_discount" property="disCount" jdbcType="DECIMAL" />
|
<result column="sp_price_hongbao" property="hongBaoPrice"
|
jdbcType="DECIMAL" />
|
<result column="sp_price_balance" property="balancePrice"
|
jdbcType="DECIMAL" />
|
<result column="sp_price_money" property="moneyPrice" jdbcType="DECIMAL" />
|
<result column="sp_pay_type" property="payType" jdbcType="VARCHAR" />
|
<result column="sp_tag" property="tag" jdbcType="VARCHAR" />
|
<result column="sp_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="sp_update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="sp_weight" property="weight" jdbcType="INTEGER" />
|
<association property="goodsSet" column="sp_goods_set_id"
|
javaType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSets">
|
<id column="sp_goods_set_id" property="id" jdbcType="BIGINT" />
|
</association>
|
</resultMap>
|
<sql id="Base_Column_List">sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="listByGoodsSetId" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0}
|
</select>
|
|
<select id="countByGoodsSetId" resultType="java.lang.Long"
|
parameterType="java.lang.Long">
|
select
|
count(*)
|
from yeshi_ec_shop_goods_set_pay where sp_goods_set_id = #{0}
|
</select>
|
|
<select id="listQuery" resultMap="BaseResultMap">
|
select <include refid="Base_Column_List" /> from yeshi_ec_shop_goods_set_pay
|
where 1=1
|
<if test="payType != null">
|
and sp_pay_type=#{payType}
|
</if>
|
<if test="setId != null">
|
and sp_goods_set_id = #{setId}
|
</if>
|
order by sp_weight desc
|
limit #{start},#{count}
|
</select>
|
|
<select id="countQuery" resultType="java.lang.Long">
|
select count(sp_id) from yeshi_ec_shop_goods_set_pay
|
where 1=1
|
<if test="payType != null">
|
and sp_pay_type=#{payType}
|
</if>
|
<if test="setId != null">
|
and sp_goods_set_id = #{setId}
|
</if>
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_shop_goods_set_pay where sp_id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_shop_goods_set_pay
|
(sp_id,sp_goods_set_id,sp_discount,sp_price_hongbao,sp_price_balance,sp_price_money,sp_pay_type,sp_tag,sp_create_time,sp_update_time,sp_weight)
|
values
|
(#{id,jdbcType=BIGINT},#{goodsSet.id,jdbcType=BIGINT},#{disCount,jdbcType=DECIMAL},#{hongBaoPrice,jdbcType=DECIMAL},#{balancePrice,jdbcType=DECIMAL},#{moneyPrice,jdbcType=DECIMAL},#{payType,jdbcType=VARCHAR},#{tag,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{weight,jdbcType=INTEGER})
|
</insert>
|
<insert id="insertSelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_shop_goods_set_pay
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">sp_id,</if>
|
<if test="goodsSet != null">sp_goods_set_id,</if>
|
<if test="disCount != null">sp_discount,</if>
|
<if test="hongBaoPrice != null">sp_price_hongbao,</if>
|
<if test="balancePrice != null">sp_price_balance,</if>
|
<if test="moneyPrice != null">sp_price_money,</if>
|
<if test="payType != null">sp_pay_type,</if>
|
<if test="tag != null">sp_tag,</if>
|
<if test="createTime != null">sp_create_time,</if>
|
<if test="updateTime != null">sp_update_time,</if>
|
<if test="weight != null">sp_weight,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="goodsSet != null">#{goodsSet.id,jdbcType=BIGINT},</if>
|
<if test="disCount != null">#{disCount,jdbcType=DECIMAL},</if>
|
<if test="hongBaoPrice != null">#{hongBaoPrice,jdbcType=DECIMAL},</if>
|
<if test="balancePrice != null">#{balancePrice,jdbcType=DECIMAL},</if>
|
<if test="moneyPrice != null">#{moneyPrice,jdbcType=DECIMAL},</if>
|
<if test="payType != null">#{payType,jdbcType=VARCHAR},</if>
|
<if test="tag != null">#{tag,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="weight != null">#{weight,jdbcType=INTEGER}</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">update
|
yeshi_ec_shop_goods_set_pay set sp_goods_set_id =
|
#{goodsSet.id,jdbcType=BIGINT},sp_discount =
|
#{disCount,jdbcType=DECIMAL},sp_price_hongbao =
|
#{hongBaoPrice,jdbcType=DECIMAL},sp_price_balance =
|
#{balancePrice,jdbcType=DECIMAL},sp_price_money =
|
#{moneyPrice,jdbcType=DECIMAL},sp_pay_type =
|
#{payType,jdbcType=VARCHAR},sp_tag =
|
#{tag,jdbcType=VARCHAR},sp_create_time =
|
#{createTime,jdbcType=TIMESTAMP},sp_update_time =
|
#{updateTime,jdbcType=TIMESTAMP} ,sp_weight
|
=#{weight,jdbcType=INTEGER} where sp_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.shop.BanLiShopGoodsSetsPay">
|
update yeshi_ec_shop_goods_set_pay
|
<set>
|
<if test="goodsSet != null">sp_goods_set_id=#{goodsSet.id,jdbcType=BIGINT},</if>
|
<if test="disCount != null">sp_discount=#{disCount,jdbcType=DECIMAL},</if>
|
<if test="hongBaoPrice != null">sp_price_hongbao=#{hongBaoPrice,jdbcType=DECIMAL},</if>
|
<if test="balancePrice != null">sp_price_balance=#{balancePrice,jdbcType=DECIMAL},</if>
|
<if test="moneyPrice != null">sp_price_money=#{moneyPrice,jdbcType=DECIMAL},</if>
|
<if test="payType != null">sp_pay_type=#{payType,jdbcType=VARCHAR},</if>
|
<if test="tag != null">sp_tag=#{tag,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">sp_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">sp_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
<if test="weight !=null">sp_weight =#{weight,jdbcType=INTEGER},</if>
|
</set>
|
where sp_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|