5.2.6 发布

master
mingsoft 4 years ago
parent 446ac0ec36
commit 15b5c15be3
  1. 99
      doc/mcms-5.2.6.sql
  2. 4
      src/main/java/net/mingsoft/cms/action/BaseAction.java
  3. 4
      src/main/java/net/mingsoft/cms/action/CategoryAction.java
  4. 4
      src/main/java/net/mingsoft/cms/action/ContentAction.java
  5. 4
      src/main/java/net/mingsoft/cms/action/GeneraterAction.java
  6. 4
      src/main/java/net/mingsoft/cms/action/web/CategoryAction.java
  7. 4
      src/main/java/net/mingsoft/cms/action/web/ContentAction.java
  8. 4
      src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
  9. 4
      src/main/java/net/mingsoft/cms/aop/ContentAop.java
  10. 4
      src/main/java/net/mingsoft/cms/bean/CategoryBean.java
  11. 4
      src/main/java/net/mingsoft/cms/bean/ContentBean.java
  12. 4
      src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
  13. 4
      src/main/java/net/mingsoft/cms/biz/IContentBiz.java
  14. 4
      src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
  15. 8
      src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
  16. 4
      src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
  17. 4
      src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java
  18. 4
      src/main/java/net/mingsoft/cms/constant/Const.java
  19. 4
      src/main/java/net/mingsoft/cms/constant/e/CategoryTypeEnum.java
  20. 4
      src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
  21. 4
      src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java
  22. 4
      src/main/java/net/mingsoft/cms/dao/IContentDao.java
  23. 4
      src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
  24. 4
      src/main/java/net/mingsoft/cms/entity/ContentEntity.java
  25. 4
      src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
  26. 60
      src/main/java/net/mingsoft/cms/upgrade/Upgrade.java
  27. 4
      src/main/java/net/mingsoft/cms/util/CmsParserUtil.java

File diff suppressed because one or more lines are too long

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.action; package net.mingsoft.cms.action;
import java.util.MissingResourceException; import java.util.MissingResourceException;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.action; package net.mingsoft.cms.action;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.action; package net.mingsoft.cms.action;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -20,6 +20,8 @@
*/ */
package net.mingsoft.cms.action; package net.mingsoft.cms.action;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.action.web; package net.mingsoft.cms.action.web;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.action.web; package net.mingsoft.cms.action.web;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -20,6 +20,8 @@
*/ */
package net.mingsoft.cms.action.web; package net.mingsoft.cms.action.web;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.aop; package net.mingsoft.cms.aop;
import net.mingsoft.basic.aop.BaseAop; import net.mingsoft.basic.aop.BaseAop;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.bean; package net.mingsoft.cms.bean;
import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.CategoryEntity;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.bean; package net.mingsoft.cms.bean;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.biz; package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz; import net.mingsoft.base.biz.IBaseBiz;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.biz; package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz; import net.mingsoft.base.biz.IBaseBiz;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.biz; package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz; import net.mingsoft.base.biz.IBaseBiz;

@ -1,16 +1,16 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so, * the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions: * subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all * The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. * copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
@ -20,6 +20,8 @@
*/ */
package net.mingsoft.cms.biz.impl; package net.mingsoft.cms.biz.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -20,6 +20,8 @@
*/ */
package net.mingsoft.cms.biz.impl; package net.mingsoft.cms.biz.impl;
import net.mingsoft.base.biz.impl.BaseBizImpl; import net.mingsoft.base.biz.impl.BaseBizImpl;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -20,6 +20,8 @@
*/ */
package net.mingsoft.cms.biz.impl; package net.mingsoft.cms.biz.impl;
import net.mingsoft.cms.biz.IHistoryLogBiz; import net.mingsoft.cms.biz.IHistoryLogBiz;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.constant; package net.mingsoft.cms.constant;
/** /**

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -19,6 +19,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.constant.e; package net.mingsoft.cms.constant.e;
import net.mingsoft.base.constant.e.BaseEnum; import net.mingsoft.base.constant.e.BaseEnum;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.dao; package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao; import net.mingsoft.base.dao.IBaseDao;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.dao; package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao; import net.mingsoft.base.dao.IBaseDao;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.dao; package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao; import net.mingsoft.base.dao.IBaseDao;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.entity; package net.mingsoft.cms.entity;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.entity; package net.mingsoft.cms.entity;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.entity; package net.mingsoft.cms.entity;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;

@ -1,60 +0,0 @@
package net.mingsoft.cms.upgrade;
import net.mingsoft.basic.util.SpringUtil;
import net.mingsoft.cms.biz.ICategoryBiz;
import net.mingsoft.cms.entity.CategoryEntity;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author by 铭飞开源团队
* @Description
* @date 2020/6/19 15:58
*/
public class Upgrade {
/**
* 更新栏目分类的顶级节点和叶子节点
*/
public void upgrade(){
ICategoryBiz categoryBiz = SpringUtil.getBean(ICategoryBiz.class);
List<CategoryEntity> list = categoryBiz.queryAll();
list.forEach(x->{
//将parentId第一行设为顶级节点
String topId = "0";
String parentId = x.getParentids();
if (parentId != null) {
topId = parentId.split(",")[0];
}
x.setTopId(topId);
String id = x.getId();
boolean leaf = true;
//判断是否叶子,循环查找,如果有节点的父节点中包含该节点的id则判断为否跳出循环
for (int i = 0; i< list.size(); i++) {
String pId = list.get(i).getParentids();
if (pId == null) {
continue;
}
leaf = !pId.contains(id);
//如果不是叶子就跳出循环,不需要再判断了
if (!leaf) {
break;
}
}
x.setLeaf(leaf);
//更新
Map<String, String> fields = new HashMap<>();
fields.put("leaf", x.getLeaf()?"1":"0");
fields.put("top_id", x.getTopId());
Map<String, String> where = new HashMap<>();
where.put("id", x.getId());
categoryBiz.updateBySQL("cms_category", fields, where);
});
}
}

@ -1,6 +1,6 @@
/** /**
* The MIT License (MIT) * The MIT License (MIT)
* Copyright (c) 2020 铭软科技(mingsoft.net) * Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in * this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to * the Software without restriction, including without limitation the rights to
@ -18,6 +18,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
package net.mingsoft.cms.util; package net.mingsoft.cms.util;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;

Loading…
Cancel
Save