自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(49)
  • 收藏
  • 关注

原创 微人事——员工管理后端

1、Dao层public interface EmployeeRepository extends JpaRepository<Employee,Integer> { boolean existsById(Integer id); Employee findByName(String name); Employee findAllById(Integer id); //寻找最大值 @Query("SELECT max(i.workid) FROM Emplo

2021-01-25 22:47:52 172

原创 微人事——分页设置

1、Service层Pageable是JPA的分页类PageRequest.of(page,size,Sort.Direction.DESC,“key”)方法page即当前页。size代表每页有几条记录第三个参数是排序字段,Sort.Direction.DESC是倒序的意思。最后一个参数是排序关键字,将按照这个关键字进行排序。@Servicepublic class EmployeeServiceImpl implements EmployeeService { @Autow

2021-01-23 23:17:53 140

原创 微人事——操作员管理

1、Dao层public interface HrRepository extends JpaRepository<Hr,Integer> { public Hr findByUsername(String username); public List<Role> findAllRolesById(Integer id); public Hr findByName(String name); boolean existsById(Integer id

2021-01-22 23:24:18 142

原创 微人事——权限设置

2、Dao层public interface RoleRepository extends JpaRepository<Role,Integer> { public List<Role> findAllById(Integer id); boolean existsById(Integer id); //删除Role表数据 @Modifying @Transactional @Query("delete from Role where id

2021-01-21 17:59:42 163

原创 微人事——职称管理

对Joblevel类进行CRUD,和系统管理完全一样1、实体类Joblevel数据库2、Dao层public interface PositionRepository extends JpaRepository<Position,Integer> { boolean existsById(Integer id); @Modifying //一般在删除或者修改的时候用 用来标明是一个删除或者修改的标识 @Transactional @Query("d

2021-01-19 17:57:42 228

原创 微人事——系统管理的基础信息设置

对Position类进行基本的CURD功能1、实体类position数据库2、PositionRepository(Dao层)public interface PositionRepository extends JpaRepository<Position,Integer> { //利用Id查找是否存在 boolean existsById(Integer id);}3、PositionService类public interface PositionService

2021-01-18 22:47:38 174

原创 微人事——Spring Security权限管理(二)

权限管理(二)权限功能1、数据库因为是权限管理所以需要根据用户的role来查找所对应的权限menu简单来说分为两步: 第一步,用户先从前端发起一个http请求,拿到http请求地址之后,我先去分析地址和数据库中的menu表中的哪一个url是相匹配的。就先看一下用户的请求地址跟这里边的哪一个是吻合的。第一步的核心目的是根据用户的请求地址分析出来它所需要的角色,就是当前的请求需要哪些角色才能访问第二步是去判断当前用户是否具备它需要的角色2、UrlFilterInvocationSecurit

2021-01-18 18:17:47 288

原创 微人事——Spring Security权限管理(一)

权限管理(一)我用的是Spring Security权限管理,分为“认证”以及“验证”。“认证”就是登陆,“验证”就是根据权限授予一定的操作,也就是权限。Spring Security大致的过程就是这样这个图片不是我做的,是另一个博主做的我觉得很不错。原地址: https://blog.csdn.net/zhaoxichen_10/article/details/88713799.(一)数据库设计权限管理系统涉及到了三个数据库。hr数据库是存储账户信息menu是权限管理数据库r

2021-01-18 17:24:42 282

原创 微人事——基本配置

微人事这仅仅只是微人事的后端,因为我不会做前段,所以只做了后端接口。我的微人事采用的是Springboot框架+JPA,用postman进行测试。很多人都是用mybaties,但我更喜欢用JPA。项目原链接: https://github.com/lenve/VBlog.基本配置yml配置spring: datasource: url: jdbc:mysql://localhost:3306/vhr?useUnicode=true&characterEncoding=UT

2021-01-18 14:44:04 197

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除