修改库存
This commit is contained in:
69
src/main/resources/mapper/TbOrderOutNumberMapper.xml
Normal file
69
src/main/resources/mapper/TbOrderOutNumberMapper.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?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.TbOrderOutNumberMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbOrderOutNumber">
|
||||
<result column="out_code" jdbcType="VARCHAR" property="outCode" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
|
||||
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||
<result column="product_sku" jdbcType="VARCHAR" property="productSku" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderOutNumber">
|
||||
insert into tb_order_out_number (out_code,shop_id, product_name, product_sku,
|
||||
status, remark, create_time
|
||||
)
|
||||
values (#{outCode,jdbcType=VARCHAR},#{shopId,jdbcType=VARCHAR} ,#{productName,jdbcType=VARCHAR}, #{productSku,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbOrderOutNumber">
|
||||
insert into tb_order_out_number
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="outCode != null">
|
||||
out_code,
|
||||
</if>
|
||||
<if test="productName != null">
|
||||
product_name,
|
||||
</if>
|
||||
<if test="productSku != null">
|
||||
product_sku,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="outCode != null">
|
||||
#{outCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productName != null">
|
||||
#{productName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="productSku != null">
|
||||
#{productSku,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select * from tb_order_out_number where shop_id=#{shopId} order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user