@@ -529,6 +529,6 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
*/
@Modifying
@Transactional
- @Query(value = "update Goods g set g.visitCount = g.visitCount+1 where g.uuid = :batchCode")
+ @Query( nativeQuery = true, value = "update trade$goods set go_visit_count = ifnull(go_visit_count, 0) + 1 where uuid = :batchCode")
public void addVisitCount(@Param("batchCode") String batchCode);
}
@@ -88,6 +88,6 @@ public interface BrandDao extends JpaSpecificationExecutor<Brand>, JpaRepository
- @Query(value = "update Brand b set b.visitCount = b.visitCount+1 where b.uuid = :uuid")
+ @Query( nativeQuery = true, value = "update product$brand b set b.br_visit_count = ifnull(b.br_visit_count, 0) + 1 where b.uuid = :uuid")
public void addVisitCount(@Param("uuid") String uuid);
@@ -128,6 +128,6 @@ public interface ComponentDao extends JpaSpecificationExecutor<Component>, JpaRe
- @Query(value = "update Component c set c.visitCount = c.visitCount+1 where c.uuid = :uuid")
+ @Query( nativeQuery = true, value = "update product$component set cmp_visit_count = ifnull(cmp_visit_count, 0) + 1 where uuid = :uuid")