Переглянути джерело

根据关键字查询优惠券

詹子聪 5 роки тому
батько
коміт
50512560ef

+ 1 - 1
src/main/java/com/miekir/shibei/repository/CouponRepository.java

@@ -25,7 +25,7 @@ public interface CouponRepository extends JpaRepository<CouponBean, Integer> {
 
 
     // 使用原生SQL MYSQL 不支持TOP,要用连接符号|连接,否则会被当成字符串常量拼成%?1%
-    @Query(value="SELECT * FROM t_coupon where title like ?1 limit ?2, ?3", nativeQuery = true)
+    @Query(value="SELECT * FROM t_coupon where couponName like ?1 limit ?2, ?3", nativeQuery = true)
     public List<CouponBean> getCouponListByKeyword(String keywords, int startNum, int pageSize);
 
     // 使用原生SQL MYSQL 不支持TOP,要用连接符号|连接,否则会被当成字符串常量拼成%?1%