cms后台支持多系统

This commit is contained in:
shuzheng 2017-04-10 23:30:22 +08:00
parent 6efd7d144a
commit 30ce048acd
14 changed files with 27 additions and 70 deletions

View File

@ -101,6 +101,7 @@ public class CmsArticleController extends BaseController {
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
cmsArticle.setCtime(time); cmsArticle.setCtime(time);
cmsArticle.setOrders(time); cmsArticle.setOrders(time);
cmsArticle.setReadnumber(0);
int count = cmsArticleService.insertSelective(cmsArticle); int count = cmsArticleService.insertSelective(cmsArticle);
return new CmsResult(CmsResultConstant.SUCCESS, count); return new CmsResult(CmsResultConstant.SUCCESS, count);
} }

View File

@ -73,8 +73,8 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="fg-line"> <div class="fg-line">
<label for="readnumber">阅读数量</label> <label for="systemId">所属系统</label>
<input id="readnumber" type="text" class="form-control" name="readnumber"> <input id="systemId" type="text" class="form-control" name="systemId">
</div> </div>
</div> </div>
</div> </div>

View File

@ -55,6 +55,7 @@ $(function() {
columns: [ columns: [
{field: 'ck', checkbox: true}, {field: 'ck', checkbox: true},
{field: 'articleId', title: '编号', sortable: true, align: 'center'}, {field: 'articleId', title: '编号', sortable: true, align: 'center'},
{field: 'systemId', title: '所属系统'},
{field: 'topicId', title: '所属专题'}, {field: 'topicId', title: '所属专题'},
{field: 'title', title: '标题'}, {field: 'title', title: '标题'},
{field: 'author', title: '作者'}, {field: 'author', title: '作者'},

View File

@ -73,8 +73,8 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<div class="fg-line"> <div class="fg-line">
<label for="readnumber">阅读数量</label> <label for="systemId">所属系统</label>
<input id="readnumber" type="text" class="form-control" name="readnumber" value="0" value="${article.readnumber}"> <input id="systemId" type="text" class="form-control" name="systemId" value="${article.systemId}">
</div> </div>
</div> </div>
</div> </div>

View File

@ -16,6 +16,10 @@
<label for="level">层深</label> <label for="level">层深</label>
<input id="level" type="text" class="form-control" name="level" maxlength="5"> <input id="level" type="text" class="form-control" name="level" maxlength="5">
</div> </div>
<div class="form-group">
<label for="systemId">所属系统</label>
<input id="systemId" type="text" class="form-control" name="systemId">
</div>
<div class="form-group"> <div class="form-group">
<label for="name">名称</label> <label for="name">名称</label>
<input id="name" type="text" class="form-control" name="name" maxlength="20"> <input id="name" type="text" class="form-control" name="name" maxlength="20">

View File

@ -54,6 +54,7 @@ $(function() {
{field: 'ck', checkbox: true}, {field: 'ck', checkbox: true},
{field: 'categoryId', title: '编号', sortable: true, align: 'center'}, {field: 'categoryId', title: '编号', sortable: true, align: 'center'},
{field: 'pid', title: '上级编号'}, {field: 'pid', title: '上级编号'},
{field: 'systemId', title: '所属系统'},
{field: 'name', title: '类目名称'}, {field: 'name', title: '类目名称'},
{field: 'alias', title: '类目别名'}, {field: 'alias', title: '类目别名'},
{field: 'description', title: '描述'}, {field: 'description', title: '描述'},

View File

@ -16,6 +16,10 @@
<label for="level">层深</label> <label for="level">层深</label>
<input id="level" type="text" class="form-control" name="level" maxlength="5" value="${category.level}"> <input id="level" type="text" class="form-control" name="level" maxlength="5" value="${category.level}">
</div> </div>
<div class="form-group">
<label for="systemId">所属系统</label>
<input id="systemId" type="text" class="form-control" name="systemId" value="${category.systemId}">
</div>
<div class="form-group"> <div class="form-group">
<label for="name">名称</label> <label for="name">名称</label>
<input id="name" type="text" class="form-control" name="name" maxlength="20" value="${category.name}"> <input id="name" type="text" class="form-control" name="name" maxlength="20" value="${category.name}">

View File

@ -19,6 +19,7 @@
<form method="post"> <form method="post">
<table border="1"> <table border="1">
<tr><td>楼中楼编号:</td><td><input type="text" name="pid" autofocus/></td></tr> <tr><td>楼中楼编号:</td><td><input type="text" name="pid" autofocus/></td></tr>
<tr><td>所属系统:</td><td><input type="text" name="systemId"/></td></tr>
<tr><td>文章编号:</td><td><input type="text" name="articleId"/></td></tr> <tr><td>文章编号:</td><td><input type="text" name="articleId"/></td></tr>
<tr><td>用户编号:</td><td><input type="text" name="userId"/></td></tr> <tr><td>用户编号:</td><td><input type="text" name="userId"/></td></tr>
<tr><td>评论内容:</td><td><input type="text" name="content"/></td></tr> <tr><td>评论内容:</td><td><input type="text" name="content"/></td></tr>

View File

@ -52,6 +52,7 @@ $(function() {
columns: [ columns: [
{field: 'ck', checkbox: true}, {field: 'ck', checkbox: true},
{field: 'commentId', title: '编号', sortable: true, align: 'center'}, {field: 'commentId', title: '编号', sortable: true, align: 'center'},
{field: 'systemId', title: '所属系统'},
{field: 'content', title: '内容'}, {field: 'content', title: '内容'},
{field: 'ip', title: 'IP地址'}, {field: 'ip', title: 'IP地址'},
{field: 'agent', title: '用户标识'}, {field: 'agent', title: '用户标识'},

View File

@ -1,66 +0,0 @@
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<c:set var="basePath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>列表</title>
</head>
<body>
<div>
<a href="${basePath}/manage/index">首页</a> &gt; 评论列表
</div>
<div>
<table border="1">
<caption><a href="${basePath}/manage/comment/add">新增</a></caption>
<thead>
<tr>
<th>ID</th>
<th>楼中楼ID</th>
<th>文章编号</th>
<th>用户编号</th>
<th>评论内容</th>
<th>状态</th>
<th>IP地址</th>
<th>终端信息</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach var="comment" items="${comments}">
<tr>
<td>${comment.commentId}</td>
<td>${comment.pid}</td>
<td>${comment.articleId}</td>
<td>${comment.userId}</td>
<td>${comment.content}</td>
<td>
<c:if test="${comment.status==-1}">不通过</c:if>
<c:if test="${comment.status==0}">未审核</c:if>
<c:if test="${comment.status==1}">通过</c:if>
</td>
<td>${comment.ip}</td>
<td>${comment.agent}</td>
<td>
<jsp:useBean id="date" class="java.util.Date"/>
<jsp:setProperty name="date" property="time" value="${comment.ctime}"/>
<fmt:formatDate value="${date}" type="both" pattern="yyyy-MM-dd HH:mm:ss" timeZone="Asia/Shanghai"/>
</td>
<td>
<a href="${basePath}/manage/comment/update/${comment.commentId}">修改</a>
<a href="${basePath}/manage/comment/delete/${comment.commentId}" onclick="return confirm('确认删除吗?');">删除</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div>${paginator.html}</div>
</div>
</body>
</html>

View File

@ -20,6 +20,7 @@
<table border="1"> <table border="1">
<input type="hidden" name="commentId" value="${comment.commentId}"/> <input type="hidden" name="commentId" value="${comment.commentId}"/>
<tr><td>楼中楼编号:</td><td><input type="text" name="pid" value="${comment.pid}"/></td></tr> <tr><td>楼中楼编号:</td><td><input type="text" name="pid" value="${comment.pid}"/></td></tr>
<tr><td>所属系统:</td><td><input type="text" name="systemId" value="${comment.systemId}"/></td></tr>
<tr><td>文章编号:</td><td><input type="text" name="articleId" value="${comment.articleId}"/></td></tr> <tr><td>文章编号:</td><td><input type="text" name="articleId" value="${comment.articleId}"/></td></tr>
<tr><td>用户编号:</td><td><input type="text" name="userId" value="${comment.userId}"/></td></tr> <tr><td>用户编号:</td><td><input type="text" name="userId" value="${comment.userId}"/></td></tr>
<tr><td>评论内容:</td><td><input type="text" name="content" value="${comment.content}"/></td></tr> <tr><td>评论内容:</td><td><input type="text" name="content" value="${comment.content}"/></td></tr>

View File

@ -8,6 +8,10 @@
<c:set var="basePath" value="${pageContext.request.contextPath}"/> <c:set var="basePath" value="${pageContext.request.contextPath}"/>
<div id="createDialog" class="crudDialog"> <div id="createDialog" class="crudDialog">
<form id="createForm" method="post"> <form id="createForm" method="post">
<div class="form-group">
<label for="systemId">所属系统</label>
<input id="systemId" type="text" class="form-control" name="systemId">
</div>
<div class="form-group"> <div class="form-group">
<label for="name">名称</label> <label for="name">名称</label>
<input id="name" type="text" class="form-control" name="name" maxlength="20"> <input id="name" type="text" class="form-control" name="name" maxlength="20">

View File

@ -53,6 +53,7 @@ $(function() {
columns: [ columns: [
{field: 'ck', checkbox: true}, {field: 'ck', checkbox: true},
{field: 'tagId', title: '编号', sortable: true, align: 'center'}, {field: 'tagId', title: '编号', sortable: true, align: 'center'},
{field: 'systemId', title: '所属系统'},
{field: 'name', title: '标签名称'}, {field: 'name', title: '标签名称'},
{field: 'alias', title: '标签别名'}, {field: 'alias', title: '标签别名'},
{field: 'description', title: '描述'}, {field: 'description', title: '描述'},

View File

@ -8,6 +8,10 @@
<c:set var="basePath" value="${pageContext.request.contextPath}"/> <c:set var="basePath" value="${pageContext.request.contextPath}"/>
<div id="updateDialog" class="crudDialog"> <div id="updateDialog" class="crudDialog">
<form id="updateForm" method="post"> <form id="updateForm" method="post">
<div class="form-group">
<label for="systemId">所属系统</label>
<input id="systemId" type="text" class="form-control" name="systemId" value="${tag.systemId}">
</div>
<div class="form-group"> <div class="form-group">
<label for="name">名称</label> <label for="name">名称</label>
<input id="name" type="text" class="form-control" name="name" maxlength="20" value="${tag.name}"> <input id="name" type="text" class="form-control" name="name" maxlength="20" value="${tag.name}">