部门优化
This commit is contained in:
parent
959da6c47f
commit
45dedb270a
|
|
@ -129,6 +129,11 @@ public class SysDept extends BaseEntity {
|
||||||
|
|
||||||
private SysUser sysUser;
|
private SysUser sysUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否首页显示
|
||||||
|
*/
|
||||||
|
private Boolean enableIndexShow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属公司ID
|
* 所属公司ID
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
|
||||||
private String getToken(ServerHttpRequest request) {
|
private String getToken(ServerHttpRequest request) {
|
||||||
String token = request.getHeaders().getFirst(TokenConstants.AUTHENTICATION);
|
String token = request.getHeaders().getFirst(TokenConstants.AUTHENTICATION);
|
||||||
// 如果前端设置了令牌前缀,则裁剪掉前缀
|
// 如果前端设置了令牌前缀,则裁剪掉前缀
|
||||||
if (StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX)) {
|
if (token != null && StringUtils.isNotEmpty(token) && token.startsWith(TokenConstants.PREFIX)) {
|
||||||
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
|
token = token.replaceFirst(TokenConstants.PREFIX, StringUtils.EMPTY);
|
||||||
}
|
}
|
||||||
return token;
|
return token;
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ public class SysFileController {
|
||||||
|
|
||||||
// 处理可能包含的data URI前缀(如"data:image/png;base64,")
|
// 处理可能包含的data URI前缀(如"data:image/png;base64,")
|
||||||
String base64Data;
|
String base64Data;
|
||||||
if (entity.getBase64File().startsWith("data:")) {
|
if (entity.getBase64File().startsWith("data:") ) {
|
||||||
// 提取真正的base64内容
|
// 提取真正的base64内容
|
||||||
String[] parts = entity.getBase64File().split(",");
|
String[] parts = entity.getBase64File().split(",");
|
||||||
if (parts.length < 2) {
|
if (parts.length < 2) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,21 @@ public class OrgDeptTreeVo {
|
||||||
/** 级别:一级机构、二级机构、三级机构 */
|
/** 级别:一级机构、二级机构、三级机构 */
|
||||||
private String level;
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String leader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否首页显示
|
||||||
|
*/
|
||||||
|
private Boolean isShow;
|
||||||
|
|
||||||
/** 主管理员 */
|
/** 主管理员 */
|
||||||
private String mainAdmin;
|
private String mainAdmin;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,9 @@ public class SysNewDeptServiceImpl implements ISysNewDeptService {
|
||||||
public int insertOrg(OrgDeptTreeVo org) {
|
public int insertOrg(OrgDeptTreeVo org) {
|
||||||
SysDept sysDept = new SysDept();
|
SysDept sysDept = new SysDept();
|
||||||
sysDept.setDeptName(org.getOrgName() != null ? org.getOrgName() : org.getName());
|
sysDept.setDeptName(org.getOrgName() != null ? org.getOrgName() : org.getName());
|
||||||
|
sysDept.setLeader(org.getLeader());
|
||||||
|
sysDept.setPhone(org.getPhone());
|
||||||
|
sysDept.setEnableIndexShow(org.getIsShow() != null ? org.getIsShow() : false);
|
||||||
sysDept.setStatus("0");
|
sysDept.setStatus("0");
|
||||||
sysDept.setDelFlag("0");
|
sysDept.setDelFlag("0");
|
||||||
sysDept.setLeader(org.getMainAdmin());
|
sysDept.setLeader(org.getMainAdmin());
|
||||||
|
|
@ -193,7 +196,9 @@ public class SysNewDeptServiceImpl implements ISysNewDeptService {
|
||||||
}
|
}
|
||||||
|
|
||||||
sysDept.setDeptName(org.getOrgName() != null ? org.getOrgName() : org.getName());
|
sysDept.setDeptName(org.getOrgName() != null ? org.getOrgName() : org.getName());
|
||||||
sysDept.setLeader(org.getMainAdmin());
|
sysDept.setLeader(org.getLeader());
|
||||||
|
sysDept.setPhone(org.getPhone());
|
||||||
|
sysDept.setEnableIndexShow(org.getIsShow() != null ? org.getIsShow() : false);
|
||||||
|
|
||||||
return sysDeptMapper.updateDept(sysDept);
|
return sysDeptMapper.updateDept(sysDept);
|
||||||
}
|
}
|
||||||
|
|
@ -327,6 +332,10 @@ public class SysNewDeptServiceImpl implements ISysNewDeptService {
|
||||||
// 设置级别
|
// 设置级别
|
||||||
vo.setLevel(getLevelString(dept.getDeptLevel()));
|
vo.setLevel(getLevelString(dept.getDeptLevel()));
|
||||||
|
|
||||||
|
vo.setLeader(dept.getLeader());
|
||||||
|
vo.setPhone(dept.getPhone());
|
||||||
|
vo.setIsShow(dept.getEnableIndexShow());
|
||||||
|
|
||||||
// 递归构建子节点
|
// 递归构建子节点
|
||||||
List<OrgDeptTreeVo> children = buildOrgTree(deptList, usersByDept, dept.getDeptId(), query);
|
List<OrgDeptTreeVo> children = buildOrgTree(deptList, usersByDept, dept.getDeptId(), query);
|
||||||
if (children != null && !children.isEmpty()) {
|
if (children != null && !children.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="leader" column="leader" />
|
<result property="leader" column="leader" />
|
||||||
<result property="phone" column="phone" />
|
<result property="phone" column="phone" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
<result property="enableIndexShow" column="is_show" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
<result property="parentName" column="parent_name" />
|
<result property="parentName" column="parent_name" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
|
|
@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.leader,
|
d.leader,
|
||||||
d.phone,
|
d.phone,
|
||||||
d.status,
|
d.status,
|
||||||
|
d.is_show,
|
||||||
d.del_flag,
|
d.del_flag,
|
||||||
d.create_by,
|
d.create_by,
|
||||||
d.create_time,
|
d.create_time,
|
||||||
|
|
@ -209,6 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="initPassword != null and initPassword != ''">init_password,</if>
|
<if test="initPassword != null and initPassword != ''">init_password,</if>
|
||||||
<if test="menuTemplateId != null">menu_template_id,</if>
|
<if test="menuTemplateId != null">menu_template_id,</if>
|
||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
|
<if test="enableIndexShow != null">is_show,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="deptLevel != null and deptLevel != ''">dept_level,</if>
|
<if test="deptLevel != null and deptLevel != ''">dept_level,</if>
|
||||||
create_time
|
create_time
|
||||||
|
|
@ -231,6 +234,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="initPassword != null and initPassword != ''">#{initPassword},</if>
|
<if test="initPassword != null and initPassword != ''">#{initPassword},</if>
|
||||||
<if test="menuTemplateId != null">#{menuTemplateId},</if>
|
<if test="menuTemplateId != null">#{menuTemplateId},</if>
|
||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="enableIndexShow != null">#{enableIndexShow},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="deptLevel != null and deptLevel != ''">#{deptLevel},</if>
|
<if test="deptLevel != null and deptLevel != ''">#{deptLevel},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
|
|
@ -258,6 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="initPassword != null and initPassword != ''">init_password = #{initPassword},</if>
|
<if test="initPassword != null and initPassword != ''">init_password = #{initPassword},</if>
|
||||||
<if test="menuTemplateId != null and menuTemplateId != ''">menu_template_id = #{menuTemplateId},</if>
|
<if test="menuTemplateId != null and menuTemplateId != ''">menu_template_id = #{menuTemplateId},</if>
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="enableIndexShow != null">is_show = #{enableIndexShow},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue