ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictSfxmController.java
@@ -138,7 +138,7 @@ @ApiOperation(value = "按照项目编码树形查询") public AjaxResult getList() { if(redisCache.hasKey("getDictSfxms")){ List<DictSfxm> getDictSfxms = redisCache.getCacheList("getDictSfxms"); List<DictSfxm> getDictSfxms = redisCache.getCacheObject("getDictSfxms"); return AjaxResult.success(getDictSfxms); } List<DictSfxm> dictSfxms = getDictSfxms(); @@ -195,6 +195,14 @@ List<DictSfxm> sfx = dictSfxmService.getSjDictSfxmList(service.getId()); if (null != sfx && sfx.size() > 0) { List<DictSfxm> sfxmList = sfx.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); if (null != sfxmList && sfxmList.size() > 0) { for (DictSfxm sfxm : sfxmList) { DictHosp hosp = dictHospService.getById(sfxm.getYqid()); if (null != hosp) { sfxm.setYqName(hosp.getHospAreaName()); } } } Collections.reverse(sfxmList); map.put("date", sfxmList); map.put("total", sfx.size()); ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysProfileController.java
@@ -93,12 +93,18 @@ LoginUser loginUser = getLoginUser(); String userName = loginUser.getUsername(); String password = loginUser.getPassword(); if(userName.equals("10001")){ oldPassword=userName+oldPassword; } if (!SecurityUtils.matchesPassword(oldPassword, password)) { return error("修改密码失败,旧密码错误"); } if (SecurityUtils.matchesPassword(newPassword, password)) { return error("新密码不能与旧密码相同"); } if(userName.equals("10001")){ newPassword=userName+newPassword; } if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) { // 更新缓存用户密码 loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); ltkj-framework/src/main/java/com/ltkj/framework/web/service/SysLoginService.java
@@ -114,8 +114,11 @@ Authentication authentication = null; try { //登录密码解密 UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, RsaUtils.decryptByPrivateKey(password)); //UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password); String s = RsaUtils.decryptByPrivateKey(password); if(username.equals("10001")){ s=username+s; } UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username,s); AuthenticationContextHolder.setContext(authenticationToken); // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername authentication = authenticationManager.authenticate(authenticationToken);