zhiqiang.lv преди 2 месеца
родител
ревизия
02d11dc4b2
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 1 1
      src/main/java/top/lvzhiqiang/mapper/GoldenQuotesMapper.java
  2. 4 0
      src/main/java/top/lvzhiqiang/service/impl/CoinServiceImpl.java

+ 1 - 1
src/main/java/top/lvzhiqiang/mapper/GoldenQuotesMapper.java

@@ -20,7 +20,7 @@ public interface GoldenQuotesMapper {
     @Select({"<script>" +
             "select * from golden_quotes WHERE delete_flag = 1" +
             "<if test=\"keyword != null and keyword != ''\">" +
-            "   and content like concat('%',#{keyword},'%')" +
+            "   and (content like concat('%',#{keyword},'%') or remark like concat('%',#{keyword},'%'))" +
             "</if>" +
             "<if test=\"authorField != null and authorField != ''\">" +
             "   and author = #{authorField}" +

+ 4 - 0
src/main/java/top/lvzhiqiang/service/impl/CoinServiceImpl.java

@@ -1946,6 +1946,10 @@ public class CoinServiceImpl implements CoinService {
                 remark = "";
             }
             goldenQuotes.setRemark("<span class=\"primary\" title=\"" + goldenQuotes.getRemark() + " \" >" + remark + " </span>");
+
+            if (StringUtils.isNotEmpty(goldenQuotes.getOriginalUrl())) {
+                goldenQuotes.setSourcePlatform("<a target=\"_blank\" href=\" " + goldenQuotes.getOriginalUrl() + "\">" + goldenQuotes.getSourcePlatform() + "</a>");
+            }
         }
     }