修改耗材库存
This commit is contained in:
@@ -935,4 +935,29 @@
|
||||
set stock_number = stock_number - #{number,jdbcType=INTEGER}
|
||||
where id = #{productId}
|
||||
</update>
|
||||
|
||||
<select id="selectBySkuId" resultType="com.chaozhanggui.system.cashierservice.entity.po.ProConsSkuInfo">
|
||||
SELECT
|
||||
c.shop_id,
|
||||
c.product_sku_id,
|
||||
c.`status`,
|
||||
i.id as con_id,
|
||||
i.con_code,
|
||||
i.con_name,
|
||||
i.surplus_stock,
|
||||
i.stock_number,
|
||||
p.id as product_id,
|
||||
p.`name` as product_name,
|
||||
i.con_warning,
|
||||
s.spec_snap
|
||||
FROM
|
||||
tb_prosku_con c
|
||||
LEFT JOIN tb_cons_info i ON c.con_info_id = i.id
|
||||
left join tb_product_sku s on c.product_sku_id=s.id
|
||||
left join tb_product p on s.product_id=p.id
|
||||
where c.`status`=1
|
||||
and c.product_sku_id=#{skuId}
|
||||
group by i.id
|
||||
order by i.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user