修改库存

This commit is contained in:
韩鹏辉
2024-06-19 16:44:11 +08:00
parent e5f5317f4e
commit 50fa846cf1
31 changed files with 1507 additions and 52 deletions

View File

@@ -46,6 +46,9 @@
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="master_id" jdbcType="VARCHAR" property="masterId"/>
<result column="table_name" jdbcType="VARCHAR" property="tableName"/>
<result column="out_number" jdbcType="VARCHAR" property="outNumber"/>
</resultMap>
<sql id="Base_Column_List">
id, order_no, settlement_amount, pack_fee, origin_amount, product_amount, amount,
@@ -53,7 +56,7 @@
discount_amount, table_id, small_change, send_type, order_type, product_type, status,
billing_id, merchant_id, shop_id, is_vip, member_id, user_id, product_score, deduct_score,
user_coupon_id, user_coupon_amount, refund_able, paid_time, is_effect, is_group,
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`
updated_at, `system_time`, created_at, is_accepted, pay_order_no,trade_day,`source`,remark,master_id,`table_name`,out_number
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -542,4 +545,24 @@
select * from tb_order_info where trade_day = #{day} and table_id = #{masterId} and shop_id = #{shopId}
</select>
<select id="selectByOutNumber" resultMap="BaseResultMap">
select * from tb_order_info where trade_day = #{tradeDay} and out_number=#{outNumber} and shop_id=#{shopId}
</select>
<select id="selectByOutNumberLimit" resultMap="BaseResultMap">
select * from tb_order_info where out_number=#{outNumber} and shop_id=#{shopId} order by id desc limit 1
</select>
<select id="selectByOrderId" resultType="java.util.Map">
SELECT
GROUP_CONCAT( d.product_name, ',' ) AS product_names,
GROUP_CONCAT( d.product_sku_name, ',' ) AS product_sku_name
FROM
tb_order_detail d
WHERE
d.order_id = #{orderId}
GROUP BY
d.order_id
</select>
</mapper>