|
|
@@ -108,7 +108,7 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
|
|
|
*/
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
- @Query("update Product p set p.isSale = :switchStatus where p.enUU = :enUU")
|
|
|
+ @Query("update Product p set p.isSale = :switchStatus where p.enUU = :enUU and p.isSale <> :switchStatus")
|
|
|
void updateSaleStatusByEnUU(@Param("enUU") Long enUU, @Param("switchStatus") Short switchStatus);
|
|
|
|
|
|
/**
|
|
|
@@ -117,7 +117,7 @@ public interface ProductDao extends JpaSpecificationExecutor<Product>, JpaReposi
|
|
|
*/
|
|
|
@Transactional
|
|
|
@Modifying
|
|
|
- @Query("update Product p set p.isPurchase = :switchStatus where p.enUU = :enUU")
|
|
|
+ @Query("update Product p set p.isPurchase = :switchStatus where p.enUU = :enUU and p.isPurchase <> :switchStatus")
|
|
|
void updatePurchaseStatusByEnUU(@Param("enUU") Long enUU, @Param("switchStatus") Short switchStatus);
|
|
|
|
|
|
/**
|