Commit 644f0bdc authored by msgroup's avatar msgroup Committed by mingsoft

fix:待发布版本

Signed-off-by: 's avatarmingsoft <killfen@126.com>
parent f66c6298
...@@ -18,27 +18,27 @@ ...@@ -18,27 +18,27 @@
* 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;
/** /**
* @Author: 铭飞开源团队--huise * @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:47 * @Date: 2019/8/9 20:47
*/ */
public class BaseAction extends net.mingsoft.basic.action.BaseAction{ public class BaseAction extends net.mingsoft.basic.action.BaseAction{
@Override @Override
protected String getResString(String key) { protected String getResString(String key) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
String str = ""; String str = "";
try { try {
str = super.getResString(key); str = super.getResString(key);
} catch (MissingResourceException e) { } catch (MissingResourceException e) {
str = getLocaleString(key,net.mingsoft.cms.constant.Const.RESOURCES); str = getLocaleString(key,net.mingsoft.cms.constant.Const.RESOURCES);
} }
return str; return str;
} }
} }
...@@ -18,33 +18,33 @@ ...@@ -18,33 +18,33 @@
* 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;
/** /**
* 文章实体 * 文章实体
* @author 铭飞开发团队 * @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/> * 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/> * 历史修订:<br/>
*/ */
public class CategoryBean extends CategoryEntity { public class CategoryBean extends CategoryEntity {
/** /**
* 文章编号 * 文章编号
*/ */
private String articleId; private String articleId;
public String getArticleId() { public String getArticleId() {
return articleId; return articleId;
} }
public void setArticleId(String articleId) { public void setArticleId(String articleId) {
this.articleId = articleId; this.articleId = articleId;
} }
} }
...@@ -18,44 +18,44 @@ ...@@ -18,44 +18,44 @@
* 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;
import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.CategoryEntity;
import java.util.List; import java.util.List;
/** /**
* 分类业务 * 分类业务
* @author 铭飞开发团队 * @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/> * 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/> * 历史修订:<br/>
*/ */
public interface ICategoryBiz extends IBaseBiz<CategoryEntity> { public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
/** /**
* 查询当前分类下的所有子分类,包含自身 * 查询当前分类下的所有子分类,包含自身
* @param category 通过setId指定栏目id * @param category 通过setId指定栏目id
* @return * @return
*/ */
List<CategoryEntity> queryChildren(CategoryEntity category); List<CategoryEntity> queryChildren(CategoryEntity category);
void saveEntity(CategoryEntity entity); void saveEntity(CategoryEntity entity);
/**更新父级及子集 /**更新父级及子集
* @param entity * @param entity
*/ */
void updateEntity(CategoryEntity entity); void updateEntity(CategoryEntity entity);
/**只更新自身 /**只更新自身
* @param entity * @param entity
*/ */
void update(CategoryEntity entity); void update(CategoryEntity entity);
void delete(String categoryId); void delete(String categoryId);
void copyCategory(CategoryEntity entity); void copyCategory(CategoryEntity entity);
} }
...@@ -18,19 +18,19 @@ ...@@ -18,19 +18,19 @@
* 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;
/** /**
* 文章浏览记录业务 * 文章浏览记录业务
* @author 铭飞开发团队 * @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/> * 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/> * 历史修订:<br/>
*/ */
public interface IHistoryLogBiz extends IBaseBiz { public interface IHistoryLogBiz extends IBaseBiz {
} }
...@@ -18,17 +18,17 @@ ...@@ -18,17 +18,17 @@
* 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;
/** /**
* @Author: 铭飞开源团队--huise * @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:51 * @Date: 2019/8/9 20:51
*/ */
public class Const { public class Const {
/** /**
* 资源文件 * 资源文件
*/ */
public final static String RESOURCES = "net.mingsoft.cms.resources.resources"; public final static String RESOURCES = "net.mingsoft.cms.resources.resources";
} }
...@@ -18,30 +18,30 @@ ...@@ -18,30 +18,30 @@
* 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;
import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.CategoryEntity;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
/** /**
* 分类持久层 * 分类持久层
* @author 铭飞开发团队 * @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/> * 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/> * 历史修订:<br/>
*/ */
@Component("cmsCategoryDao") @Component("cmsCategoryDao")
public interface ICategoryDao extends IBaseDao<CategoryEntity> { public interface ICategoryDao extends IBaseDao<CategoryEntity> {
/** /**
* 查询当前分类下面的所有子分类 * 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId * @param category 必须存在categoryId categoryParentId
* @return * @return
*/ */
public List<CategoryEntity> queryChildren(CategoryEntity category); public List<CategoryEntity> queryChildren(CategoryEntity category);
} }
...@@ -18,17 +18,17 @@ ...@@ -18,17 +18,17 @@
* 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;
/** /**
* 文章浏览记录持久层 * 文章浏览记录持久层
* @author 铭飞开发团队 * @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/> * 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/> * 历史修订:<br/>
*/ */
public interface ICmsHistoryLogDao extends IBaseDao { public interface ICmsHistoryLogDao extends IBaseDao {
} }
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
* 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
...@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity; ...@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import net.mingsoft.base.entity.BaseEntity; import net.mingsoft.base.entity.BaseEntity;
import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.config.MSProperties;
import net.mingsoft.mdiy.util.ConfigUtil;
import java.io.File;
/** /**
* 分类实体 * 分类实体
...@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity { ...@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity {
*/ */
private String topId; private String topId;
/**
* 路径url
*/
@TableField(exist = false)
private String url;
/**
* 设置url路径
*
* @param url 路径的字符串
*/
public void setUrl(String url) {
this.url = url;
}
public Boolean getLeaf() { public Boolean getLeaf() {
return leaf; return leaf;
} }
...@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity { ...@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity {
* 获取栏目Id(标签使用) * 获取栏目Id(标签使用)
*/ */
public Boolean getTypeleaf() { public Boolean getTypeleaf() {
return this.leaf; } return this.leaf;
}
/** /**
...@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity { ...@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String typepath; private String typepath;
/** /**
* 获取栏目图片 (标签使用) * 获取栏目图片 (标签使用)
*/ */
...@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity { ...@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity {
this.childsize = childsize; this.childsize = childsize;
} }
/**
* 获取url路径
*
* @return url路径的字符串
*/
public String getUrl() {
String appDir = "";
String htmlDir = MSProperties.diy.htmlDir;
String categoryPath = this.getCategoryPath();
String categoryPinyin = this.getCategoryPinyin();
if (!(ConfigUtil.getBoolean("短链配置", "shortLinkSwitch", false))) {
//未开启短链
appDir = "/" + BasicUtil.getApp().getAppDir();
return url = "/" + htmlDir + appDir + categoryPath + "/index.html";
}
//开启短链后的url拼接
return url = "/" + htmlDir + appDir + "/" + categoryPinyin + ".html";
}
} }
...@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer {
@Bean @Bean
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable, public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable,
@Value("${ms.xss.filter-url}") String filterUrl, @Value("${ms.xss.filter-url}") String filterUrl,
@Value("${ms.xss.exclude-url}") String excludeUrl) { @Value("${ms.xss.exclude-url}") String excludeUrl,
@Value("${ms.xss.exclude-filed}") String excludeFiled) {
XSSEscapeFilter xssFilter = new XSSEscapeFilter(); XSSEscapeFilter xssFilter = new XSSEscapeFilter();
Map<String, String> initParameters = new HashMap(); Map<String, String> initParameters = new HashMap();
FilterRegistrationBean registration = new FilterRegistrationBean(); FilterRegistrationBean registration = new FilterRegistrationBean();
...@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer {
}else { }else {
xssFilter.excludes.add(MSProperties.manager.path + "/**"); xssFilter.excludes.add(MSProperties.manager.path + "/**");
} }
if (excludeFiled != null && StrUtil.isNotBlank(excludeFiled)) {
xssFilter.excludesFiled.addAll(Arrays.asList(excludeFiled.split(",")));
}
initParameters.put("isIncludeRichText", "false"); initParameters.put("isIncludeRichText", "false");
registration.setInitParameters(initParameters); registration.setInitParameters(initParameters);
registration.setFilter(xssFilter); registration.setFilter(xssFilter);
......
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
}, },
}, },
created() { created() {
this.likeTotal()
} }
}) })
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment