From 4e03ca33cb5f197f4c038157b5ea0e5a438f75dc Mon Sep 17 00:00:00 2001 From: panpp <805820766@qq.com> Date: Mon, 3 Aug 2020 18:57:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ms-mcms.iml | 234 ++++++++++++++++++ .../mingsoft/cms/action/web/MCmsAction.java | 4 +- .../java/net/mingsoft/cms/dao/IContentDao.xml | 1 - src/main/resources/application-dev.yml | 6 +- src/main/resources/application.yml | 1 - 5 files changed, 239 insertions(+), 7 deletions(-) create mode 100644 ms-mcms.iml diff --git a/ms-mcms.iml b/ms-mcms.iml new file mode 100644 index 00000000..4279948c --- /dev/null +++ b/ms-mcms.iml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java index 06da7f35..295d9e82 100644 --- a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java @@ -193,13 +193,13 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction { //参数文章编号 ContentEntity article = (ContentEntity) contentBiz.getEntity(BasicUtil.getInt(ParserUtil.ID)); if(ObjectUtil.isNull(article)){ - this.outJson(resp, null,false,getResString("err.empty", this.getResString("id"))); + this.outJson(resp,false,getResString("err.empty", this.getResString("id"))); return; } if(StringUtils.isNotBlank(order)){ //防注入 if(!order.toLowerCase().equals("asc")&&!order.toLowerCase().equals("desc")){ - this.outJson(resp, null,false,getResString("err.error", this.getResString("order"))); + this.outJson(resp,false,getResString("err.error", this.getResString("order"))); return; } } diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml index c698ca02..97cfd44f 100644 --- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml @@ -207,7 +207,6 @@ and ct.update_by=#{updateBy} and update_date=#{updateDate} and ct.del=#{del} - order by id desc diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index ae8cc16a..4e90b22a 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,7 +1,7 @@ spring: datasource: - url: jdbc:mysql://192.168.0.8:3316/mcms-5.1-3000?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai - username: mcms - password: mcms + url: jdbc:mysql://localhost:3306/wx-5.1?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai + username: root + password: root filters: wall,mergeStat type: com.alibaba.druid.pool.DruidDataSource diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2ffef36e..d7fc1b60 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,5 @@ server: port: 8080 - servlet.context-path: /ms-mcms servlet.session.timeout: P0DT60M0S #D天H小时M分钟S秒,字符T是紧跟在时分秒之前的,每个单位都必须由数字开始,且时分秒顺序不能乱 logging: From 78a8b4c48c3a9c83b7b70e0d2816ac5af23a33f2 Mon Sep 17 00:00:00 2001 From: sgjj <995959152@qq.com> Date: Thu, 6 Aug 2020 10:15:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=8F=E7=9B=AE?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/mingsoft/cms/action/CategoryAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/mingsoft/cms/action/CategoryAction.java b/src/main/java/net/mingsoft/cms/action/CategoryAction.java index 8064a038..e79c3eb8 100644 --- a/src/main/java/net/mingsoft/cms/action/CategoryAction.java +++ b/src/main/java/net/mingsoft/cms/action/CategoryAction.java @@ -249,10 +249,10 @@ public class CategoryAction extends BaseAction{ CategoryEntity categoryEntity=new CategoryEntity(); categoryEntity.setCategoryPinyin(pingYin); categoryEntity.setAppId(BasicUtil.getAppId()); - Object categoryBizEntity = categoryBiz.getEntity(categoryEntity); + CategoryEntity categoryBizEntity = (CategoryEntity)categoryBiz.getEntity(categoryEntity); category.setCategoryPinyin(pingYin); //如果存在此拼音栏目则拼接上id - if(categoryBizEntity!=null){ + if(categoryBizEntity!=null&&!categoryBizEntity.getId().equals(category.getId())){ category.setCategoryPinyin(pingYin+category.getId()); } //判断是否选择子级为所属栏目