Kaynağa Gözat

update:金句列表v3

zhiqiang.lv 2 ay önce
ebeveyn
işleme
02d11dc4b2

+ 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>");
+            }
         }
     }