| | |
| | | return new Response().set(1,false,"原密码不正确"); |
| | | } |
| | | } |
| | | |
| | | //校验密码 |
| | | public Response checkSnId(String uname, String checksnId) { |
| | | //查询当前用户的密码 |
| | | String snIdRsa = mapper.selectSnId(uname); |
| | | String snId = RSAUtil.decrypt(snIdRsa, RSAUtil.getPrivateKey()); |
| | | String[] oldchecksnId = RSAUtil.decryptFrontP(checksnId, RSAUtil.fontSeparator); |
| | | String oldId = oldchecksnId[0]; |
| | | if (oldId.equals(snId)) { |
| | | return new Response().set(1, true, "密码正确"); |
| | | } else { |
| | | return new Response().set(1, false, "密码不正确"); |
| | | } |
| | | } |
| | | //重置密码 |
| | | public Response resetSnId(int uid ) { |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |