Commit 286004f7 by fengshuonan

deptid改成驼峰

parent 765f30da
...@@ -31,7 +31,7 @@ public class RoleDict extends AbstractDictMap { ...@@ -31,7 +31,7 @@ public class RoleDict extends AbstractDictMap {
put("num", "角色排序"); put("num", "角色排序");
put("pid", "角色的父级"); put("pid", "角色的父级");
put("name", "角色名称"); put("name", "角色名称");
put("deptid", "部门名称"); put("deptId", "部门名称");
put("tips", "备注"); put("tips", "备注");
put("ids", "资源名称"); put("ids", "资源名称");
} }
...@@ -39,7 +39,7 @@ public class RoleDict extends AbstractDictMap { ...@@ -39,7 +39,7 @@ public class RoleDict extends AbstractDictMap {
@Override @Override
protected void initBeWrapped() { protected void initBeWrapped() {
putFieldWrapperMethodName("pid", "getSingleRoleName"); putFieldWrapperMethodName("pid", "getSingleRoleName");
putFieldWrapperMethodName("deptid", "getDeptName"); putFieldWrapperMethodName("deptId", "getDeptName");
putFieldWrapperMethodName("roleId", "getSingleRoleName"); putFieldWrapperMethodName("roleId", "getSingleRoleName");
putFieldWrapperMethodName("ids", "getMenuNames"); putFieldWrapperMethodName("ids", "getMenuNames");
} }
......
...@@ -36,14 +36,14 @@ public class UserDict extends AbstractDictMap { ...@@ -36,14 +36,14 @@ public class UserDict extends AbstractDictMap {
put("email", "电子邮件"); put("email", "电子邮件");
put("phone", "电话"); put("phone", "电话");
put("roleid", "角色名称"); put("roleid", "角色名称");
put("deptid", "部门名称"); put("deptId", "部门名称");
put("roleIds", "角色名称集合"); put("roleIds", "角色名称集合");
} }
@Override @Override
protected void initBeWrapped() { protected void initBeWrapped() {
putFieldWrapperMethodName("sex", "getSexName"); putFieldWrapperMethodName("sex", "getSexName");
putFieldWrapperMethodName("deptid", "getDeptName"); putFieldWrapperMethodName("deptId", "getDeptName");
putFieldWrapperMethodName("roleid", "getSingleRoleName"); putFieldWrapperMethodName("roleid", "getSingleRoleName");
putFieldWrapperMethodName("userId", "getUserAccountById"); putFieldWrapperMethodName("userId", "getUserAccountById");
putFieldWrapperMethodName("roleIds", "getRoleName"); putFieldWrapperMethodName("roleIds", "getRoleName");
......
...@@ -316,9 +316,9 @@ public class ConstantFactory implements IConstantFactory { ...@@ -316,9 +316,9 @@ public class ConstantFactory implements IConstantFactory {
* 获取子部门id * 获取子部门id
*/ */
@Override @Override
public List<Long> getSubDeptId(Long deptid) { public List<Long> getSubDeptId(Long deptId) {
Wrapper<Dept> wrapper = new EntityWrapper<>(); Wrapper<Dept> wrapper = new EntityWrapper<>();
wrapper = wrapper.like("PIDS", "%[" + deptid + "]%"); wrapper = wrapper.like("PIDS", "%[" + deptId + "]%");
List<Dept> depts = this.deptMapper.selectList(wrapper); List<Dept> depts = this.deptMapper.selectList(wrapper);
ArrayList<Long> deptids = new ArrayList<>(); ArrayList<Long> deptids = new ArrayList<>();
...@@ -336,8 +336,8 @@ public class ConstantFactory implements IConstantFactory { ...@@ -336,8 +336,8 @@ public class ConstantFactory implements IConstantFactory {
* 获取所有父部门id * 获取所有父部门id
*/ */
@Override @Override
public List<Long> getParentDeptIds(Long deptid) { public List<Long> getParentDeptIds(Long deptId) {
Dept dept = deptMapper.selectById(deptid); Dept dept = deptMapper.selectById(deptId);
String pids = dept.getPids(); String pids = dept.getPids();
String[] split = pids.split(","); String[] split = pids.split(",");
ArrayList<Long> parentDeptIds = new ArrayList<>(); ArrayList<Long> parentDeptIds = new ArrayList<>();
......
...@@ -121,11 +121,11 @@ public interface IConstantFactory { ...@@ -121,11 +121,11 @@ public interface IConstantFactory {
/** /**
* 获取子部门id * 获取子部门id
*/ */
List<Long> getSubDeptId(Long deptid); List<Long> getSubDeptId(Long deptId);
/** /**
* 获取所有父部门id * 获取所有父部门id
*/ */
List<Long> getParentDeptIds(Long deptid); List<Long> getParentDeptIds(Long deptId);
} }
...@@ -193,7 +193,7 @@ public class UserMgrController extends BaseController { ...@@ -193,7 +193,7 @@ public class UserMgrController extends BaseController {
@ResponseBody @ResponseBody
public Object list(@RequestParam(required = false) String name, public Object list(@RequestParam(required = false) String name,
@RequestParam(required = false) String timeLimit, @RequestParam(required = false) String timeLimit,
@RequestParam(required = false) Long deptid) { @RequestParam(required = false) Long deptId) {
//拼接查询条件 //拼接查询条件
String beginTime = ""; String beginTime = "";
...@@ -206,11 +206,11 @@ public class UserMgrController extends BaseController { ...@@ -206,11 +206,11 @@ public class UserMgrController extends BaseController {
} }
if (ShiroKit.isAdmin()) { if (ShiroKit.isAdmin()) {
List<Map<String, Object>> users = userService.selectUsers(null, name, beginTime, endTime, deptid); List<Map<String, Object>> users = userService.selectUsers(null, name, beginTime, endTime, deptId);
return new UserWarpper(users).wrap(); return new UserWarpper(users).wrap();
} else { } else {
DataScope dataScope = new DataScope(ShiroKit.getDeptDataScope()); DataScope dataScope = new DataScope(ShiroKit.getDeptDataScope());
List<Map<String, Object>> users = userService.selectUsers(dataScope, name, beginTime, endTime, deptid); List<Map<String, Object>> users = userService.selectUsers(dataScope, name, beginTime, endTime, deptId);
return new UserWarpper(users).wrap(); return new UserWarpper(users).wrap();
} }
} }
...@@ -403,8 +403,8 @@ public class UserMgrController extends BaseController { ...@@ -403,8 +403,8 @@ public class UserMgrController extends BaseController {
} }
List<Long> deptDataScope = ShiroKit.getDeptDataScope(); List<Long> deptDataScope = ShiroKit.getDeptDataScope();
User user = this.userService.selectById(userId); User user = this.userService.selectById(userId);
Long deptid = user.getDeptId(); Long deptId = user.getDeptId();
if (deptDataScope.contains(deptid)) { if (deptDataScope.contains(deptId)) {
return; return;
} else { } else {
throw new ServiceException(BizExceptionEnum.NO_PERMITION); throw new ServiceException(BizExceptionEnum.NO_PERMITION);
......
...@@ -31,7 +31,7 @@ public interface UserMapper extends BaseMapper<User> { ...@@ -31,7 +31,7 @@ public interface UserMapper extends BaseMapper<User> {
/** /**
* 根据条件查询用户列表 * 根据条件查询用户列表
*/ */
List<Map<String, Object>> selectUsers(@Param("dataScope") DataScope dataScope, @Param("name") String name, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deptid") Long deptId); List<Map<String, Object>> selectUsers(@Param("dataScope") DataScope dataScope, @Param("name") String name, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deptId") Long deptId);
/** /**
* 设置用户的角色 * 设置用户的角色
......
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
or ACCOUNT like CONCAT('%',#{name},'%') or ACCOUNT like CONCAT('%',#{name},'%')
or NAME like CONCAT('%',#{name},'%')) or NAME like CONCAT('%',#{name},'%'))
</if> </if>
<if test="deptid != null and deptid != 0"> <if test="deptId != null and deptId != 0">
and (DEPT_ID = #{deptid} or DEPT_ID in ( select DEPT_ID from sys_dept where PIDS like CONCAT('%[', #{deptid}, ']%') )) and (DEPT_ID = #{deptId} or DEPT_ID in ( select DEPT_ID from sys_dept where PIDS like CONCAT('%[', #{deptId}, ']%') ))
</if> </if>
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and (CREATE_TIME between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) and (CREATE_TIME between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="form-group"> <div class="form-group">
<h5>别名 <span class="text-danger">*</span></h5> <h5>别名 <span class="text-danger">*</span></h5>
<div class="controls"> <div class="controls">
<input v-model="tips" type="text" class="form-control"> <input v-model="description" type="text" class="form-control">
</div> </div>
</div> </div>
</div> </div>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<h5>部门名称 <span class="text-danger">*</span></h5> <h5>部门名称 <span class="text-danger">*</span></h5>
<div class="controls"> <div class="controls">
<input v-model="deptName" id="detpName" \@click="showDeptSelectTree" type="text" class="form-control" autocomplete="off"> <input v-model="deptName" id="detpName" \@click="showDeptSelectTree" type="text" class="form-control" autocomplete="off">
<input v-model="deptid" type="hidden" class="form-control"> <input v-model="deptId" type="hidden" class="form-control">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<h5>部门名称 <span class="text-danger">*</span></h5> <h5>部门名称 <span class="text-danger">*</span></h5>
<div class="controls"> <div class="controls">
<input v-model="deptName" id="detpName" \@click="showDeptSelectTree" type="text" class="form-control" autocomplete="off"> <input v-model="deptName" id="detpName" \@click="showDeptSelectTree" type="text" class="form-control" autocomplete="off">
<input v-model="deptid" type="hidden" class="form-control"> <input v-model="deptId" type="hidden" class="form-control">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
......
...@@ -17,11 +17,10 @@ var Role = { ...@@ -17,11 +17,10 @@ var Role = {
Role.initColumn = function () { Role.initColumn = function () {
return [ return [
{field: 'selectItem', radio: true}, {field: 'selectItem', radio: true},
{title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, {title: 'id', field: 'roleId', visible: false, align: 'center', valign: 'middle'},
{title: '名称', field: 'name', align: 'center', valign: 'middle', sortable: true}, {title: '名称', field: 'name', align: 'center', valign: 'middle', sortable: true},
{title: '上级角色', field: 'pName', align: 'center', valign: 'middle', sortable: true}, {title: '上级角色', field: 'pName', align: 'center', valign: 'middle', sortable: true},
{title: '所在部门', field: 'deptName', align: 'center', valign: 'middle', sortable: true}, {title: '别名', field: 'description', align: 'center', valign: 'middle', sortable: true}];
{title: '别名', field: 'tips', align: 'center', valign: 'middle', sortable: true}];
}; };
...@@ -64,7 +63,7 @@ Role.openChangeRole = function () { ...@@ -64,7 +63,7 @@ Role.openChangeRole = function () {
area: ['800px', '400px'], //宽高 area: ['800px', '400px'], //宽高
fix: false, //不固定 fix: false, //不固定
maxmin: true, maxmin: true,
content: Feng.ctxPath + '/role/role_edit?roleId=' + this.seItem.id content: Feng.ctxPath + '/role/role_edit?roleId=' + this.seItem.roleId
}); });
} }
}; };
...@@ -82,7 +81,7 @@ Role.delRole = function () { ...@@ -82,7 +81,7 @@ Role.delRole = function () {
}, function (data) { }, function (data) {
Feng.error("删除失败!" + data.responseJSON.message + "!"); Feng.error("删除失败!" + data.responseJSON.message + "!");
}); });
ajax.set("roleId", Role.seItem.id); ajax.set("roleId", Role.seItem.roleId);
ajax.start(); ajax.start();
}; };
...@@ -101,7 +100,7 @@ Role.assign = function () { ...@@ -101,7 +100,7 @@ Role.assign = function () {
area: ['300px', '450px'], //宽高 area: ['300px', '450px'], //宽高
fix: false, //不固定 fix: false, //不固定
maxmin: true, maxmin: true,
content: Feng.ctxPath + '/role/role_assign/' + this.seItem.id content: Feng.ctxPath + '/role/role_assign/' + this.seItem.roleId
}); });
} }
}; };
......
...@@ -8,7 +8,7 @@ var RoleAddDlg = { ...@@ -8,7 +8,7 @@ var RoleAddDlg = {
pid: "", pid: "",
tips: "", tips: "",
deptName: "", deptName: "",
deptid: "", deptId: "",
num: "" num: ""
} }
}; };
...@@ -69,7 +69,7 @@ $(function () { ...@@ -69,7 +69,7 @@ $(function () {
}, },
showDeptSelectTree: function () { showDeptSelectTree: function () {
var formName = encodeURIComponent("parent.RoleAddDlg.app.deptName"); var formName = encodeURIComponent("parent.RoleAddDlg.app.deptName");
var formId = encodeURIComponent("parent.RoleAddDlg.app.deptid"); var formId = encodeURIComponent("parent.RoleAddDlg.app.deptId");
var treeUrl = encodeURIComponent(Feng.ctxPath + "/dept/tree"); var treeUrl = encodeURIComponent(Feng.ctxPath + "/dept/tree");
layer.open({ layer.open({
......
...@@ -9,7 +9,7 @@ var RoleEditDlg = { ...@@ -9,7 +9,7 @@ var RoleEditDlg = {
pid: "", pid: "",
tips: "", tips: "",
deptName: "", deptName: "",
deptid: "", deptId: "",
num: "" num: ""
} }
}; };
...@@ -75,7 +75,7 @@ $(function () { ...@@ -75,7 +75,7 @@ $(function () {
}, },
showDeptSelectTree: function () { showDeptSelectTree: function () {
var formName = encodeURIComponent("parent.RoleEditDlg.app.deptName"); var formName = encodeURIComponent("parent.RoleEditDlg.app.deptName");
var formId = encodeURIComponent("parent.RoleEditDlg.app.deptid"); var formId = encodeURIComponent("parent.RoleEditDlg.app.deptId");
var treeUrl = encodeURIComponent(Feng.ctxPath + "/dept/tree"); var treeUrl = encodeURIComponent(Feng.ctxPath + "/dept/tree");
layer.open({ layer.open({
......
...@@ -264,7 +264,7 @@ MgrUser.resetPwdById = function (userId) { ...@@ -264,7 +264,7 @@ MgrUser.resetPwdById = function (userId) {
MgrUser.search = function () { MgrUser.search = function () {
var queryData = {}; var queryData = {};
queryData['deptid'] = MgrUser.condition.deptId; queryData['deptId'] = MgrUser.condition.deptId;
queryData['name'] = MgrUser.condition.name; queryData['name'] = MgrUser.condition.name;
queryData['timeLimit'] = $("#timeLimit").val(); queryData['timeLimit'] = $("#timeLimit").val();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment