!209 修复无法保存空值问题,与后台管理首页获取并显示铭飞最新动态信息

Merge pull request !209 from 熊志伟123123/5.0.0
This commit is contained in:
铭飞 2020-01-09 17:05:14 +08:00 committed by Gitee
commit 5c770f518e
7 changed files with 70 additions and 22 deletions

View File

@ -163,9 +163,7 @@ public class CategoryAction extends BaseAction{
if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){ if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100")); return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100"));
} }
if(!StringUtil.checkLength(category.getCategoryFlag()+"", 1, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.flag"), "1", "100"));
}
if(!StringUtil.checkLength(category.getCategoryPath()+"", 1, 100)){ if(!StringUtil.checkLength(category.getCategoryPath()+"", 1, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100")); return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100"));
} }
@ -236,9 +234,7 @@ public class CategoryAction extends BaseAction{
if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){ if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100")); return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100"));
} }
if(!StringUtil.checkLength(category.getCategoryFlag()+"", 0, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.flag"), "1", "100"));
}
if(!StringUtil.checkLength(category.getCategoryPath()+"", 0, 100)){ if(!StringUtil.checkLength(category.getCategoryPath()+"", 0, 100)){
return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100")); return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100"));
} }

View File

@ -96,10 +96,10 @@
<if test="categorySort != null">category_sort=#{categorySort},</if> <if test="categorySort != null">category_sort=#{categorySort},</if>
<if test="categoryListUrl != null and categoryListUrl != ''">category_list_url=#{categoryListUrl},</if> <if test="categoryListUrl != null and categoryListUrl != ''">category_list_url=#{categoryListUrl},</if>
<if test="categoryUrl != null and categoryUrl != ''">category_url=#{categoryUrl},</if> <if test="categoryUrl != null and categoryUrl != ''">category_url=#{categoryUrl},</if>
<if test="categoryKeyword != null and categoryKeyword != ''">category_keyword=#{categoryKeyword},</if> <if test="categoryKeyword != null ">category_keyword=#{categoryKeyword},</if>
<if test="categoryDescrip != null and categoryDescrip != ''">category_descrip=#{categoryDescrip},</if> <if test="categoryDescrip != null ">category_descrip=#{categoryDescrip},</if>
<if test="categoryImg != null and categoryImg != ''">category_img=#{categoryImg},</if> <if test="categoryImg != null and categoryImg != ''">category_img=#{categoryImg},</if>
<if test="categoryDiyUrl != null and categoryDiyUrl != ''">category_diy_url=#{categoryDiyUrl},</if> <if test="categoryDiyUrl != null">category_diy_url=#{categoryDiyUrl},</if>
<if test="mdiyModelId != null and mdiyModelId != ''">mdiy_model_id=#{mdiyModelId},</if> <if test="mdiyModelId != null and mdiyModelId != ''">mdiy_model_id=#{mdiyModelId},</if>
<if test="categoryDatetime != null">category_datetime=#{categoryDatetime},</if> <if test="categoryDatetime != null">category_datetime=#{categoryDatetime},</if>
<if test="categoryManagerId != null">category_manager_id=#{categoryManagerId},</if> <if test="categoryManagerId != null">category_manager_id=#{categoryManagerId},</if>

View File

