serIds(String email);
}
Keep the dao method the same...
public long getUserId(String email) {
but just do a quick check in there on the size
of the List returned, and do what you want with
it (throw you own exception if over size 1?)
and then just always return list.get(0)
On Wed, Aug 26, 20
In my MySQL db, I have a table 'users' with (amongst others) these fields:
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(120) NOT NULL,
In UserMapper.java I have the following method
public interface UserMapper {
public long getUserId(String email);
}
In UserMapper.xml