Bläddra i källkod

查询标签优化

fangqing 7 månader sedan
förälder
incheckning
e3416cc282

+ 4 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityTagController.java

@@ -86,6 +86,10 @@ public class CommunityTagController extends BaseController {
                     })
                     .like("tag_name", tagName)
                     .orderByDesc("tag_hot")).getRecords();
+
+            if (communityTags.isEmpty()){
+                return AjaxResult.success("没有查询到该标签");
+            }
             CommunityTagVo communityTagVo = null;
             for (CommunityTag communityTag : communityTags) {
                 communityTagVo = new CommunityTagVo();