商品查询修改
This commit is contained in:
212
src/main/resources/mapper/OrderChildDetailMapper.xml
Normal file
212
src/main/resources/mapper/OrderChildDetailMapper.xml
Normal file
@@ -0,0 +1,212 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.OrderChildDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.OrderChildDetail">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="order_id" jdbcType="INTEGER" property="orderId" />
|
||||
<result column="shop_id" jdbcType="INTEGER" property="shopId" />
|
||||
<result column="product_id" jdbcType="INTEGER" property="productId" />
|
||||
<result column="product_sku_id" jdbcType="INTEGER" property="productSkuId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||
<result column="product_sku_name" jdbcType="VARCHAR" property="productSkuName" />
|
||||
<result column="product_img" jdbcType="VARCHAR" property="productImg" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="price" jdbcType="DECIMAL" property="price" />
|
||||
<result column="price_amount" jdbcType="DECIMAL" property="priceAmount" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="pack_amount" jdbcType="DECIMAL" property="packAmount" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, order_id, shop_id, product_id, product_sku_id, num, product_name, product_sku_name,
|
||||
product_img, create_time, update_time, price, price_amount, status, pack_amount
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_order_child_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_order_child_detail
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.OrderChildDetail">
|
||||
insert into tb_order_child_detail (id, order_id, shop_id,
|
||||
product_id, product_sku_id, num,
|
||||
product_name, product_sku_name, product_img,
|
||||
create_time, update_time, price,
|
||||
price_amount, status, pack_amount
|
||||
)
|
||||
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER},
|
||||
#{productId,jdbcType=INTEGER}, #{productSkuId,jdbcType=INTEGER}, #{num,jdbcType=INTEGER},
|
||||
#{productName,jdbcType=VARCHAR}, #{productSkuName,jdbcType=VARCHAR}, #{productImg,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{price,jdbcType=DECIMAL},
|
||||
#{priceAmount,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{packAmount,jdbcType=DECIMAL}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.OrderChildDetail">
|
||||
insert into tb_order_child_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id,
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id,
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id,
|
||||
</if>
|
||||
<if test="productSkuId != null">
|
||||
product_sku_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="productName != null">
|
||||
product_name,
|
||||
</if>
|
||||
<if test="productSkuName != null">
|
||||
product_sku_name,
|
||||
</if>
|
||||
<if test="productImg != null">
|
||||
product_img,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price,
|
||||
</if>
|
||||
<if test="priceAmount != null">
|
||||
price_amount,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="packAmount != null">
|
||||
pack_amount,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
#{orderId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
#{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
#{productId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productSkuId != null">
|
||||
#{productSkuId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productName != null">
|
||||
#{productName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productSkuName != null">
|
||||
#{productSkuName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productImg != null">
|
||||
#{productImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
#{price,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="priceAmount != null">
|
||||
#{priceAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packAmount != null">
|
||||
#{packAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.OrderChildDetail">
|
||||
update tb_order_child_detail
|
||||
<set>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productId != null">
|
||||
product_id = #{productId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productSkuId != null">
|
||||
product_sku_id = #{productSkuId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="productName != null">
|
||||
product_name = #{productName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productSkuName != null">
|
||||
product_sku_name = #{productSkuName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productImg != null">
|
||||
product_img = #{productImg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="priceAmount != null">
|
||||
price_amount = #{priceAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packAmount != null">
|
||||
pack_amount = #{packAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.OrderChildDetail">
|
||||
update tb_order_child_detail
|
||||
set order_id = #{orderId,jdbcType=INTEGER},
|
||||
shop_id = #{shopId,jdbcType=INTEGER},
|
||||
product_id = #{productId,jdbcType=INTEGER},
|
||||
product_sku_id = #{productSkuId,jdbcType=INTEGER},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
product_name = #{productName,jdbcType=VARCHAR},
|
||||
product_sku_name = #{productSkuName,jdbcType=VARCHAR},
|
||||
product_img = #{productImg,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
price = #{price,jdbcType=DECIMAL},
|
||||
price_amount = #{priceAmount,jdbcType=DECIMAL},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
pack_amount = #{packAmount,jdbcType=DECIMAL}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user