| | |
| | | |
| | | @Override |
| | | public boolean checkSafeWord(String safeword) { |
| | | SysUser sysUser= getById(SecurityUtils.getSysUser().getUserId()); |
| | | safeword=passwordManager.decryptPassword(safeword); |
| | | if (StrUtil.isEmpty(sysUser.getSafePassword())){ |
| | | throw new YamiShopBindException("资金密码未设置!"); |
| | | } |
| | | if (StrUtil.isEmpty(safeword)){ |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | System.out.printf(safeword+"=="+passwordEncoder+"======"+sysUser.getSafePassword()); |
| | | if (!passwordEncoder.matches(safeword, sysUser.getSafePassword())) { |
| | | throw new YamiShopBindException("资金密码不正确!"); |
| | | } |
| | | return true; |
| | | } |
| | | } |