Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
56ea1934
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,发现更多精彩内容 >>
提交
56ea1934
编写于
2月 24, 2017
作者:
shuzheng5201314
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增角色字段
上级
7d61249e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
135 addition
and
16 deletion
+135
-16
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml
...rc/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml
+22
-5
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsRole.java
...-dao/src/main/java/com/zheng/upms/dao/model/UpmsRole.java
+18
-0
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsRoleExample.java
...c/main/java/com/zheng/upms/dao/model/UpmsRoleExample.java
+70
-0
zheng-upms/zheng-upms-rpc-service/src/main/java/com/zheng/upms/dao/mapper/UpmsApiMapper.xml
...src/main/java/com/zheng/upms/dao/mapper/UpmsApiMapper.xml
+2
-1
zheng-upms/zheng-upms-server/pom.xml
zheng-upms/zheng-upms-server/pom.xml
+0
-6
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsRoleController.java
...eng/upms/server/controller/manage/UpmsRoleController.java
+2
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/create.jsp
...server/src/main/webapp/WEB-INF/jsp/manage/role/create.jsp
+8
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
...-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
+1
-0
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/update.jsp
...server/src/main/webapp/WEB-INF/jsp/manage/role/update.jsp
+12
-4
未找到文件。
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsRoleMapper.xml
浏览文件 @
56ea1934
...
...
@@ -4,6 +4,7 @@
<resultMap
id=
"BaseResultMap"
type=
"com.zheng.upms.dao.model.UpmsRole"
>
<id
column=
"role_id"
jdbcType=
"INTEGER"
property=
"roleId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"ctime"
jdbcType=
"BIGINT"
property=
"ctime"
/>
<result
column=
"orders"
jdbcType=
"BIGINT"
property=
"orders"
/>
...
...
@@ -67,7 +68,7 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
role_id, name, description, ctime, orders
role_id, name,
title,
description, ctime, orders
</sql>
<select
id=
"selectByExample"
parameterType=
"com.zheng.upms.dao.model.UpmsRoleExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -108,10 +109,12 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.zheng.upms.dao.model.UpmsRole"
>
insert into upms_role (role_id, name, description,
ctime, orders)
values (#{roleId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT})
insert into upms_role (role_id, name, title,
description, ctime, orders
)
values (#{roleId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT}, #{orders,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.zheng.upms.dao.model.UpmsRole"
>
insert into upms_role
...
...
@@ -122,6 +125,9 @@
<if
test=
"name != null"
>
name,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"description != null"
>
description,
</if>
...
...
@@ -139,6 +145,9 @@
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
...
...
@@ -165,6 +174,9 @@
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.title != null"
>
title = #{record.title,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
</if>
...
...
@@ -183,6 +195,7 @@
update upms_role
set role_id = #{record.roleId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
title = #{record.title,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
ctime = #{record.ctime,jdbcType=BIGINT},
orders = #{record.orders,jdbcType=BIGINT}
...
...
@@ -196,6 +209,9 @@
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
...
...
@@ -211,6 +227,7 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.zheng.upms.dao.model.UpmsRole"
>
update upms_role
set name = #{name,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
ctime = #{ctime,jdbcType=BIGINT},
orders = #{orders,jdbcType=BIGINT}
...
...
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsRole.java
浏览文件 @
56ea1934
...
...
@@ -17,6 +17,13 @@ public class UpmsRole implements Serializable {
*/
private
String
name
;
/**
* 角色标题
*
* @mbg.generated
*/
private
String
title
;
/**
* 角色描述
*
...
...
@@ -56,6 +63,14 @@ public class UpmsRole implements Serializable {
this
.
name
=
name
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getDescription
()
{
return
description
;
}
...
...
@@ -88,6 +103,7 @@ public class UpmsRole implements Serializable {
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", roleId="
).
append
(
roleId
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", title="
).
append
(
title
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", ctime="
).
append
(
ctime
);
sb
.
append
(
", orders="
).
append
(
orders
);
...
...
@@ -109,6 +125,7 @@ public class UpmsRole implements Serializable {
UpmsRole
other
=
(
UpmsRole
)
that
;
return
(
this
.
getRoleId
()
==
null
?
other
.
getRoleId
()
==
null
:
this
.
getRoleId
().
equals
(
other
.
getRoleId
()))
&&
(
this
.
getName
()
==
null
?
other
.
getName
()
==
null
:
this
.
getName
().
equals
(
other
.
getName
()))
&&
(
this
.
getTitle
()
==
null
?
other
.
getTitle
()
==
null
:
this
.
getTitle
().
equals
(
other
.
getTitle
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getCtime
()
==
null
?
other
.
getCtime
()
==
null
:
this
.
getCtime
().
equals
(
other
.
getCtime
()))
&&
(
this
.
getOrders
()
==
null
?
other
.
getOrders
()
==
null
:
this
.
getOrders
().
equals
(
other
.
getOrders
()));
...
...
@@ -120,6 +137,7 @@ public class UpmsRole implements Serializable {
int
result
=
1
;
result
=
prime
*
result
+
((
getRoleId
()
==
null
)
?
0
:
getRoleId
().
hashCode
());
result
=
prime
*
result
+
((
getName
()
==
null
)
?
0
:
getName
().
hashCode
());
result
=
prime
*
result
+
((
getTitle
()
==
null
)
?
0
:
getTitle
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getCtime
()
==
null
)
?
0
:
getCtime
().
hashCode
());
result
=
prime
*
result
+
((
getOrders
()
==
null
)
?
0
:
getOrders
().
hashCode
());
...
...
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsRoleExample.java
浏览文件 @
56ea1934
...
...
@@ -257,6 +257,76 @@ public class UpmsRoleExample implements Serializable {
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNull
()
{
addCriterion
(
"title is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIsNotNull
()
{
addCriterion
(
"title is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleEqualTo
(
String
value
)
{
addCriterion
(
"title ="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotEqualTo
(
String
value
)
{
addCriterion
(
"title <>"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThan
(
String
value
)
{
addCriterion
(
"title >"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title >="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThan
(
String
value
)
{
addCriterion
(
"title <"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"title <="
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleLike
(
String
value
)
{
addCriterion
(
"title like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotLike
(
String
value
)
{
addCriterion
(
"title not like"
,
value
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleIn
(
List
<
String
>
values
)
{
addCriterion
(
"title in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"title not in"
,
values
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTitleNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"title not between"
,
value1
,
value2
,
"title"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNull
()
{
addCriterion
(
"description is null"
);
return
(
Criteria
)
this
;
...
...
zheng-upms/zheng-upms-rpc-service/src/main/java/com/zheng/upms/dao/mapper/UpmsApiMapper.xml
浏览文件 @
56ea1934
...
...
@@ -21,6 +21,7 @@
<resultMap
id=
"UpmsRoleResultMap"
type=
"com.zheng.upms.dao.model.UpmsRole"
>
<id
column=
"role_id"
jdbcType=
"INTEGER"
property=
"roleId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"ctime"
jdbcType=
"BIGINT"
property=
"ctime"
/>
<result
column=
"orders"
jdbcType=
"BIGINT"
property=
"orders"
/>
...
...
@@ -33,7 +34,7 @@
<!-- 角色字段 -->
<sql
id=
"UpmsRole_Column_List"
>
role_id, name, description, ctime, orders
role_id, name,
title,
description, ctime, orders
</sql>
<!-- 根据用户获取所拥有的权限 -->
...
...
zheng-upms/zheng-upms-server/pom.xml
浏览文件 @
56ea1934
...
...
@@ -42,12 +42,6 @@
<artifactId>
jstl
</artifactId>
<version>
1.2
</version>
</dependency>
<!-- zheng-upms-client -->
<dependency>
<groupId>
com.zheng
</groupId>
<artifactId>
zheng-upms-client
</artifactId>
<version>
1.0.0
</version>
</dependency>
</dependencies>
<profiles>
...
...
zheng-upms/zheng-upms-server/src/main/java/com/zheng/upms/server/controller/manage/UpmsRoleController.java
浏览文件 @
56ea1934
...
...
@@ -83,6 +83,7 @@ public class UpmsRoleController extends BaseController {
public
Object
create
(
UpmsRole
upmsRole
)
{
ComplexResult
result
=
FluentValidator
.
checkAll
()
.
on
(
upmsRole
.
getName
(),
new
LengthValidator
(
1
,
20
,
"名称"
))
.
on
(
upmsRole
.
getTitle
(),
new
LengthValidator
(
1
,
20
,
"标题"
))
.
doValidate
()
.
result
(
ResultCollectors
.
toComplex
());
if
(!
result
.
isSuccess
())
{
...
...
@@ -120,6 +121,7 @@ public class UpmsRoleController extends BaseController {
public
Object
update
(
@PathVariable
(
"id"
)
int
id
,
UpmsRole
upmsRole
)
{
ComplexResult
result
=
FluentValidator
.
checkAll
()
.
on
(
upmsRole
.
getName
(),
new
LengthValidator
(
1
,
20
,
"名称"
))
.
on
(
upmsRole
.
getTitle
(),
new
LengthValidator
(
1
,
20
,
"标题"
))
.
doValidate
()
.
result
(
ResultCollectors
.
toComplex
());
if
(!
result
.
isSuccess
())
{
...
...
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/create.jsp
浏览文件 @
56ea1934
...
...
@@ -12,6 +12,10 @@
<label
for=
"name"
>
名称
</label>
<input
id=
"name"
type=
"text"
class=
"form-control"
name=
"name"
maxlength=
"20"
>
</div>
<div
class=
"form-group"
>
<label
for=
"title"
>
标题
</label>
<input
id=
"title"
type=
"text"
class=
"form-control"
name=
"title"
maxlength=
"20"
>
</div>
<div
class=
"form-group"
>
<label
for=
"description"
>
描述
</label>
<input
id=
"description"
type=
"text"
class=
"form-control"
name=
"description"
maxlength=
"300"
>
...
...
@@ -33,6 +37,10 @@ function createSubmit() {
$
(
'
#name
'
).
focus
();
return
false
;
}
if
(
$
(
'
#title
'
).
val
()
==
''
)
{
$
(
'
#title
'
).
focus
();
return
false
;
}
},
success
:
function
(
result
)
{
if
(
result
.
code
!=
1
)
{
...
...
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/index.jsp
浏览文件 @
56ea1934
...
...
@@ -72,6 +72,7 @@ $(function() {
{
field
:
'
ck
'
,
checkbox
:
true
},
{
field
:
'
roleId
'
,
title
:
'
编号
'
,
sortable
:
true
,
align
:
'
center
'
},
{
field
:
'
name
'
,
title
:
'
角色名称
'
},
{
field
:
'
title
'
,
title
:
'
角色标题
'
},
{
field
:
'
description
'
,
title
:
'
角色描述
'
},
{
field
:
'
action
'
,
title
:
'
操作
'
,
align
:
'
center
'
,
formatter
:
'
actionFormatter
'
,
events
:
'
actionEvents
'
,
clickToSelect
:
false
}
]
...
...
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/manage/role/update.jsp
浏览文件 @
56ea1934
...
...
@@ -12,6 +12,10 @@
<label
for=
"name"
>
名称
</label>
<input
id=
"name"
type=
"text"
class=
"form-control"
name=
"name"
maxlength=
"20"
value=
"${role.name}"
>
</div>
<div
class=
"form-group"
>
<label
for=
"title"
>
标题
</label>
<input
id=
"title"
type=
"text"
class=
"form-control"
name=
"title"
maxlength=
"20"
value=
"${role.title}"
>
</div>
<div
class=
"form-group"
>
<label
for=
"description"
>
描述
</label>
<input
id=
"description"
type=
"text"
class=
"form-control"
name=
"description"
maxlength=
"300"
value=
"${role.description}"
>
...
...
@@ -29,10 +33,14 @@ function createSubmit() {
url
:
'
${basePath}/manage/role/update/${role.roleId}
'
,
data
:
$
(
'
#updateForm
'
).
serialize
(),
beforeSend
:
function
()
{
if
(
$
(
'
#name
'
).
val
()
==
''
)
{
$
(
'
#name
'
).
focus
();
return
false
;
}
if
(
$
(
'
#name
'
).
val
()
==
''
)
{
$
(
'
#name
'
).
focus
();
return
false
;
}
if
(
$
(
'
#title
'
).
val
()
==
''
)
{
$
(
'
#title
'
).
focus
();
return
false
;
}
},
success
:
function
(
result
)
{
if
(
result
.
code
!=
1
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录