StringUtils增加splitComma、joinComma
This commit is contained in:
@@ -102,7 +102,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
return list;
|
||||
}
|
||||
Article where = new Article();
|
||||
where.setId_in(StringUtils.split(ids, ","));
|
||||
where.setId_in(StringUtils.splitComma(ids));
|
||||
dao.findList(where).forEach((e) -> {
|
||||
list.add(new Object[] { e.getCategory().getId(), e.getId(), StringUtils.abbr(e.getTitle(), 50) });
|
||||
});
|
||||
|
||||
@@ -147,7 +147,7 @@ public class CmsUtils {
|
||||
|
||||
// 增加获取层次级别条件
|
||||
List<Integer> sortGradeList = ListUtils.newArrayList();
|
||||
for (String s : StringUtils.split(sortGrades, ",")) {
|
||||
for (String s : StringUtils.splitComma(sortGrades)) {
|
||||
sortGradeList.add(ObjectUtils.toInteger(s));
|
||||
}
|
||||
category.setSortGradeList(sortGradeList);
|
||||
@@ -370,7 +370,7 @@ public class CmsUtils {
|
||||
String outlineViewOfSiteCodes = Global.getConfig("cms.article.outlineViewOfSiteCodes");
|
||||
if (StringUtils.isNotBlank(outlineViewOfSiteCodes) && !"0".equals(outlineViewOfSiteCodes)) {
|
||||
if (category.getSite() != null && StringUtils.isNotBlank(category.getSite().getSiteCode())) {
|
||||
if (StringUtils.inString(category.getSite().getSiteCode(), StringUtils.split(outlineViewOfSiteCodes, ","))) {
|
||||
if (StringUtils.inString(category.getSite().getSiteCode(), StringUtils.splitComma(outlineViewOfSiteCodes))) {
|
||||
if (!StringUtils.contains(str.toString(), "&outlineView=")) {
|
||||
str.append("&outlineView=true");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user