UserDao.java 1003 B

12345678910111213141516171819202122
  1. package se.cloud.analysis.dao;
  2. import org.apache.ibatis.annotations.*;
  3. import org.springframework.stereotype.Repository;
  4. import se.cloud.analysis.domain.User;
  5. @Repository
  6. @Mapper
  7. public interface UserDao {
  8. @Select("select * from user where email = #{email}")
  9. public User getUserByEmail(@Param("email") String email);
  10. @Insert("insert into user(id, name, email, phone, password, salt, sex, birthday ,education, school, is_work, company, awards)values(#{id},#{name},#{email},#{phone},#{password},#{salt},#{sex},#{birthday},#{education},#{school},#{isWork},#{company},#{awards})")
  11. public int insertUser(User user);
  12. @Update("update user set name = #{name}, phone = #{phone}, sex = #{sex}, birthday = #{birthday}, education = #{education}, school = #{school}, is_work = #{isWork}, company = #{company}, awards = #{awards} where email = #{email}")
  13. public int updateUser(User user);
  14. @Delete("delete from user where email = #{email}")
  15. public int deleteUser(String email);
  16. }