@Mapper public interface UserMapper { //登录查询 @Select("select * from user where username=#{username} and password=#{password}") public User getUser(User user); //用户列表查询 @Select("select * from user") public List<User> getAllUsers(User user); //删除用户信息,根据UID @Delete("delete from user where uid=#{uid}") public void deleteByUid(int uid); //根据用户UID查询用户信息 @Select("select * from user where uid=#{uid}") public User getUserByuid(int uid); //修改用户信息 @Update("update user set username=‘${username}‘,password=‘${password}‘," +" gender=‘${gender}‘,money=‘${money}‘,pledge=‘${pledge}‘,description=‘${description}‘," + "age=#{age},phone=‘${phone}‘ where uid=#{uid}") public void updateUserByUid(User user); //删除多个用户信息 @Delete("delete from user where uid=#{uid}") public void deleteAllUserByUid(int uid); //添加用户 @Insert("insert into user(username,password,gender,money,pledge,description,age,phone) value" + "(#{username},#{password},#{password},#{money},#{pledge},#{description},#{age},#{phone})") public void insertUser(User user);