Commit d23f33b8 authored by fangxinjiang's avatar fangxinjiang

B端调优---人员信息 及 角色 菜单优化

parent 9ffc22d9
......@@ -64,7 +64,7 @@
<select id="getNotLeaveExtendList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from hrms.t_business_employee_extend_info a
from t_business_employee_extend_info a
<where>
1=1
and a.BUSINESS_WORKING_STATUS <![CDATA[<>]]> '1'
......@@ -108,8 +108,8 @@
a.BUSINESS_WORKING_STATUS,
a.DOCUMENT_TYPE,
a.ARCHIVES_ADDR
from hrms.t_business_employee_extend_info a
left join hrms.t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
from t_business_employee_extend_info a
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
where 1=1
and a.EMP_IDCARD = #{empIdcard}
and b.DELETE_FLAG = '0'
......@@ -136,8 +136,8 @@
a.BUSINESS_WORKING_STATUS,
a.DOCUMENT_TYPE,
a.ARCHIVES_ADDR
from hrms.t_business_employee_extend_info a
left join hrms.t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
from t_business_employee_extend_info a
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
where 1=1
and a.ID = #{extendId}
and b.DELETE_FLAG = '0'
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -14,6 +15,7 @@ import java.time.LocalDateTime;
import java.util.List;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
......@@ -75,6 +77,8 @@ public class TBusDept extends Model<TBusDept> {
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
......
......@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
......@@ -70,6 +72,8 @@ public class TBusLable extends Model<TBusLable> {
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
......
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.vo.RoleVo;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleMenuService;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
......@@ -119,7 +120,9 @@ public class RoleController {
*/
@GetMapping("/list")
public R<List<SysRole>> listRoles() {
return R.ok(sysRoleService.list(Wrappers.emptyWrapper()));
return R.ok(sysRoleService.list(Wrappers.<SysRole>query().lambda()
.eq(SysRole::getClientId,ClientNameConstants.CLIENT_MVP)
.eq(SysRole::getDelFlag, CommonConstants.ZERO_STRING)));
}
/**
......
......@@ -32,6 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysMenuService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.MenuTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......@@ -116,7 +117,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
public List<Tree<Long>> treeMenu(boolean lazy, Long parentId) {
if (!lazy) {
List<TreeNode<Long>> collect = baseMapper
.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSortOrder)).stream()
.selectList(Wrappers.<SysMenu>lambdaQuery()
.eq(SysMenu::getClientId, ClientNameConstants.CLIENT_MVP)
.orderByAsc(SysMenu::getSortOrder)).stream()
.map(getNodeFunction()).collect(Collectors.toList());
return TreeUtil.build(collect, CommonConstants.MENU_TREE_ROOT_ID);
......@@ -126,6 +129,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
List<TreeNode<Long>> collect = baseMapper
.selectList(Wrappers.<SysMenu>lambdaQuery().eq(SysMenu::getParentId, parent)
.eq(SysMenu::getClientId, ClientNameConstants.CLIENT_MVP)
.orderByAsc(SysMenu::getSortOrder))
.stream().map(getNodeFunction()).collect(Collectors.toList());
......
......@@ -220,12 +220,12 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
}
if (CommonConstants.ZERO_STRING.equals(type)){
if (StrUtil.isNotBlank(sysRole.getRoleName())){
wrapper.likeRight(SysRole::getRoleName,sysRole.getRoleName());
wrapper.eq(SysRole::getRoleName,sysRole.getRoleName());
}
}
if (CommonConstants.ONE_STRING.equals(type)){
if (StrUtil.isNotBlank(sysRole.getRoleCode())){
wrapper.likeRight(SysRole::getRoleCode,sysRole.getRoleCode());
wrapper.eq(SysRole::getRoleCode,sysRole.getRoleCode());
}
}
wrapper.last(CommonConstants.LAST_ONE_SQL);
......
......@@ -165,7 +165,7 @@
FROM sys_user
LEFT JOIN sys_dept ON sys_dept.dept_id = sys_user.dept_id
<where>
sys_user.del_flag = '0' and sys_user.type != '2'
sys_user.del_flag = '0' and (sys_user.type = '0' or sys_user.type = '1')
<if test="query.username != null and query.username != ''">
<bind name="usernameLike" value="'%' + query.username + '%'" />
and sys_user.username LIKE #{usernameLike}
......
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