后台管理页主页的完善
This commit is contained in:
commit
52a22ab6cb
10
pom.xml
10
pom.xml
|
@ -35,7 +35,6 @@
|
|||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<!-- 8.0数据库取消下面注解-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>mysql</groupId>-->
|
||||
<!-- <artifactId>mysql-connector-java</artifactId>-->
|
||||
|
@ -44,12 +43,17 @@
|
|||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-mpeople</artifactId>
|
||||
<version>1.0.13</version>
|
||||
<version>1.0.14-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-mdiy</artifactId>
|
||||
<version>1.0.12-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-upgrader</artifactId>
|
||||
<version>1.0.14</version>
|
||||
<version>1.0.15-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -21,21 +21,19 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
|||
|
||||
package net.mingsoft.cms.action;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import net.mingsoft.basic.action.BaseAction;
|
||||
import net.mingsoft.basic.biz.IModelBiz;
|
||||
import net.mingsoft.basic.entity.AppEntity;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.cms.bean.ContentBean;
|
||||
import net.mingsoft.cms.biz.ICategoryBiz;
|
||||
import net.mingsoft.cms.biz.IContentBiz;
|
||||
import net.mingsoft.cms.entity.CategoryEntity;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import net.mingsoft.cms.util.CmsParserUtil;
|
||||
import net.mingsoft.mdiy.util.ParserUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -46,15 +44,12 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import net.mingsoft.basic.action.BaseAction;
|
||||
import net.mingsoft.basic.biz.IModelBiz;
|
||||
import net.mingsoft.basic.entity.AppEntity;
|
||||
import net.mingsoft.cms.util.CmsParserUtil;
|
||||
import net.mingsoft.mdiy.biz.IContentModelFieldBiz;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.mdiy.util.ParserUtil;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -92,10 +87,7 @@ public class GeneraterAction extends BaseAction {
|
|||
private String managerPath;
|
||||
|
||||
/**
|
||||
* 新增字段业务层
|
||||
*/
|
||||
@Autowired
|
||||
protected IContentModelFieldBiz fieldBiz;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
/**
|
||||
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* 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:
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
|
||||
* 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
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* 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.web;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import net.mingsoft.base.action.BaseAction;
|
||||
import net.mingsoft.basic.biz.IColumnBiz;
|
||||
import net.mingsoft.basic.entity.ColumnEntity;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IContentModelFieldBiz;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.ContentModelFieldEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
|
||||
/**
|
||||
* 供前端页面获取自定义模型中字段实体信息
|
||||
* @author 铭飞开发团队
|
||||
* 创建日期:2019-11-28 15:12:32<br/>
|
||||
* 历史修订:<br/>
|
||||
*/
|
||||
@Controller("webField")
|
||||
@RequestMapping("/field")
|
||||
public class FieldAction extends BaseAction{
|
||||
|
||||
/**
|
||||
* 栏目业务层
|
||||
*/
|
||||
@Autowired
|
||||
private IColumnBiz columnBiz;
|
||||
|
||||
/**
|
||||
* 内容模型业务层
|
||||
*/
|
||||
@Autowired
|
||||
private IContentModelBiz contentModelBiz;
|
||||
|
||||
/**
|
||||
* 字段管理业务层
|
||||
*/
|
||||
@Autowired
|
||||
private IContentModelFieldBiz fieldBiz;
|
||||
|
||||
/**
|
||||
*
|
||||
* 根据当前栏目id和字段名称获取自定义模型中的字段实体信息
|
||||
* @param request
|
||||
* @param response
|
||||
*/
|
||||
@RequestMapping("/{columId}/getEntity")
|
||||
@ResponseBody
|
||||
public void getEntity(@PathVariable int columId,HttpServletRequest request, HttpServletResponse response) {
|
||||
//获取字段名称
|
||||
String fieldFieldName = request.getParameter("fieldFieldName");
|
||||
//根据栏目id获取栏目实体
|
||||
ColumnEntity column = (ColumnEntity) this.columnBiz.getEntity(columId);
|
||||
if(column==null){
|
||||
this.outJson(response, this.getResString("err"));
|
||||
return;
|
||||
}else{
|
||||
//判断该栏目下是存在内容模型
|
||||
if(column.getColumnContentModelId()>0){
|
||||
//获取当前栏目对应的内容模型
|
||||
ContentModelEntity contentModel = (ContentModelEntity) this.contentModelBiz.getEntity(column.getColumnContentModelId());
|
||||
if(contentModel==null){
|
||||
this.outJson(response, this.getResString("err"));
|
||||
return;
|
||||
}
|
||||
//获取字段实体
|
||||
ContentModelFieldEntity field = fieldBiz.getEntityByCmId(column.getColumnContentModelId(), fieldFieldName);
|
||||
//返回字段实体
|
||||
this.outJson(response, JSONObject.toJSONString(field));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@ import freemarker.template.MalformedTemplateNameException;
|
|||
import freemarker.template.TemplateNotFoundException;
|
||||
import net.mingsoft.base.constant.Const;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.SpringUtil;
|
||||
import net.mingsoft.basic.util.StringUtil;
|
||||
import net.mingsoft.cms.bean.ContentBean;
|
||||
import net.mingsoft.cms.biz.ICategoryBiz;
|
||||
|
@ -37,10 +36,8 @@ import net.mingsoft.cms.entity.CategoryEntity;
|
|||
import net.mingsoft.cms.entity.ContentEntity;
|
||||
import net.mingsoft.cms.util.CmsParserUtil;
|
||||
import net.mingsoft.mdiy.bean.PageBean;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IPageBiz;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.ModelEntity;
|
||||
import net.mingsoft.mdiy.entity.PageEntity;
|
||||
import net.mingsoft.mdiy.parser.TagParser;
|
||||
|
@ -54,7 +51,10 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 动态生成页面,需要后台配置自定义页数据
|
||||
|
@ -245,7 +245,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
|
|||
map.put(ParserUtil.ID, article.getId());
|
||||
List<ContentBean> articleIdList = contentBiz.queryIdsByCategoryIdForParser(column.getCategoryId(), null, null,orderby,order);
|
||||
Map<Object, Object> contentModelMap = new HashMap<Object, Object>();
|
||||
ContentModelEntity contentModel = null;
|
||||
ModelEntity contentModel = null;
|
||||
for (int artId = 0; artId < articleIdList.size();) {
|
||||
//如果不是当前文章则跳过
|
||||
if(articleIdList.get(artId).getArticleId() != Integer.parseInt(article.getId())){
|
||||
|
@ -262,14 +262,13 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
|
|||
if ( StringUtils.isNotBlank(columnContentModelId)) {
|
||||
// 通过当前栏目的模型编号获取,自定义模型表名
|
||||
if (contentModelMap.containsKey(columnContentModelId)) {
|
||||
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());
|
||||
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getModelTableName());
|
||||
} else {
|
||||
// 通过栏目模型编号获取自定义模型实体
|
||||
contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class)
|
||||
.getEntity(Integer.parseInt(columnContentModelId));
|
||||
contentModel=(ModelEntity)modelBiz.getEntity(Integer.parseInt(columnContentModelId));
|
||||
// 将自定义模型编号设置为key值
|
||||
contentModelMap.put(columnContentModelId, contentModel.getCmTableName());
|
||||
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());
|
||||
contentModelMap.put(columnContentModelId, contentModel.getModelTableName());
|
||||
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getModelTableName());
|
||||
}
|
||||
}
|
||||
// 第一篇文章没有上一篇
|
||||
|
|
|
@ -152,6 +152,8 @@
|
|||
ms.http.post(ms.manager+'/cms/generate//generateIndex.do', {url:that.template,position:that.position}).then(function (data) {
|
||||
if(data.result){
|
||||
that.$notify({ title: '更新成功!', type: 'success' });
|
||||
}else {
|
||||
that.$notify({ title: '更新失败!',message: "错误", type: 'error' });
|
||||
}
|
||||
}).catch(function (err) {
|
||||
that.$notify({ title: '更新失败!',message: err, type: 'error' });
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<form class="ms-content-form" method="post" id="postForm">
|
||||
<input class="ms-content-form-name" type="text" name="name" placeholder="姓名">
|
||||
<input class="ms-content-form-phone" type="text" name="phone" placeholder="手机">
|
||||
<textarea class="ms-content-form-message" name="content" placeholder="留言"></textarea>
|
||||
<textarea class="ms-content-form-message" name="words" placeholder="留言"></textarea>
|
||||
<div class="ms-login-button">提交</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@
|
|||
if(!flag) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{ms:global.host/}/mdiy/diyForm/f2c131968438246e885e0feed7256dbc.do",
|
||||
url: "{ms:global.host/}/mdiy/post/7df6529f9eaa26da7ae4e01c7f73aa06.do",
|
||||
data: $("#postForm").serialize(),
|
||||
success: function(msg) {
|
||||
flag = true;
|
||||
|
|
|
@ -65,11 +65,11 @@
|
|||
<template v-for="model in modelList">
|
||||
<div class="ms-model-list">
|
||||
<a class="ms-model-img" :href="model.upgraderVersionUrl" target="_blank">
|
||||
<img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.upgraderVersionImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
<img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.img" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
</a>
|
||||
<div class="ms-model-mobile-img" v-if="model.upgraderVersionMobileImg != '' && model.upgraderVersionMobileImg != undefined" style="background: url({ms:global.host/}/{ms:global.style/}/images/mobile.png)">
|
||||
<div class="ms-model-mobile-img" v-if="model.mobileImg != '' && model.mobileImg != undefined" style="background: url({ms:global.host/}/{ms:global.style/}/images/mobile.png)">
|
||||
<div>
|
||||
<img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.upgraderVersionMobileImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
<img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.mobileImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ms-model-info">
|
||||
|
@ -92,7 +92,7 @@
|
|||
<template v-for="pulg in pulgList">
|
||||
<div class="ms-model-list">
|
||||
<a class="ms-model-img" :href="pulg.upgraderVersionUrl" target="_blank">
|
||||
<img :src="'http://store.mingsoft.net/'+pulg.upgraderVersionImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
<img :src="'http://store.mingsoft.net/'+pulg.img" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
|
||||
</a>
|
||||
<div class="ms-model-info">
|
||||
<span v-text="pulg.upgraderVersionName"></span>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue