Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
d007429d
Z
zheng
项目概览
fenghuo12
/
zheng
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zheng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d007429d
编写于
1月 12, 2017
作者:
shuzheng5201314
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
标签接入zheng-admin
上级
598ac38b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
73 deletion
+37
-73
zheng-admin/src/crud.html
zheng-admin/src/crud.html
+0
-30
zheng-cms/zheng-cms-admin/src/main/java/com/zheng/cms/admin/Interceptor/ManageInterceptor.java
...va/com/zheng/cms/admin/Interceptor/ManageInterceptor.java
+1
-1
zheng-cms/zheng-cms-admin/src/main/java/com/zheng/cms/admin/controller/manage/CmsTagController.java
...m/zheng/cms/admin/controller/manage/CmsTagController.java
+21
-23
zheng-cms/zheng-cms-admin/src/main/webapp/WEB-INF/jsp/manage/tag/index.jsp
...ms-admin/src/main/webapp/WEB-INF/jsp/manage/tag/index.jsp
+15
-19
未找到文件。
zheng-admin/src/crud.html
浏览文件 @
d007429d
...
...
@@ -21,35 +21,6 @@
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-close"
></i>
删除用户
</a>
</div>
<table
id=
"table"
></table>
<!--
<table data-toggle="table"
data-url="data/data1.json"
data-classes="table table-hover table-condensed"
data-striped="true"
data-search="true"
data-show-refresh="true"
data-show-toggle="true"
data-show-columns="true"
data-click-to-select="true"
data-toolbar="#toolbar">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="id" data-sortable="true">编号</th>
<th data-field="username" data-sortable="true">账号</th>
<th data-field="password" data-sortable="true">密码</th>
<th data-field="name" data-sortable="true">姓名</th>
<th data-field="sex" data-sortable="true">性别</th>
<th data-field="age" data-sortable="true">年龄</th>
<th data-field="phone" data-sortable="true">电话</th>
<th data-field="email" data-sortable="true">邮箱</th>
<th data-field="address" data-sortable="true">地址</th>
<th data-field="remark" data-sortable="true">备注</th>
<th data-field="action" data-formatter="actionFormatter" data-events="actionEvents">操作</th>
</tr>
</thead>
</table>
-->
</div>
<script
src=
"plugins/jquery.1.12.4.min.js"
></script>
<script
src=
"plugins/bootstrap-3.3.0/js/bootstrap.min.js"
></script>
...
...
@@ -62,7 +33,6 @@
$
(
function
()
{
// bootstrap table初始化
$
(
'
#table
'
).
bootstrapTable
({
idField
:
'
id
'
,
url
:
'
data/data1.json
'
,
height
:
getHeight
(),
striped
:
true
,
...
...
zheng-cms/zheng-cms-admin/src/main/java/com/zheng/cms/admin/Interceptor/ManageInterceptor.java
浏览文件 @
d007429d
...
...
@@ -18,7 +18,7 @@ public class ManageInterceptor extends HandlerInterceptorAdapter {
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
_log
.
info
(
"ManageInterceptor==>preHandle"
);
return
true
;
}
...
...
zheng-cms/zheng-cms-admin/src/main/java/com/zheng/cms/admin/controller/manage/CmsTagController.java
浏览文件 @
d007429d
...
...
@@ -10,10 +10,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
...
...
@@ -31,36 +28,37 @@ public class CmsTagController extends BaseController {
@Autowired
private
CmsTagService
cmsTagService
;
@RequestMapping
(
"/index"
)
public
String
index
()
{
return
"/manage/tag/index"
;
}
/**
* 列表
* @param page 当前页码
* @param rows 每页条数
* @param desc 降序排序
* @param request
* @param modelMap
* @param offset
* @param limit
* @param sort
* @param order
* @return
*/
@RequestMapping
(
"/list"
)
public
String
list
(
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
,
value
=
"page"
)
int
page
,
@RequestParam
(
required
=
false
,
defaultValue
=
"20"
,
value
=
"rows"
)
int
rows
,
@RequestParam
(
required
=
false
,
defaultValue
=
"false"
,
value
=
"desc"
)
boolean
desc
,
HttpServletRequest
request
,
ModelMap
modelMap
)
{
@ResponseBody
public
Object
list
(
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
,
value
=
"offset"
)
int
offset
,
@RequestParam
(
required
=
false
,
defaultValue
=
"10"
,
value
=
"limit"
)
int
limit
,
@RequestParam
(
required
=
false
,
value
=
"sort"
)
String
sort
,
@RequestParam
(
required
=
false
,
value
=
"order"
)
String
order
)
{
// 数据列表
CmsTagExample
cmsTagExample
=
new
CmsTagExample
();
cmsTagExample
.
setOffset
(
(
page
-
1
)
*
rows
);
cmsTagExample
.
setLimit
(
rows
);
cmsTagExample
.
setOrderByClause
(
desc
?
"orders desc"
:
"orders asc"
);
cmsTagExample
.
setOffset
(
offset
);
cmsTagExample
.
setLimit
(
limit
);
cmsTagExample
.
setOrderByClause
(
sort
+
" "
+
order
);
List
<
CmsTag
>
tags
=
cmsTagService
.
selectByExample
(
cmsTagExample
);
// 分页对象
long
total
=
cmsTagService
.
countByExample
(
cmsTagExample
);
Paginator
paginator
=
new
Paginator
(
total
,
page
,
rows
,
request
);
// long total = cmsTagService.countByExample(cmsTagExample);
modelMap
.
put
(
"tags"
,
tags
);
modelMap
.
put
(
"paginator"
,
paginator
);
return
"/manage/tag/list"
;
return
tags
;
}
/**
...
...
zheng-cms/zheng-cms-admin/src/main/webapp/WEB-INF/jsp/manage/tag/
list
.jsp
→
zheng-cms/zheng-cms-admin/src/main/webapp/WEB-INF/jsp/manage/tag/
index
.jsp
浏览文件 @
d007429d
...
...
@@ -11,7 +11,7 @@
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
通用增删改查
</title>
<title>
标签列表
</title>
<link
href=
"${basePath}/resources/zheng-admin/plugins/bootstrap-3.3.0/css/bootstrap.min.css"
rel=
"stylesheet"
/>
<link
href=
"${basePath}/resources/zheng-admin/plugins/material-design-iconic-font-2.2.0/css/material-design-iconic-font.min.css"
rel=
"stylesheet"
/>
...
...
@@ -23,9 +23,9 @@
<body>
<div
id=
"main"
>
<div
id=
"toolbar"
>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-plus"
></i>
新增
用户
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-edit"
></i>
编辑
用户
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-close"
></i>
删除
用户
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-plus"
></i>
新增
标签
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-edit"
></i>
编辑
标签
</a>
<a
class=
"waves-effect waves-button"
href=
"javascript:;"
><i
class=
"zmdi zmdi-close"
></i>
删除
标签
</a>
</div>
<table
id=
"table"
></table>
</div>
...
...
@@ -40,8 +40,7 @@
$
(
function
()
{
// bootstrap table初始化
$
(
'
#table
'
).
bootstrapTable
({
idField
:
'
id
'
,
url
:
'
${basePath}/resources/zheng-admin/data/data1.json
'
,
url
:
'
${basePath}/manage/tag/list
'
,
height
:
getHeight
(),
striped
:
true
,
search
:
true
,
...
...
@@ -57,23 +56,20 @@
pagination
:
true
,
paginationLoop
:
false
,
classes
:
'
table table-hover table-no-bordered
'
,
//
sidePagination: 'server',
idField
:
'
id
'
,
sortName
:
'
id
'
,
sidePagination
:
'
server
'
,
idField
:
'
tag_
id
'
,
sortName
:
'
tag_
id
'
,
sortOrder
:
'
desc
'
,
toolbar
:
'
#toolbar
'
,
columns
:
[
{
field
:
'
state
'
,
checkbox
:
true
},
{
field
:
'
id
'
,
title
:
'
编号
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
username
'
,
title
:
'
账号
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
password
'
,
title
:
'
密码
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
name
'
,
title
:
'
姓名
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
sex
'
,
title
:
'
性别
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
age
'
,
title
:
'
年龄
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
phone
'
,
title
:
'
年龄
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
email
'
,
title
:
'
邮箱
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
address
'
,
title
:
'
地址
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
remark
'
,
title
:
'
备注
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
tagId
'
,
title
:
'
编号
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
name
'
,
title
:
'
标签名称
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
description
'
,
title
:
'
标签描述
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
icon
'
,
title
:
'
图标
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
type
'
,
title
:
'
类型
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
alias
'
,
title
:
'
别名
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
ctime
'
,
title
:
'
创建时间
'
,
sortable
:
true
,
halign
:
'
center
'
},
{
field
:
'
action
'
,
title
:
'
操作
'
,
halign
:
'
center
'
,
align
:
'
center
'
,
formatter
:
'
actionFormatter
'
,
events
:
'
actionEvents
'
}
]
}).
on
(
'
all.bs.table
'
,
function
(
e
,
name
,
args
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录