|
@@ -26,6 +26,6 @@ public interface MerchantRepository extends BasicJpaRepository<Merchant, String
|
|
|
int updateStatusById(@Param("id") String id, @Param("status") BaseStatusEnum status);
|
|
|
|
|
|
@Modifying
|
|
|
- @Query(value = "update Merchant m set m.balance = m.balance + ?2 where m.balance - ?2 > 0 and m.id = ?1")
|
|
|
+ @Query(value = "update Merchant m set m.balance = m.balance + ?2 where m.balance + ?2 > 0 and m.id = ?1")
|
|
|
Integer updateBalance(String merchantId, BigDecimal quantity);
|
|
|
}
|