package se.cloud.analysis.dao; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; import se.cloud.analysis.domain.User; @Repository @Mapper public interface UserDao { @Select("select * from user where email = #{email}") public User getUserByEmail(@Param("email") String email); @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})") public int insertUser(User user); @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}") public int updateUser(User user); @Delete("delete from user where email = #{email}") public int deleteUser(String email); }