user_info表不能获取到user_passworrd表的id值
user_info表不能获取到user_passworrd表的id值
user_info表不能获取到user_passworrd表的id值
2019-02-18
我的代码也是写成了:
private UserPasswordDO convertPasswordFromModel(UserModel userModel){
if (userModel == null) {
return null;
}
UserPasswordDO userPasswordDO = new UserPasswordDO();
userPasswordDO.setEncrptPassword(userModel.getEncrptPassword());
userPasswordDO.setUserId(userModel.getId());
return userPasswordDO;
}
具体应该是改写成什么样的?多谢你。
//UserPasswordModel转成dataobject private UserPasswordDO convertPasswordFromModel(UserModel userModel){ if (userModel == null){ return null; } UserPasswordDO userPasswordDO = new UserPasswordDO(); userPasswordDO.setEncrptPassword(userModel.getEncrptPassword()); return userPasswordDO; }
检查下这一句,setUserId给密码模型 我原来也是无法将两者id关联,最后发现是把那句代码写成了
userPasswordDO.setId(userModel.getId());
举报