From c8959be45b1f4930535407fe76f155e1af55250e Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Tue, 23 Jun 2020 19:11:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B4=94=E5=AE=9D=E9=93=96=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 1 - .../newsdirectories/NewsDirectoriesDTO.java | 10 ++++++++++ .../newsdirectories-mapper.xml | 20 ++++++++----------- .../wangEditor-fullscreen-plugin.js | 5 ++++- .../update-newsdirectories.html | 2 ++ .../route/newstemplate/list-newstemplate.html | 4 ++-- 6 files changed, 26 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index f9e5975..f58ad26 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,6 @@ java-emoji-converter 0.1.1 - diff --git a/src/main/java/com/cm/news/pojo/dtos/newsdirectories/NewsDirectoriesDTO.java b/src/main/java/com/cm/news/pojo/dtos/newsdirectories/NewsDirectoriesDTO.java index b8ce977..39b139e 100644 --- a/src/main/java/com/cm/news/pojo/dtos/newsdirectories/NewsDirectoriesDTO.java +++ b/src/main/java/com/cm/news/pojo/dtos/newsdirectories/NewsDirectoriesDTO.java @@ -34,6 +34,16 @@ public class NewsDirectoriesDTO { private String directoriesSummary; @ApiModelProperty(name = "directoriesPhoto", value = "版块图标") private String directoriesPhoto; + @ApiModelProperty(name = "directoriesParentName", value = "父版块名称") + private String directoriesParentName; + + public String getDirectoriesParentName() { + return directoriesParentName == null ? "" : directoriesParentName; + } + + public void setDirectoriesParentName(String directoriesParentName) { + this.directoriesParentName = directoriesParentName; + } public String getNewsDirectoriesId() { return newsDirectoriesId == null ? "" : newsDirectoriesId; diff --git a/src/main/resources/mybatis/mapper/newsdirectories/newsdirectories-mapper.xml b/src/main/resources/mybatis/mapper/newsdirectories/newsdirectories-mapper.xml index 23ee95f..83a5031 100644 --- a/src/main/resources/mybatis/mapper/newsdirectories/newsdirectories-mapper.xml +++ b/src/main/resources/mybatis/mapper/newsdirectories/newsdirectories-mapper.xml @@ -166,9 +166,14 @@ t1.directories_sort, t1.directories_summary, t1.directories_photo, - t1.news_directories_id + t1.news_directories_id, + t2.directories_name AS directoriesParentName FROM gen_news_directories t1 + LEFT JOIN + gen_news_directories t2 + ON + t1.directories_parent_id = t2.news_directories_id WHERE t1.is_delete = 0 @@ -225,17 +230,8 @@ #{newsDirectoriesIds[${index}]} - GROUP BY - t1.directories_parent_id, - t1.directories_name, - t1.directories_code, - t1.directories_description, - t1.directories_switch, - t1.directories_check, - t1.directories_sort, - t1.directories_summary, - t1.directories_photo, - t1.news_directories_id + ORDER BY + directories_sort, directories_code diff --git a/src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js b/src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js index 617a0b8..b4eb064 100644 --- a/src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js +++ b/src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js @@ -20,7 +20,10 @@ window.wangEditor.fullscreen = { }, customInsert: function (insertImg, result, editor) { console.log(result); - var url = 'http://192.168.0.104:8082/news/' + result.data[0]; + var locat = (window.location+'').split('/'); + var server = locat[0]+'//'+locat[2]+'/'+locat[3] + "/"; + console.log(server) + var url = server + result.data[0]; insertImg(url); } }; diff --git a/src/main/resources/static/route/newsdirectories/update-newsdirectories.html b/src/main/resources/static/route/newsdirectories/update-newsdirectories.html index 3145ca9..bdc561c 100644 --- a/src/main/resources/static/route/newsdirectories/update-newsdirectories.html +++ b/src/main/resources/static/route/newsdirectories/update-newsdirectories.html @@ -242,6 +242,8 @@ function initData() { var loadLayerIndex; top.restAjax.get(top.restAjax.path('api/newsdirectories/getnewsdirectoriesbyid/{newsDirectoriesId}', [newsDirectoriesId]), {}, null, function(code, data) { + console.log(data.directoriesParentName) + console.log(data.directoriesParentId) data.directoriesParentName = data.directoriesParentId == '0' ? '根节点' : data.directoriesParentName; var dataFormData = {}; for(var i in data) { diff --git a/src/main/resources/static/route/newstemplate/list-newstemplate.html b/src/main/resources/static/route/newstemplate/list-newstemplate.html index 6b8895b..deb956e 100644 --- a/src/main/resources/static/route/newstemplate/list-newstemplate.html +++ b/src/main/resources/static/route/newstemplate/list-newstemplate.html @@ -247,7 +247,7 @@ type: 2, title: false, closeBtn: 0, - area: ['98%', '98%'], + area: ['100%', '100%'], shadeClose: true, anim: 2, content: top.restAjax.path('route/newstemplate/save-newstemplate.html', []), @@ -265,7 +265,7 @@ type: 2, title: false, closeBtn: 0, - area: ['95%', '95%'], + area: ['100%', '100%'], shadeClose: true, anim: 2, content: top.restAjax.path('route/newstemplate/update-newstemplate.html?newsTemplateId={newsTemplateId}', [checkDatas[0].newsTemplateId]),