新人求助,关于mybatis逆向工程生成的mapper.xml文件中的selectByPrimaryKey方法。
关于mybatis逆向工程生成的mapper.xml文件中的selectByPrimaryKey方法,
这是我的serviceImp 实现类。
public UserCustom findUserById(Integer id) throws Exception {
User user=userMapper.selectByPrimaryKey(id);
UserCustom userCustom=new UserCustom();
BeanUtils.copyProperties(user, userCustom);
return userCustom;
}
取静态值 id=1;但传进user的value为0,且username和password为null