1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package com.example.springboot.mapper;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.example.springboot.entity.Auth.Account;
- import com.example.springboot.entity.Auth.User;
- import com.example.springboot.entity.User.AccountUser;
- import org.apache.ibatis.annotations.Insert;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Select;
- import org.apache.ibatis.annotations.Update;
- @Mapper
- //@Repository
- public interface UserMapper extends BaseMapper<User> {
- @Select("select * from authorize where username = #{text} or email = #{text}")
- AccountUser findAccountUserByNameOrEmail(String text);
- @Select("select * from authorize where username = #{text} or email = #{text}")
- Account findAccountByNameOrEmail(String text);
- @Insert("insert into authorize(username, email, password) value (#{username}, #{email}, #{password})")
- int createAccount(String username, String password, String email);
- @Update("update authorize set password = #{password} where email = #{email}")
- int resetPassword(String password, String email);
- /*@Select("select * from user")
- List<User> queryUserList();
- @Insert("insert into user(name,pwd,sex,stature,mail,phone) values (#{name},#{pwd},#{sex},#{stature},#{mail},#{phone})")
- int insert(User user);
- int update(User user);
- @Delete("delete from user where id = #{id}")
- int deleteById(Integer id);
- @Select("select * from user where name like concat('%',#{name},'%') and phone like concat('%',#{phone},'%') limit #{pageNum},#{pageSize}")
- List<User> selectPage(Integer pageNum,Integer pageSize,String name,String phone);
- @Select("select count(*) from user where name like concat('%',#{name},'%') and phone like concat('%',#{phone},'%')")
- Integer selectTotal(String name,String phone);*/
- }
|