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 @@
* 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.
*/
package net.mingsoft.cms.action;
import java.util.MissingResourceException;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:47
*/
public class BaseAction extends net.mingsoft.basic.action.BaseAction{
@Override
protected String getResString(String key) {
// TODO Auto-generated method stub
String str = "";
try {
str = super.getResString(key);
} catch (MissingResourceException e) {
str = getLocaleString(key,net.mingsoft.cms.constant.Const.RESOURCES);
}
return str;
}
}
package net.mingsoft.cms.action;
import java.util.MissingResourceException;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:47
*/
public class BaseAction extends net.mingsoft.basic.action.BaseAction{
@Override
protected String getResString(String key) {
// TODO Auto-generated method stub
String str = "";
try {
str = super.getResString(key);
} catch (MissingResourceException e) {
str = getLocaleString(key,net.mingsoft.cms.constant.Const.RESOURCES);
}
return str;
}
}
......@@ -18,33 +18,33 @@
* 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.
*/
package net.mingsoft.cms.bean;
import net.mingsoft.cms.entity.CategoryEntity;
/**
* 文章实体
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
public class CategoryBean extends CategoryEntity {
/**
* 文章编号
*/
private String articleId;
public String getArticleId() {
return articleId;
}
public void setArticleId(String articleId) {
this.articleId = articleId;
}
}
package net.mingsoft.cms.bean;
import net.mingsoft.cms.entity.CategoryEntity;
/**
* 文章实体
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
public class CategoryBean extends CategoryEntity {
/**
* 文章编号
*/
private String articleId;
public String getArticleId() {
return articleId;
}
public void setArticleId(String articleId) {
this.articleId = articleId;
}
}
......@@ -18,44 +18,44 @@
* 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.
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
import net.mingsoft.cms.entity.CategoryEntity;
import java.util.List;
/**
* 分类业务
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
/**
* 查询当前分类下的所有子分类,包含自身
* @param category 通过setId指定栏目id
* @return
*/
List<CategoryEntity> queryChildren(CategoryEntity category);
void saveEntity(CategoryEntity entity);
/**更新父级及子集
* @param entity
*/
void updateEntity(CategoryEntity entity);
/**只更新自身
* @param entity
*/
void update(CategoryEntity entity);
void delete(String categoryId);
void copyCategory(CategoryEntity entity);
}
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
import net.mingsoft.cms.entity.CategoryEntity;
import java.util.List;
/**
* 分类业务
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
public interface ICategoryBiz extends IBaseBiz<CategoryEntity> {
/**
* 查询当前分类下的所有子分类,包含自身
* @param category 通过setId指定栏目id
* @return
*/
List<CategoryEntity> queryChildren(CategoryEntity category);
void saveEntity(CategoryEntity entity);
/**更新父级及子集
* @param entity
*/
void updateEntity(CategoryEntity entity);
/**只更新自身
* @param entity
*/
void update(CategoryEntity entity);
void delete(String categoryId);
void copyCategory(CategoryEntity entity);
}
......@@ -18,19 +18,19 @@
* 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.
*/
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
/**
* 文章浏览记录业务
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public interface IHistoryLogBiz extends IBaseBiz {
}
package net.mingsoft.cms.biz;
import net.mingsoft.base.biz.IBaseBiz;
/**
* 文章浏览记录业务
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public interface IHistoryLogBiz extends IBaseBiz {
}
......@@ -18,17 +18,17 @@
* 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.
*/
package net.mingsoft.cms.constant;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:51
*/
public class Const {
/**
* 资源文件
*/
public final static String RESOURCES = "net.mingsoft.cms.resources.resources";
}
package net.mingsoft.cms.constant;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:51
*/
public class Const {
/**
* 资源文件
*/
public final static String RESOURCES = "net.mingsoft.cms.resources.resources";
}
......@@ -18,30 +18,30 @@
* 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.
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.cms.entity.CategoryEntity;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 分类持久层
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
@Component("cmsCategoryDao")
public interface ICategoryDao extends IBaseDao<CategoryEntity> {
/**
* 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId
* @return
*/
public List<CategoryEntity> queryChildren(CategoryEntity category);
}
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
import net.mingsoft.cms.entity.CategoryEntity;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 分类持久层
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
@Component("cmsCategoryDao")
public interface ICategoryDao extends IBaseDao<CategoryEntity> {
/**
* 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId
* @return
*/
public List<CategoryEntity> queryChildren(CategoryEntity category);
}
......@@ -18,17 +18,17 @@
* 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.
*/
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
/**
* 文章浏览记录持久层
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public interface ICmsHistoryLogDao extends IBaseDao {
}
package net.mingsoft.cms.dao;
import net.mingsoft.base.dao.IBaseDao;
/**
* 文章浏览记录持久层
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
*/
public interface ICmsHistoryLogDao extends IBaseDao {
}
......@@ -7,10 +7,10 @@
* 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,
* subject to the following conditions:
* <p>
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* <p>
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
......@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*;
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 {
*/
private String topId;
/**
* 路径url
*/
@TableField(exist = false)
private String url;
/**
* 设置url路径
*
* @param url 路径的字符串
*/
public void setUrl(String url) {
this.url = url;
}
public Boolean getLeaf() {
return leaf;
}
......@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity {
* 获取栏目Id(标签使用)
*/
public Boolean getTypeleaf() {
return this.leaf; }
return this.leaf;
}
/**
......@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity {
@TableField(exist = false)
private String typepath;
/**
* 获取栏目图片 (标签使用)
*/
......@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity {
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 {
@Bean
public FilterRegistrationBean xssFilterRegistration(@Value("${ms.xss.enable:true}") boolean xssEnable,
@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();
Map<String, String> initParameters = new HashMap();
FilterRegistrationBean registration = new FilterRegistrationBean();
......@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer {
}else {
xssFilter.excludes.add(MSProperties.manager.path + "/**");
}
if (excludeFiled != null && StrUtil.isNotBlank(excludeFiled)) {
xssFilter.excludesFiled.addAll(Arrays.asList(excludeFiled.split(",")));
}
initParameters.put("isIncludeRichText", "false");
registration.setInitParameters(initParameters);
registration.setFilter(xssFilter);
......
......@@ -92,7 +92,6 @@
},
},
created() {
this.likeTotal()
}
})
</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