1.修改用户,角色中的国际化2.修改用户角色新增已经删除角色报错
This commit is contained in:
@@ -173,7 +173,7 @@ public class RoleController extends BaseController {
|
||||
public String checkName(String oldName, String name) {
|
||||
if (name!=null && name.equals(oldName)) {
|
||||
return "true";
|
||||
} else if (name!=null && roleService.getRoleByName(name) == null) {
|
||||
} else if (name!=null && roleService.getAllRoleByName(name) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
|
||||
@@ -148,7 +148,7 @@ public class UserController extends BaseController{
|
||||
public String checkLoginName(String oldLoginId, String loginId) {
|
||||
if (loginId !=null && loginId.equals(oldLoginId)) {
|
||||
return "true";
|
||||
} else if (loginId !=null && systemService.getUserByLoginName(loginId) == null) {
|
||||
} else if (loginId !=null && userService.getUserByLoginName(loginId) == null) {
|
||||
return "true";
|
||||
}
|
||||
return "false";
|
||||
|
||||
@@ -15,4 +15,6 @@ public interface SysRoleDao extends CrudDao<SysRole>{
|
||||
|
||||
List<SysUser> findUserByRole(SysRole role);
|
||||
|
||||
SysRole getAllRoleByName(SysRole r);
|
||||
|
||||
}
|
||||
@@ -36,6 +36,13 @@
|
||||
FROM sys_role r
|
||||
WHERE r.name = #{name} AND r.status = #{DEL_FLAG_NORMAL}
|
||||
</select>
|
||||
<!-- 新增时存在的无效名角色 校验也不可添加 -->
|
||||
<select id="getAllRoleByName" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM sys_role r
|
||||
WHERE r.name = #{name}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findAllList" resultMap="BaseResultMap">
|
||||
|
||||
@@ -32,6 +32,12 @@ public class RoleService extends BaseService {
|
||||
r.setName(name);
|
||||
return roleDao.getByName(r);
|
||||
}
|
||||
//获取所有状态角色
|
||||
public SysRole getAllRoleByName(String name) {
|
||||
SysRole r = new SysRole();
|
||||
r.setName(name);
|
||||
return roleDao.getAllRoleByName(r);
|
||||
}
|
||||
|
||||
|
||||
public void saveOrUpdate(SysRole role) {
|
||||
|
||||
@@ -399,22 +399,22 @@ min_value=The minimum value should not be less than
|
||||
|
||||
#==========xitongguanli begin======================
|
||||
login=Login
|
||||
owner_company=\u5F52\u5C5E\u516C\u53F8
|
||||
company=\u516C\u53F8
|
||||
owner_group=\u5F52\u5C5E\u90E8\u95E8
|
||||
owner_company=Owner Company
|
||||
company=Company
|
||||
owner_group=Owner Group
|
||||
group=Group
|
||||
template=Template Download
|
||||
export=Export
|
||||
import=Import
|
||||
sure_export=\u786E\u8BA4\u8981\u5BFC\u51FA\u7528\u6237\u6570\u636E\u5417
|
||||
sure_delete=Confirm delete user?
|
||||
login_name=login ID
|
||||
sure_export=Are You Sure Export The Data
|
||||
sure_delete=Confirm Delete It
|
||||
login_name=Login ID
|
||||
name=Name
|
||||
identify_mark=\u8EAB\u4EFD\u6807\u8BC6
|
||||
mail=\u90AE\u7BB1
|
||||
identify_mark=Identify Mark
|
||||
mail=Mail
|
||||
role=Role
|
||||
manager=Management\u4EBA\u5458
|
||||
ordinary_man=\u666E\u901A\u4EBA\u5458
|
||||
manager=Management
|
||||
ordinary_man=Ordinary Man
|
||||
nextPage=Next Page
|
||||
previousPage=Previous Page
|
||||
total=Total
|
||||
@@ -422,13 +422,13 @@ current=Current
|
||||
page=Pages
|
||||
count=Rows
|
||||
name_image=Image
|
||||
organizer=\u5F52\u5C5E\u5355\u4F4D
|
||||
save_organization=\u4FDD\u5B58\u673A\u6784
|
||||
organizer=Organizer
|
||||
save_organization=Save Organization
|
||||
success=Success
|
||||
password=Password
|
||||
nochange_blank=If don't modify,please keep blank
|
||||
confirm_password=Confirm Password
|
||||
manager_info=Management\u4EBA\u5458\u9700\u6307\u5B9A\u8EAB\u4EFD\u6807\u8BC6\u4E3A\u201C Management\u4EBA\u5458\u201D,\u5426\u5219\u5F71\u54CDAudited\u6D41\u7A0B\!
|
||||
manager_info=Management Need To Be Marked As "Management Man",Or It Will effects Audited\!
|
||||
name_existed=Login id has existed
|
||||
company_range=\u90E8\u95E8\u4E0D\u518D\u516C\u53F8\u8303\u56F4\u5185
|
||||
equal_password=\u8F93\u5165\u4E0E\u4E0A\u9762\u76F8\u540C\u7684\u5BC6\u7801
|
||||
@@ -441,65 +441,65 @@ org_type=\u673A\u6784Type
|
||||
org_duty_type=\u673A\u6784\u804C\u8D23\u5206\u7C7B
|
||||
add_level=\u6DFB\u52A0\u4E0B\u7EA7\u673A\u6784
|
||||
delete_all_child=\u8981\u5220\u9664\u8BE5\u9879\u53CA\u6240\u6709\u5B50\u9879\u5417
|
||||
parent_org=\u4E0A\u7EA7\u673A\u6784
|
||||
parent_org=parent org
|
||||
org_level=\u673A\u6784\u7EA7\u522B
|
||||
is_useable=\u662F\u5426\u53EF\u7528
|
||||
is_useable=Whether Useable
|
||||
is_useable_info=\u201C\u662F\u201D\u4EE3\u8868\u6B64 Account\u5141\u8BB8\u767B\u9646,\u201C\u5426\u201D\u5219\u8868\u793A\u6B64 Account\u4E0D\u5141\u8BB8\u767B\u9646
|
||||
leader=\u4E3B\u8D1F\u8D23\u4EBA
|
||||
vice_leader=\u526F\u8D1F\u8D23\u4EBA
|
||||
address=\u8054\u7CFB\u5730\u5740
|
||||
address=Address
|
||||
master=\u8D1F\u8D23\u4EBA
|
||||
post_code=\u90AE\u653F\u7F16\u7801
|
||||
phone=\u7535\u8BDD
|
||||
fax=\u4F20\u771F
|
||||
nochange=\u6682\u65E0\u4FEE\u6539\u8BB0\u5F55\!
|
||||
module_name=\u6A21\u5757Name
|
||||
dict_mark=\u5B57\u5178\u6807\u8BC6
|
||||
run_state=\u8FD0\u884CState
|
||||
mark=\u6807\u8BC6
|
||||
value=\u503C
|
||||
is_maintain=\u662F\u5426\u53EF\u7EF4\u62A4
|
||||
last_edit_time=\u6700\u540E\u4FEE\u6539\u65F6\u95F4
|
||||
dict_edit_record=\u5B57\u5178\u4FEE\u6539\u8BB0\u5F55
|
||||
dict_detail=\u5B57\u5178\u8BE6\u60C5
|
||||
edit_record=\u4FEE\u6539\u8BB0\u5F55
|
||||
edit_record_view=\u4FEE\u6539\u8BB0\u5F55\u67E5\u770B
|
||||
dict_edit_info=\u6570\u636E\u5B57\u5178\u5728\u7CFB\u7EDF\u4E2D\u975E\u5E38\u91CD\u8981,\u60A8\u786E\u8BA4\u8981\u4FEE\u6539\u5417\uFF1F
|
||||
dict_delete_info=\u6570\u636E\u5B57\u5178\u5728\u7CFB\u7EDF\u4E2D\u975E\u5E38\u91CD\u8981,\u60A8\u786E\u8BA4\u8981\u5220\u9664\u5417\uFF1F
|
||||
dict_saveitem_error=\u4FDD\u5B58\u4FE1\u606F\u51FA\u73B0\u95EE\u9898,\u8BF7\u6DFB\u52A0\u8BCD\u6761\u9879\!
|
||||
dict_saveitem_nullerror=\u4FDD\u5B58\u4FE1\u606F\u51FA\u73B0\u95EE\u9898,\u6BCF\u4E2A\u8BCD\u6761\u6807\u8BC6\u4E0E\u503C\u90FDCan't be empty\!
|
||||
submit_error=\u63D0\u4EA4Configuration\u51FA\u73B0\u95EE\u9898,\u8BF7\u770B\u9519\u8BEF\u63D0\u793A\!
|
||||
form_validate=\u8868\u5355\u9A8C\u8BC1\u6210\u529F\!
|
||||
entry=\u8BCD\u6761\u9879
|
||||
add_entry=\u6DFB\u52A0\u8BCD\u6761
|
||||
click_add_entry=\u70B9\u51FB\u6DFB\u52A0\u8BCD\u6761
|
||||
maintainable=\u53EF\u7EF4\u62A4
|
||||
useable=\u53EF\u7528
|
||||
click_add=\u70B9\u51FB\u6DFB\u52A0
|
||||
menu_name=\u83DC\u5355Name
|
||||
unicode=\u56FD\u9645\u5316\u7F16\u7801
|
||||
link=\u94FE\u63A5
|
||||
visible=\u53EF\u89C1
|
||||
permission_mark=\u6743\u9650\u6807\u8BC6
|
||||
display=\u663E\u793A
|
||||
hide=\u9690\u85CF
|
||||
add_child_menu=\u6DFB\u52A0\u4E0B\u7EA7\u83DC\u5355
|
||||
save=\u4FDD\u5B58
|
||||
save_sort=\u4FDD\u5B58\u6392\u5E8F
|
||||
nochange=No Revised Record\!
|
||||
module_name=Module Name
|
||||
dict_mark=Dict Mark
|
||||
run_state=Run State
|
||||
mark=Mark
|
||||
value=Value
|
||||
is_maintain=Whether Maintain
|
||||
last_edit_time=Last Edit Time
|
||||
dict_edit_record=Dictionary Edit Record
|
||||
dict_detail=Dictionary Detail
|
||||
edit_record=Edit Record
|
||||
edit_record_view=Edit Record View
|
||||
dict_edit_info=Dictionary Is Important,Are You Sure To Edit
|
||||
dict_delete_info=Dictionary Is Important,Are You Sure To Delete
|
||||
dict_saveitem_error=Save Error,Please Add Item\!
|
||||
dict_saveitem_nullerror=Save Error,Mark And Value Can't be empty\!
|
||||
submit_error=Submit Error\!
|
||||
form_validate=Form Validate Success\!
|
||||
entry=Entry
|
||||
add_entry=Add Entry
|
||||
click_add_entry=Click Add Type In
|
||||
maintainable=Maintainable
|
||||
useable=Useable
|
||||
click_add=Click And Add
|
||||
menu_name=Menu Name
|
||||
unicode=Unicode
|
||||
link=Link
|
||||
visible=Visible
|
||||
permission_mark=Permission Mark
|
||||
display=Display
|
||||
hide=Hide
|
||||
add_child_menu=Add Child Menu
|
||||
save=Save
|
||||
save_sort=Save Sort
|
||||
menu=Menu
|
||||
parent_menu=\u4E0A\u7EA7\u83DC\u5355
|
||||
aim=\u76EE\u6807
|
||||
parent_menu=Parent Menu
|
||||
aim=Aim
|
||||
click_menu_turn=\u70B9\u51FB\u83DC\u5355\u8DF3\u8F6C\u7684\u9875\u9762
|
||||
link_window_info=\u94FE\u63A5\u5730\u5740\u6253\u5F00\u7684\u76EE\u6807\u7A97\u53E3,\u9ED8\u8BA4\:mainFrame
|
||||
is_top_menu=\u662F\u5426\u9876\u90E8\u5BFC\u822A\u83DC\u5355
|
||||
icon=\u56FE\u6807
|
||||
icon=Icon
|
||||
is_top_menu_info=\u8BE5\u83DC\u5355\u6216\u64CD\u4F5C\u662F\u5426\u9876\u90E8\u5BFC\u822A\u83DC\u5355
|
||||
sort_info=\u6392\u5217\u987A\u5E8F,\u5347\u5E8F.
|
||||
sort_info=Sort Asc
|
||||
is_show_sysmenu=\u8BE5\u83DC\u5355\u6216\u64CD\u4F5C\u662F\u5426\u663E\u793A\u5230\u7CFB\u7EDF\u83DC\u5355\u4E2D
|
||||
control_permission_info=\u63A7\u5236\u5668\u4E2D\u5B9A\u4E49\u7684\u6743\u9650\u6807\u8BC6,\u5982\:@RequiresPermissions("\u6743\u9650\u6807\u8BC6")
|
||||
role_name=Role Name
|
||||
data_range=Data Scope
|
||||
allot=\u5206\u914D
|
||||
allot=Allot
|
||||
role_type=Role Type
|
||||
role_permission=Role Permission
|
||||
task_allot=\u4EFB\u52A1\u5206\u914D
|
||||
@@ -517,10 +517,10 @@ role_list=Role List
|
||||
role_allot=Role Assign
|
||||
staff_list=User List
|
||||
choose_and_allot=\u901A\u8FC7\u9009\u62E9\u90E8\u95E8,\u7136\u540E\u4E3A\u5217\u51FA\u7684\u4EBA\u5458\u5206\u914D\u89D2\u8272.
|
||||
loading=\u6B63\u5728\u63D0\u4EA4,\u8BF7\u7A0D\u7B49...
|
||||
loading=It Is Submiting,Please Wait A Moment
|
||||
remove=Remove
|
||||
sure_remove_role=\u89D2\u8272\u5C06\u4ECE\u8BE5\u7528\u6237\u4E2D\u79FB\u9664\uFF1F
|
||||
system_prompt=\u7CFB\u7EDF\u63D0\u793A
|
||||
system_prompt=System Prompt
|
||||
old_password=Old Password
|
||||
new_password=New Password
|
||||
sure_new_password=Confirm New Password
|
||||
@@ -528,11 +528,11 @@ be_selected_staff=\u5F85\u9009\u4EBA\u5458
|
||||
selected_staff=\u5DF2\u9009\u4EBA\u5458
|
||||
old_remove_error=\u89D2\u8272\u539F\u6709\u6210\u5458\u4E0D\u80FD\u6E05\u9664\!
|
||||
selected_clear_success=\u5DF2\u9009\u4EBA\u5458\u6E05\u9664\u6210\u529F\!
|
||||
cancel_clear=\u53D6\u6D88\u6E05\u9664\u64CD\u4F5C\!
|
||||
sure_clear=\u6E05\u9664\u786E\u8BA4
|
||||
cancel_clear=Cancel Clear\!
|
||||
sure_clear=Sure Clear
|
||||
role_no_new=\u89D2\u8272\u672A\u5206\u914D\u65B0\u6210\u5458\!
|
||||
role_unique=\u89D2\u8272Name\u5DF2\u5B58\u5728
|
||||
role_error_info=\u8F93\u5165\u6709\u8BEF,\u8BF7\u5148\u66F4\u6B63.
|
||||
role_unique=The Role Name Has Already Existed
|
||||
role_error_info=Enter Wrong,Please Correct.
|
||||
user=User
|
||||
organization=\u673A\u6784
|
||||
file_management=File Management
|
||||
|
||||
@@ -298,9 +298,8 @@ window.onresize=function(){
|
||||
|
||||
<li><a href="${ctx}/sys/user/info" target="mainFrame"><i class="icon-user"></i> <spring:message code="userInfo"></spring:message></a></li>
|
||||
<li><a href="${ctx}/sys/user/modifyPwd" target="mainFrame"><i class="icon-lock"></i> <spring:message code="updatePwd"></spring:message></a></li>
|
||||
<li><a href="${pageContext.request.contextPath }/logout"
|
||||
title="退出登录"><i class="icon-key"></i> <spring:message
|
||||
code="exit"></spring:message></a></li>
|
||||
<li><a href="${pageContext.request.contextPath }/logout" >
|
||||
<i class="icon-key"></i> <spring:message code="exit"></spring:message></a></li>
|
||||
</ul></li>
|
||||
<!-- END USER LOGIN DROPDOWN -->
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
<li class="divider"></li>
|
||||
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
<li><a href="${ctx}/sys/dict/form?id=${dict.id}" onclick="return confirmx('<spring:message code="dict_edit_info"/>', this.href)"><i class="icon-edit"></i> <spring:message code="edit"/></a></li>
|
||||
<li><a href="${ctx}/sys/dict/form?id=${dict.id}" onclick="return confirmx('<spring:message code="dict_edit_info"/>', this.href)"><i class="fa fa-edit"></i> <spring:message code="edit"/></a></li>
|
||||
<li class="divider"></li>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="sys:dict:edit">
|
||||
|
||||
@@ -71,20 +71,20 @@
|
||||
class="required form-control" readonly="true" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group" hidden="hidden">
|
||||
<label class="col-md-3 control-label"><spring:message code="mail"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="email" htmlEscape="false" maxlength="50"
|
||||
<form:input path="email" htmlEscape="false" value="0" maxlength="50"
|
||||
class="email form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="department"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<label class="lbl control-label">${user.office.name}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
@@ -101,6 +101,7 @@
|
||||
<button id="btnSubmit" type="submit" class="btn btn-primary">
|
||||
<spring:message code="submit"></spring:message>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -54,15 +54,6 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <ul class="nav nav-tabs"> -->
|
||||
<%-- <li class="active"><a href="${ctx}/sys/user/list">用户列表</a></li> --%>
|
||||
<%-- <shiro:hasPermission name="sys:user:edit"></shiro:hasPermission> --%>
|
||||
<%-- <li><a href="${ctx}/sys/user/form">用户添加</a></li> --%>
|
||||
<!-- </ul> -->
|
||||
|
||||
|
||||
|
||||
<shiro:hasPermission name="sys:user:edit">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-primary"
|
||||
@@ -95,43 +86,13 @@
|
||||
<div class="col-md-12 filter-action-select-panle"
|
||||
style="background-color: transparent">
|
||||
<div class="row">
|
||||
<%-- <div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="owner_company"/>:</label>
|
||||
<sys:treeselect id="company" name="company.id"
|
||||
value="${user.company.id}" labelName="company.name"
|
||||
labelValue="${user.company.name}" title="company"
|
||||
url="/sys/office/treeData?type=1" cssClass="form-control"
|
||||
allowClear="true"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="owner_group"/>:</label>
|
||||
<sys:treeselect id="office" name="office.id" value="${user.office.id}" labelName="office.name"
|
||||
labelValue="${user.office.name}" title="group"
|
||||
url="/sys/office/treeData?type=3" cssClass="form-control" allowClear="true"
|
||||
notAllowSelectParent="true"/>
|
||||
</div>
|
||||
|
||||
</div> --%>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="login_name"></spring:message>:</label>
|
||||
<form:input path="loginId" htmlEscape="false" maxlength="50"
|
||||
class="form-control" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="name"></spring:message>:</label>
|
||||
@@ -147,19 +108,11 @@
|
||||
<i class="fa fa-search"></i>
|
||||
<spring:message code="search" />
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form:form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<sys:message content="${message}" />
|
||||
@@ -183,18 +136,14 @@
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="user">
|
||||
<tr>
|
||||
<%-- <td>${user.company.name}</td>
|
||||
<td>${fns:getOfficeDesc(user.office.id)}</td> --%>
|
||||
<td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginId}</a></td>
|
||||
<td>${user.name}</td>
|
||||
<%-- <td>${user.identity eq 1 ?'管理人员':'普通人员'}</td> --%>
|
||||
<%-- <td>${user.email}</td> --%>
|
||||
<td><fmt:formatDate value="${user.createTime}"
|
||||
pattern="yyyy-MM-dd HH:mm:ss" /></td>
|
||||
<shiro:hasPermission name="sys:user:edit"></shiro:hasPermission>
|
||||
<td><a href="${ctx}/sys/user/form?id=${user.id}"><spring:message code="edit" /></a> <a
|
||||
href="${ctx}/sys/user/delete?id=${user.id}"
|
||||
onclick="return confirmx('确认要删除该用户吗?', this.href)"><spring:message code="delete" /></a></td>
|
||||
onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete" /></a></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<button id="btnSubmit" type="submit" class="btn btn-primary">
|
||||
<spring:message code="submit"></spring:message>
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user