licailing пре 4 година
родитељ
комит
b12fc4127b

+ 3 - 0
src/main/java/com/izouma/nineth/repo/ShowroomRepo.java

@@ -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")

+ 1 - 1
src/main/java/com/izouma/nineth/service/NewsLikeService.java

@@ -61,7 +61,7 @@ public class NewsLikeService {
                 .type(HeatType.LIKE)
                 .value(weight)
                 .build());
-        showroomRepo.addHeatAndLike(roomId, 1, weight);
+        showroomRepo.addHeatAndLike(roomId, weight, 1);
 
     }
 

+ 1 - 1
src/main/vue/src/views/CompanyEdit.vue

@@ -111,7 +111,7 @@ export default {
             formData: {
                 company: true,
                 username:
-                    '9th_' +
+                    '0x' +
                     randomstring.generate({
                         length: 6,
                         charset: 'alphabetic',

+ 1 - 1
src/main/vue/src/views/MinterEdit.vue

@@ -114,7 +114,7 @@ export default {
             formData: {
                 minter: true,
                 username:
-                    '9th_' +
+                    '0x' +
                     randomstring.generate({
                         length: 6,
                         charset: 'alphabetic',