+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt + *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.service;
+
+import com.jfinal.plugin.activerecord.Page;
+import io.jboot.db.model.Columns;
+import io.jboot.service.JbootServiceJoiner;
+import io.jpress.module.article.model.Article;
+
+import java.util.List;
+
+public interface ArticleService extends JbootServiceJoiner {
+
+ /**
+ * find model by primary key
+ *
+ * @param id
+ * @return
+ */
+ public Article findById(Object id);
+
+ public Article findByTitle(String title);
+
+
+ /**
+ * find all model
+ *
+ * @return all
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.service.provider;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.kit.LogKit;
-import com.jfinal.plugin.activerecord.Db;
-import com.jfinal.plugin.activerecord.Model;
-import com.jfinal.plugin.activerecord.Page;
-import com.jfinal.plugin.activerecord.Record;
-import io.jboot.aop.annotation.Bean;
-import io.jboot.components.cache.annotation.CacheEvict;
-import io.jboot.components.cache.annotation.Cacheable;
-import io.jboot.components.cache.annotation.CachesEvict;
-import io.jboot.db.model.Column;
-import io.jboot.db.model.Columns;
-import io.jboot.service.JbootServiceBase;
-import io.jboot.utils.StrUtil;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.model.ArticleCategory;
-import io.jpress.module.article.service.ArticleCategoryService;
-import io.jpress.module.article.service.ArticleCommentService;
-import io.jpress.module.article.service.ArticleService;
-import io.jpress.module.article.service.search.ArticleSearcher;
-import io.jpress.module.article.service.search.ArticleSearcherFactory;
-import io.jpress.module.article.service.sitemap.ArticleSitemapManager;
-import io.jpress.module.article.service.task.ArticleCommentsCountUpdateTask;
-import io.jpress.module.article.service.task.ArticleViewsCountUpdateTask;
-import io.jpress.service.UserService;
-import io.jpress.web.seoping.SeoManager;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Bean
-public class ArticleServiceProvider extends JbootServiceBase
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.service.provider;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.kit.LogKit;
+import com.jfinal.plugin.activerecord.Db;
+import com.jfinal.plugin.activerecord.Model;
+import com.jfinal.plugin.activerecord.Page;
+import com.jfinal.plugin.activerecord.Record;
+import io.jboot.aop.annotation.Bean;
+import io.jboot.components.cache.annotation.CacheEvict;
+import io.jboot.components.cache.annotation.Cacheable;
+import io.jboot.components.cache.annotation.CachesEvict;
+import io.jboot.db.model.Column;
+import io.jboot.db.model.Columns;
+import io.jboot.service.JbootServiceBase;
+import io.jboot.utils.StrUtil;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.model.ArticleCategory;
+import io.jpress.module.article.service.ArticleCategoryService;
+import io.jpress.module.article.service.ArticleCommentService;
+import io.jpress.module.article.service.ArticleService;
+import io.jpress.module.article.service.search.ArticleSearcher;
+import io.jpress.module.article.service.search.ArticleSearcherFactory;
+import io.jpress.module.article.service.sitemap.ArticleSitemapManager;
+import io.jpress.module.article.service.task.ArticleCommentsCountUpdateTask;
+import io.jpress.module.article.service.task.ArticleViewsCountUpdateTask;
+import io.jpress.service.UserService;
+import io.jpress.web.seoping.SeoManager;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Bean
+public class ArticleServiceProvider extends JbootServiceBase
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.utils.StrUtil;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("article")
-public class ArticleDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
- String idOrSlug = getPara(0, scope);
- Article article = getArticle(idOrSlug);
-
- if (article == null) {
- return;
- }
-
- scope.setLocal("article", article);
- renderBody(env, scope, writer);
- }
-
- private Article getArticle(String idOrSlug) {
- return StrUtil.isNumeric(idOrSlug)
- ? service.findById(idOrSlug)
- : service.findFirstBySlug(idOrSlug);
- }
-
-
- @Override
- public boolean hasEnd() {
- return true;
- }
-}
+/**
+ * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.utils.StrUtil;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("article")
+public class ArticleDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+ String idOrSlug = getPara(0, scope);
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+ Article article = getArticle(idOrSlug);
+
+ // 当设置了hidden的flag时,文章不可见
+ if (article == null || (hiddenFlag && "hidden".equals(article.getFlag()))) {
+ return;
+ }
+
+ scope.setLocal("article", article);
+ renderBody(env, scope, writer);
+ }
+
+ private Article getArticle(String idOrSlug) {
+ return StrUtil.isNumeric(idOrSlug)
+ ? service.findById(idOrSlug)
+ : service.findFirstBySlug(idOrSlug);
+ }
+
+
+ @Override
+ public boolean hasEnd() {
+ return true;
+ }
+}
diff --git a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/ArticlePageDirective.java b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/ArticlePageDirective.java
index 354ee9249..e74c63999 100644
--- a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/ArticlePageDirective.java
+++ b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/ArticlePageDirective.java
@@ -1,108 +1,110 @@
-/**
- * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.core.Controller;
-import com.jfinal.core.JFinal;
-import com.jfinal.plugin.activerecord.Page;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.web.controller.JbootControllerContext;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jboot.web.directive.base.PaginateDirectiveBase;
-import io.jpress.JPressOptions;
-import io.jpress.commons.directive.DirectveKit;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.model.ArticleCategory;
-import io.jpress.module.article.service.ArticleService;
-
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("articlePage")
-public class ArticlePageDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- Controller controller = JbootControllerContext.get();
-
- int page = controller.getParaToInt(1, 1);
- int pageSize = getParaToInt("pageSize", scope, 10);
- String orderBy = getPara("orderBy", scope, "id desc");
-
- // 可以指定当前的分类ID
- Long categoryId = getParaToLong("categoryId", scope, 0L);
- ArticleCategory category = controller.getAttr("category");
-
- if (categoryId == 0 && category != null) {
- categoryId = category.getId();
- }
-
- Page
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.core.Controller;
+import com.jfinal.core.JFinal;
+import com.jfinal.plugin.activerecord.Page;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.web.controller.JbootControllerContext;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jboot.web.directive.base.PaginateDirectiveBase;
+import io.jpress.JPressOptions;
+import io.jpress.commons.directive.DirectveKit;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.model.ArticleCategory;
+import io.jpress.module.article.service.ArticleService;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("articlePage")
+public class ArticlePageDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ Controller controller = JbootControllerContext.get();
+
+ int page = controller.getParaToInt(1, 1);
+ int pageSize = getParaToInt("pageSize", scope, 10);
+ // 当flag设置为hidden,文章列表页不可见,通过hidden参数触发
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+ String orderBy = getPara("orderBy", scope, "id desc");
+
+ // 可以指定当前的分类ID
+ Long categoryId = getParaToLong("categoryId", scope, 0L);
+ ArticleCategory category = controller.getAttr("category");
+
+ if (categoryId == 0 && category != null) {
+ categoryId = category.getId();
+ }
+
+ Page
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.core.Controller;
-import com.jfinal.plugin.activerecord.Page;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.utils.StrUtil;
-import io.jboot.web.controller.JbootControllerContext;
-import io.jboot.web.directive.JbootPaginateDirective;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("articleSearchPage")
-public class ArticleSearchPageDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService articleService;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- Controller controller = JbootControllerContext.get();
-
- String keyword = controller.getAttr("keyword");
- int page = controller.getAttr("page");
- int pageSize = getParaToInt("pageSize", scope, 10);
-
- Page
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import java.util.List;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.core.Controller;
+import com.jfinal.plugin.activerecord.Page;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.utils.StrUtil;
+import io.jboot.web.controller.JbootControllerContext;
+import io.jboot.web.directive.JbootPaginateDirective;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("articleSearchPage")
+public class ArticleSearchPageDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService articleService;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ Controller controller = JbootControllerContext.get();
+
+ String keyword = controller.getAttr("keyword");
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+ int page = controller.getAttr("page");
+ int pageSize = getParaToInt("pageSize", scope, 10);
+
+ Page
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.db.model.Columns;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-import java.util.List;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("articles")
-public class ArticlesDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- String flag = getPara("flag", scope);
- String style = getPara("style", scope);
- Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
- String orderBy = getPara("orderBy", scope, "id desc");
- int count = getParaToInt("count", scope, 10);
-
-
- Columns columns = Columns.create();
-
- columns.add("flag", flag);
- columns.add("style", style);
- columns.add("status", Article.STATUS_NORMAL);
-
- if (hasThumbnail != null) {
- if (hasThumbnail) {
- columns.isNotNull("thumbnail");
- } else {
- columns.isNull("thumbnail");
- }
- }
-
- List
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.db.model.Columns;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+import java.util.List;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("articles")
+public class ArticlesDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ String flag = getPara("flag", scope);
+ String style = getPara("style", scope);
+ Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
+ String orderBy = getPara("orderBy", scope, "id desc");
+ // 隐藏部分不想展示的文章
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+ int count = getParaToInt("count", scope, 10);
+
+
+ Columns columns = Columns.create();
+
+ columns.add("flag", flag);
+ columns.add("style", style);
+ columns.add("status", Article.STATUS_NORMAL);
+
+ // 当flag设置为articleSoftHidden时,文章列表页不可见,当flag设置为articleHardHidden时,文章列表页,文章内容页不可见
+ if(hiddenFlag) {
+ columns.ne("flag", "hidden");
+ }
+
+ if (hasThumbnail != null) {
+ if (hasThumbnail) {
+ columns.isNotNull("thumbnail");
+ } else {
+ columns.isNull("thumbnail");
+ }
+ }
+
+ List
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.utils.StrUtil;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.model.ArticleCategory;
-import io.jpress.module.article.service.ArticleCategoryService;
-import io.jpress.module.article.service.ArticleService;
-
-import java.util.List;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("categoryArticles")
-public class CategoryArticlesDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Inject
- private ArticleCategoryService categoryService;
-
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- Long categoryId = getParaToLong("categoryId", scope);
- String flag = getPara("categoryFlag", scope);
-
- if (StrUtil.isBlank(flag) && categoryId == null) {
- throw new IllegalArgumentException("#categoryArticles(categoryFlag=xxx,categoryId=xxx) is error, " +
- "categoryFlag or categoryId must not be empty. " + getLocation());
- }
-
- Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
- String orderBy = getPara("orderBy", scope, "order_number desc,id desc");
- int count = getParaToInt("count", scope, 10);
-
- ArticleCategory category = categoryId != null
- ? categoryService.findById(categoryId)
- : categoryService.findFirstByFlag(flag);
- if (category == null) {
- return;
- }
-
- scope.setLocal("category", category);
-
- List
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.utils.StrUtil;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.model.ArticleCategory;
+import io.jpress.module.article.service.ArticleCategoryService;
+import io.jpress.module.article.service.ArticleService;
+
+import java.util.List;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("categoryArticles")
+public class CategoryArticlesDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Inject
+ private ArticleCategoryService categoryService;
+
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ Long categoryId = getParaToLong("categoryId", scope);
+ String flag = getPara("categoryFlag", scope);
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+
+ if (StrUtil.isBlank(flag) && categoryId == null) {
+ throw new IllegalArgumentException("#categoryArticles(categoryFlag=xxx,categoryId=xxx) is error, " +
+ "categoryFlag or categoryId must not be empty. " + getLocation());
+ }
+
+ Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
+ String orderBy = getPara("orderBy", scope, "order_number desc,id desc");
+ int count = getParaToInt("count", scope, 10);
+
+ ArticleCategory category = categoryId != null
+ ? categoryService.findById(categoryId)
+ : categoryService.findFirstByFlag(flag);
+ if (category == null) {
+ return;
+ }
+
+ scope.setLocal("category", category);
+
+ List
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.web.controller.JbootControllerContext;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("nextArticle")
-public class NextArticleDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
- Article article = JbootControllerContext.get().getAttr("article");
-
- Article nextArticle = service.findNextById(article.getId());
- if (nextArticle == null) {
- return;
- }
-
- scope.setLocal("next", nextArticle);
- renderBody(env, scope, writer);
- }
-
- @Override
- public boolean hasEnd() {
- return true;
- }
-}
+/**
+ * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.web.controller.JbootControllerContext;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("nextArticle")
+public class NextArticleDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+ Article article = JbootControllerContext.get().getAttr("article");
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+
+ Article nextArticle = hiddenFlag ? service.findNextByIdNotHidden(article.getId()) : service.findNextById(article.getId());
+ if (nextArticle == null) {
+ return;
+ }
+
+ scope.setLocal("next", nextArticle);
+ renderBody(env, scope, writer);
+ }
+
+ @Override
+ public boolean hasEnd() {
+ return true;
+ }
+}
diff --git a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/PreviousArticleDirective.java b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/PreviousArticleDirective.java
index c83df0d45..3c0ed31be 100644
--- a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/PreviousArticleDirective.java
+++ b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/PreviousArticleDirective.java
@@ -1,56 +1,57 @@
-/**
- * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.web.controller.JbootControllerContext;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("previousArticle")
-public class PreviousArticleDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
- Article article = JbootControllerContext.get().getAttr("article");
-
- Article previousArticle = service.findPreviousById(article.getId());
- if (previousArticle == null) {
- return;
- }
-
- scope.setLocal("previous", previousArticle);
- renderBody(env, scope, writer);
- }
-
- @Override
- public boolean hasEnd() {
- return true;
- }
-}
+/**
+ * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
+ *
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.web.controller.JbootControllerContext;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("previousArticle")
+public class PreviousArticleDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+ Article article = JbootControllerContext.get().getAttr("article");
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+
+ Article previousArticle = hiddenFlag ? service.findPreviousByIdNotHidden(article.getId()) : service.findPreviousById(article.getId());
+ if (previousArticle == null) {
+ return;
+ }
+
+ scope.setLocal("previous", previousArticle);
+ renderBody(env, scope, writer);
+ }
+
+ @Override
+ public boolean hasEnd() {
+ return true;
+ }
+}
diff --git a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/RelevantArticlesDirective.java b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/RelevantArticlesDirective.java
index 4f19dff89..8623f3b0c 100644
--- a/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/RelevantArticlesDirective.java
+++ b/module-article/module-article-web/src/main/java/io/jpress/module/article/directive/RelevantArticlesDirective.java
@@ -1,68 +1,70 @@
-/**
- * Copyright (c) 2016-2020, Michael Yang 杨福海 (fuhai999@gmail.com).
- *
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleCategoryService;
-import io.jpress.module.article.service.ArticleService;
-
-import java.util.List;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- * @Title: 相关文章
- */
-@JFinalDirective("relevantArticles")
-public class RelevantArticlesDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Inject
- private ArticleCategoryService categoryService;
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
- Article article = getPara(0, scope);
- if (article == null) {
- throw new IllegalArgumentException("#relevantArticles(...) argument must not be null or empty." + getLocation());
- }
-
- //默认值 3
- int count = getParaToInt(1, scope, 3);
-
- List
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleCategoryService;
+import io.jpress.module.article.service.ArticleService;
+
+import java.util.List;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ * @Title: 相关文章
+ */
+@JFinalDirective("relevantArticles")
+public class RelevantArticlesDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Inject
+ private ArticleCategoryService categoryService;
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+ Article article = getPara(0, scope);
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+
+ if (article == null) {
+ throw new IllegalArgumentException("#relevantArticles(...) argument must not be null or empty." + getLocation());
+ }
+
+ //默认值 3
+ int count = getParaToInt(1, scope, 3);
+
+ List
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.utils.StrUtil;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.model.ArticleCategory;
-import io.jpress.module.article.service.ArticleCategoryService;
-import io.jpress.module.article.service.ArticleService;
-
-import java.util.List;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("tagArticles")
-public class TagArticlesDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
- @Inject
- private ArticleCategoryService categoryService;
-
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- String tag = getPara("tag", scope);
-
- if (StrUtil.isBlank(tag)) {
- throw new IllegalArgumentException("#tagArticles() args is error, tag must not be empty." + getLocation());
- }
-
-
- Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
- String orderBy = getPara("orderBy", scope, "order_number desc,id desc");
- int count = getParaToInt("count", scope, 10);
-
- ArticleCategory category = categoryService.findFirstByTypeAndSlug(ArticleCategory.TYPE_TAG, tag);
- if (category == null) {
- return;
- }
-
- scope.setLocal("tag", category);
-
- List
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.utils.StrUtil;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.model.ArticleCategory;
+import io.jpress.module.article.service.ArticleCategoryService;
+import io.jpress.module.article.service.ArticleService;
+
+import java.util.List;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("tagArticles")
+public class TagArticlesDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+ @Inject
+ private ArticleCategoryService categoryService;
+
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ String tag = getPara("tag", scope);
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+
+ if (StrUtil.isBlank(tag)) {
+ throw new IllegalArgumentException("#tagArticles() args is error, tag must not be empty." + getLocation());
+ }
+
+
+ Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);
+ String orderBy = getPara("orderBy", scope, "order_number desc,id desc");
+ int count = getParaToInt("count", scope, 10);
+
+ ArticleCategory category = categoryService.findFirstByTypeAndSlug(ArticleCategory.TYPE_TAG, tag);
+ if (category == null) {
+ return;
+ }
+
+ scope.setLocal("tag", category);
+
+ List
- * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.gnu.org/licenses/lgpl-3.0.txt
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.jpress.module.article.directive;
-
-import com.jfinal.aop.Inject;
-import com.jfinal.template.Env;
-import com.jfinal.template.io.Writer;
-import com.jfinal.template.stat.Scope;
-import io.jboot.db.model.Columns;
-import io.jboot.web.controller.JbootControllerContext;
-import io.jboot.web.directive.annotation.JFinalDirective;
-import io.jboot.web.directive.base.JbootDirectiveBase;
-import io.jpress.model.User;
-import io.jpress.module.article.model.Article;
-import io.jpress.module.article.service.ArticleService;
-
-import java.util.List;
-
-/**
- * @author Michael Yang 杨福海 (fuhai999@gmail.com)
- * @version V1.0
- */
-@JFinalDirective("userArticles")
-public class UserArticlesDirective extends JbootDirectiveBase {
-
- @Inject
- private ArticleService service;
-
-
- @Override
- public void onRender(Env env, Scope scope, Writer writer) {
-
- Long userId = getParaToLong("userId", scope);
- User user = JbootControllerContext.get().getAttr("user");
-
- if (userId == null && user == null) {
- throw new RuntimeException("#userArticles() args is error,userId must not be null." + getLocation());
- }
-
- if (userId == null) {
- userId = user.getId();
- }
-
- String orderBy = getPara("orderBy", scope, "id desc");
- String status = getPara("status", scope, Article.STATUS_NORMAL);
- int count = getParaToInt("count", scope, 10);
-
-
- Columns columns = Columns.create("user_id", userId);
- columns.add("status", status);
-
- List
+ * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.gnu.org/licenses/lgpl-3.0.txt
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.jpress.module.article.directive;
+
+import com.jfinal.aop.Inject;
+import com.jfinal.template.Env;
+import com.jfinal.template.io.Writer;
+import com.jfinal.template.stat.Scope;
+import io.jboot.db.model.Columns;
+import io.jboot.web.controller.JbootControllerContext;
+import io.jboot.web.directive.annotation.JFinalDirective;
+import io.jboot.web.directive.base.JbootDirectiveBase;
+import io.jpress.model.User;
+import io.jpress.module.article.model.Article;
+import io.jpress.module.article.service.ArticleService;
+
+import java.util.List;
+
+/**
+ * @author Michael Yang 杨福海 (fuhai999@gmail.com)
+ * @version V1.0
+ */
+@JFinalDirective("userArticles")
+public class UserArticlesDirective extends JbootDirectiveBase {
+
+ @Inject
+ private ArticleService service;
+
+
+ @Override
+ public void onRender(Env env, Scope scope, Writer writer) {
+
+ Long userId = getParaToLong("userId", scope);
+ Boolean hiddenFlag = getParaToBool("hiddenFlag", scope, false);
+ User user = JbootControllerContext.get().getAttr("user");
+
+ if (userId == null && user == null) {
+ throw new RuntimeException("#userArticles() args is error,userId must not be null." + getLocation());
+ }
+
+ if (userId == null) {
+ userId = user.getId();
+ }
+
+ String orderBy = getPara("orderBy", scope, "id desc");
+ String status = getPara("status", scope, Article.STATUS_NORMAL);
+ int count = getParaToInt("count", scope, 10);
+
+
+ Columns columns = Columns.create("user_id", userId);
+ columns.add("status", status);
+ if(hiddenFlag) {
+ columns.ne("flag", "hidden");
+ }
+
+ List