商品上下架

This commit is contained in:
2024-11-12 15:51:50 +08:00
parent b3b27a0aa7
commit f64a026991

View File

@@ -32,7 +32,7 @@ public interface TbProductSkuRepository extends JpaRepository<TbProductSku, Inte
@Query(value = "SELECT min(sale_price) from tb_product_sku where product_id = ?1 and id != ?2", nativeQuery = true)
BigDecimal searchMinSalePrice(@Param("productId") Integer productId, @Param("skuId") Integer skuId);
@Query(value = "SELECT count() from tb_product_sku where product_id = ?1 and is_grounding = 1 and id != ?2", nativeQuery = true)
@Query(value = "SELECT count(1) from tb_product_sku where product_id = ?1 and is_grounding = 1 and id != ?2", nativeQuery = true)
int countGrounding(@Param("productId") Integer productId, @Param("skuId") Integer skuId);