|
|
@@ -46,16 +46,19 @@ public interface ShowroomRepo extends JpaRepository<Showroom, Long>, JpaSpecific
|
|
|
@Query("update Showroom t set t.heats = t.heats + ?2 where t.id = ?1")
|
|
|
@Modifying
|
|
|
@Transactional
|
|
|
+ @CacheEvict(value = "showroom", key = "#id")
|
|
|
void addHeat(Long id, int num);
|
|
|
|
|
|
@Query("update Showroom t set t.heats = t.heats + ?2, t.likes = t.likes + ?3 where t.id = ?1")
|
|
|
@Modifying
|
|
|
@Transactional
|
|
|
+ @CacheEvict(value = "showroom", key = "#id")
|
|
|
void addHeatAndLike(Long id, int heatNum, int likeNum);
|
|
|
|
|
|
@Query("update Showroom t set t.heats = t.heats + ?2, t.registers = t.registers + ?3 where t.id = ?1")
|
|
|
@Modifying
|
|
|
@Transactional
|
|
|
+ @CacheEvict(value = "showroom", key = "#id")
|
|
|
void addHeatAndRegister(Long id, int heatNum, int registerNum);
|
|
|
|
|
|
@Query(nativeQuery = true, value = "select user_id, count(id) num from showroom where type = ?1 group by user_id")
|