|
|
@@ -76,7 +76,8 @@ public interface FsStoreProductScrmMapper
|
|
|
*/
|
|
|
public int deleteFsStoreProductByIds(Long[] productIds);
|
|
|
@Select({"<script> " +
|
|
|
- "select p.*,pc.cate_name, fs.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id " +
|
|
|
+ "select p.*,fspavs.bar_code as barCode2,pc.cate_name, fs.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id " +
|
|
|
+ "left join fs_store_product_attr_value_scrm as fspavs on fspavs.product_id=p.product_id "+
|
|
|
"left join fs_store fs on fs.store_id = p.store_id " +
|
|
|
"where 1=1 and p.is_del = 0" +
|
|
|
"<if test = 'maps.productName != null and maps.productName !=\"\" '> " +
|
|
|
@@ -255,7 +256,7 @@ public interface FsStoreProductScrmMapper
|
|
|
@Update("update fs_store_product_scrm set stock=stock-#{num}, sales=sales+#{num}" +
|
|
|
" where product_id=#{productId} and stock >= #{num}")
|
|
|
int decProductAttrStock(@Param("productId")Long productId, @Param("num")Integer cartNum);
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 使用行锁查询商品库存
|
|
|
*/
|