Object[] args = joinPoint.getArgs();
if (sysLogEntity.getOperation().equals("修改密码")) { Object args1 = args[0]; log.info("args1---------------------------" + args1); if (args1 != null) { String args2 = new Gson().toJson(args1); JSONObject args3 = (JSONObject) JSONObject.parse(args2); log.info("args2---------------------------" + args3); String password = args3.getString("password"); log.info("password---------------------------" + password); String newPassword = args3.getString("newPassword"); log.info("newPassword---------------------------" + newPassword); String salt = RandomStringUtils.randomAlphanumeric(5); String pwd = new Sha256Hash(password, salt).toHex(); String newPwd = new Sha256Hash(newPassword, salt).toHex(); log.info("pwd---------------------------" + pwd); log.info("newPwd---------------------------" + newPwd); } }
args1---------------------------{t=1576837407561, password=123456, newPassword=123456..} args2---------------------------{"password":"123456","t":1576837407561,"newPassword":"123456.."} password---------------------------123456 newPassword---------------------------123456.. pwd---------------------------66db5d10a4f413c45081926c5f2904 newPwd---------------------------5cdceb7882d0e95ca60c245d37bc35f