@ -83,7 +83,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="contentTitle != null and contentTitle != ''">#{contentTitle},</if> <if test="contentTitle != null and contentTitle != ''">#{contentTitle},</if>
<if test="contentCategoryId != null and contentCategoryId != ''">#{contentCategoryId},</if> <if test="contentCategoryId != null and contentCategoryId != ''">#{contentCategoryId},</if>
<if test="contentType != null and contentType != ''">#{contentType},</if> <if test="contentType != null ">#{contentType},</if>
<if test="contentDisplay != null and contentDisplay != ''">#{contentDisplay},</if> <if test="contentDisplay != null and contentDisplay != ''">#{contentDisplay},</if>
<if test="contentAuthor != null and contentAuthor != ''">#{contentAuthor},</if> <if test="contentAuthor != null and contentAuthor != ''">#{contentAuthor},</if>
<if test="contentSource != null and contentSource != ''">#{contentSource},</if> <if test="contentSource != null and contentSource != ''">#{contentSource},</if>
@ -112,14 +112,14 @@
<if test="contentCategoryId != null and contentCategoryId != ''">content_category_id=#{contentCategoryId},</if> <if test="contentCategoryId != null and contentCategoryId != ''">content_category_id=#{contentCategoryId},</if>
<if test="contentType != null ">content_type=#{contentType},</if> <if test="contentType != null ">content_type=#{contentType},</if>
<if test="contentDisplay != null and contentDisplay != ''">content_display=#{contentDisplay},</if> <if test="contentDisplay != null and contentDisplay != ''">content_display=#{contentDisplay},</if>
<if test="contentAuthor != null and contentAuthor != ''">content_author=#{contentAuthor},</if> <if test="contentAuthor != null ">content_author=#{contentAuthor},</if>
<if test="contentSource != null and contentSource != ''">content_source=#{contentSource},</if> <if test="contentSource != null ">content_source=#{contentSource},</if>
<if test="contentDatetime != null">content_datetime=#{contentDatetime},</if> <if test="contentDatetime != null">content_datetime=#{contentDatetime},</if>
<if test="contentSort != null">content_sort=#{contentSort},</if> <if test="contentSort != null">content_sort=#{contentSort},</if>
<if test="contentImg != null and contentImg != ''">content_img=#{contentImg},</if> <if test="contentImg != null and contentImg != ''">content_img=#{contentImg},</if>
<if test="contentDescription != null and contentDescription != ''">content_description=#{contentDescription},</if> <if test="contentDescription != null ">content_description=#{contentDescription},</if>
<if test="contentKeyword != null and contentKeyword != ''">content_keyword=#{contentKeyword},</if> <if test="contentKeyword != null ">content_keyword=#{contentKeyword},</if>
<if test="contentDetails != null and contentDetails != ''">content_details=#{contentDetails},</if> <if test="contentDetails != null ">content_details=#{contentDetails},</if>
<if test="contentUrl != null and contentUrl != ''">content_url=#{contentUrl},</if> <if test="contentUrl != null and contentUrl != ''">content_url=#{contentUrl},</if>
<if test="contentHit != null">content_hit=#{contentHit},</if> <if test="contentHit != null">content_hit=#{contentHit},</if>
<if test="appId != null">app_id=#{appId},</if> <if test="appId != null">app_id=#{appId},</if>

View File

@ -1,7 +1,35 @@
# #
#Mon Dec 23 09:24:03 CST 2019 #Thu Nov 28 15:12:32 CST 2019
content.id=\u6587\u7AE0\u7F16\u53F7 category.img=\u7F29\u7565\u56FE
hl.ip=\u6D4F\u89C8ip appid=\u6587\u7AE0\u7BA1\u7406\u7684\u5E94\u7528id
hl.people.id=\u7528\u6237id content.datetime=\u53D1\u5E03\u65F6\u95F4
hl.is.mobile=\u662F\u5426\u4E3A\u79FB\u52A8\u7AEF category.manager.id=\u53D1\u5E03\u7528\u6237id
category.title=\u680F\u76EE\u7BA1\u7406\u540D\u79F0
category.keyword=\u680F\u76EE\u7BA1\u7406\u5173\u952E\u5B57
content.img=\u6587\u7AE0\u7F29\u7565\u56FE
category.path=\u680F\u76EE\u8DEF\u5F84
content.type=\u6587\u7AE0\u7C7B\u578B
category.url=\u5185\u5BB9\u6A21\u677F
dict.id=\u5B57\u5178\u5BF9\u5E94\u7F16\u53F7
content.author=\u6587\u7AE0\u4F5C\u8005
category.parent.id=\u7236\u7C7B\u578B\u7F16\u53F7
category.datetime=\u7C7B\u522B\u53D1\u5E03\u65F6\u95F4
category.flag=\u680F\u76EE\u5C5E\u6027
content.description=\u63CF\u8FF0
content.url=\u6587\u7AE0\u8DF3\u8F6C\u94FE\u63A5\u5730\u5740
category.sort=\u81EA\u5B9A\u4E49\u987A\u5E8F
content.title=\u6587\u7AE0\u6807\u9898
content.category.id=\u6240\u5C5E\u680F\u76EE
id=\u7F16\u53F7 id=\u7F16\u53F7
app.id=\u5E94\u7528\u7F16\u53F7
category.list.url=\u5217\u8868\u6A21\u677F
mdiy.model.id=\u680F\u76EE\u7BA1\u7406\u7684\u5185\u5BB9\u6A21\u578Bid
content.source=\u6587\u7AE0\u6765\u6E90
content.display=\u662F\u5426\u663E\u793A
category.type=\u680F\u76EE\u7BA1\u7406\u5C5E\u6027
category.descrip=\u680F\u76EE\u7BA1\u7406\u63CF\u8FF0
content.details=\u6587\u7AE0\u5185\u5BB9
category.id=\u6240\u5C5E\u680F\u76EE
content.sort=\u81EA\u5B9A\u4E49\u987A\u5E8F
category.diy.url=\u81EA\u5B9A\u4E49\u94FE\u63A5
content.keyword=\u5173\u952E\u5B57

View File

@ -283,6 +283,9 @@
"required": true, "required": true,
"message": "请选择栏目管理名称" "message": "请选择栏目管理名称"
}, {"pattern": /^[^[!@#$%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/, "message": "栏目管理名称格式不匹配"}], }, {"pattern": /^[^[!@#$%^&*()_+-/~?@#¥%…&*()——+—?》《:“‘’]+$/, "message": "栏目管理名称格式不匹配"}],
categoryListUrl: [{"required":true,"message":"请选择列表模板"}],
// 内容模板
categoryUrl: [{"required":true,"message":"请选择内容模板"}],
}, },
} }

View File

@ -448,6 +448,9 @@
if (res.data.contentType) { if (res.data.contentType) {
res.data.contentType = res.data.contentType.split(','); res.data.contentType = res.data.contentType.split(',');
} }
else {
res.data.contentType = [];
}
if (res.data.contentImg) { if (res.data.contentImg) {
res.data.contentImg = JSON.parse(res.data.contentImg); res.data.contentImg = JSON.parse(res.data.contentImg);
res.data.contentImg.forEach(function (value) { res.data.contentImg.forEach(function (value) {

View File

@ -212,12 +212,12 @@
</div> </div>
</div> </div>
<div class="class-56" > <div class="class-56" >
<div class="class-57" > <div class="class-57" @click="openMCMSNews">
<div class="class-58" > <div class="class-58" >
<div class="class-59" > <div class="class-59" >
</div> </div>
<div class="class-60"> <div class="class-60">
铭飞商城多商户功能现已正式上线试... {{ msNewsLast }}
</div> </div>
</div> </div>
</div> </div>
@ -432,6 +432,8 @@
}, },
data: { data: {
base:ms.base, base:ms.base,
msNewsLast: '',
msNewsPath: ''
}, },
methods: { methods: {
jumpArtcleManager(){ jumpArtcleManager(){
@ -493,8 +495,23 @@
window.open("http://wpa.qq.com/msgrd?v=3&uin=3336073455&site=qq&menu=yes"); window.open("http://wpa.qq.com/msgrd?v=3&uin=3336073455&site=qq&menu=yes");
}, },
//打开铭飞消息页面
openMCMSNews(){
window.open(this.msNewsPath);
},
getNewsLast(){
var that = this;
axios.create({
withCredentials: true
}).get("https://ms.mingsoft.net/cms/content/list.do?contentCategoryId=202").then(function (res){
console.log(res.data.data.rows[0]);
that.msNewsLast = res.data.data.rows[0].contentTitle.toString();
that.msNewsPath = 'https://ms.mingsoft.net/html/1/203/202/'+res.data.data.rows[0].id+'.html'
})
}
}, },
created(){ created(){
this.getNewsLast()
} }
}) })
</script> </script>
@ -1243,6 +1260,7 @@
} }
.class-57 .class-57
{ {
cursor: pointer;
color:#333333; color:#333333;
outline:none; outline:none;
outline-offset:-1px; outline-offset:-1px;