| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | 
							- package com.iamberry.app.mapper;
 
- import com.iamberry.app.core.entity.User;
 
- /**
 
-  *
 
-  * @author Moon Cheng
 
-  * @date 2016年1月16日 下午12:25:05
 
-  */
 
- public interface UserMapper {
 
- 	// ================================================================================================
 
- 	// ------------------------------------------User----------------------------------------------
 
- 	// ================================================================================================
 
- 	/**
 
- 	 * 根据id查询user所有信息
 
- 	 *
 
- 	 * @param id
 
- 	 * @return User Information
 
- 	 */
 
- 	public User selectUserById(Long id);
 
- 	/**
 
- 	 * 根据username查询user所有信息
 
- 	 *
 
- 	 * @param username
 
- 	 * @return User Information
 
- 	 */
 
- 	public User selectUserByUsername(String username);
 
- 	/**
 
- 	 * 通过ext_open_id查询user所有信息
 
- 	 *
 
- 	 * @param extOpenId
 
- 	 * @return User Information
 
- 	 */
 
- 	public User selectUserByExtOpenId(String extOpenId);
 
- 	/**
 
- 	 * 添加用户信息到user表中
 
- 	 *
 
- 	 * @param user
 
- 	 */
 
- 	public void insertUser(User user);
 
- 	/**
 
- 	 * 根据id修改user表数据
 
- 	 *
 
- 	 * @param user
 
- 	 */
 
- 	public void updateUser(User user);
 
- 	/**
 
- 	 * 根据id修改user表的个人头像
 
- 	 *
 
- 	 * @author Moon Cheng
 
- 	 * @param image
 
- 	 * @param id
 
- 	 */
 
- 	public int updateDisplayPicture(String imageUrl, Long id);
 
- 	/**
 
- 	 * 根据用户名和密码查询用户表信息
 
- 	 *
 
- 	 * @param username
 
- 	 * @param password
 
- 	 * @return User Information
 
- 	 */
 
- 	public User validateUser(String username, String password);
 
- 	/**
 
- 	 * 通过id修改用户表密码
 
- 	 *
 
- 	 * @param id
 
- 	 * @param newPassword
 
- 	 * @return update row count
 
- 	 */
 
- 	public int changePassword(Long id, String newPassword);
 
- 	// ================================================================================================
 
- 	// ------------------------------------------UserToken----------------------------------------------
 
- 	// ================================================================================================
 
- 	/**
 
- 	 * 通过token查询user表所有信息
 
- 	 *
 
- 	 * @param userId
 
- 	 * @return
 
- 	 */
 
- 	public User selectUserByToken(String token);
 
- 	/**
 
- 	 * 根据id修改token值
 
- 	 *
 
- 	 * @param token
 
- 	 * @param userId
 
- 	 * @return int
 
- 	 */
 
- 	public int updateUserToken(String token, Long userId);
 
- 	/**
 
- 	 * 根据id修改user表的用户名
 
- 	 *
 
- 	 * @author Moon Cheng
 
- 	 * @param username
 
- 	 * @param userId
 
- 	 * @return
 
- 	 */
 
- 	public int updateUserName(String username, Long userId);
 
- 	
 
- 	
 
- 	/**
 
- 	 * 根据id修改user表的用户名和国家代码
 
- 	 *
 
- 	 * @author Moon Cheng
 
- 	 * @param username
 
- 	 * @param userId
 
- 	 * @param countryCode
 
- 	 * @return
 
- 	 */
 
- 	public int updateUserNameAndCountry(String username,String countryCode,  Long userId);
 
- 	
 
- 	/**
 
- 	 * 通过key_查询sys_config表数据
 
- 	 *
 
- 	 * @param key
 
- 	 * @return String
 
- 	 */
 
- 	public String selectConfig(String key);
 
- 	// ================================================================================================
 
- 	// ------------------------------------------UserAvator----------------------------------------------
 
- 	// ================================================================================================
 
- 	/**
 
- 	 * USER_AVATOR表中添加数据
 
- 	 *
 
- 	 * @param id
 
- 	 * @param avator
 
- 	 *            void
 
- 	 */
 
- 	public void insertUserAvator(Long id, String avator);
 
- 	/**
 
- 	 * 通过user_id修改USER_AVATOR表数据
 
- 	 *
 
- 	 * @param id
 
- 	 * @param avator
 
- 	 * @return int
 
- 	 */
 
- 	public int updateUserAvator(Long id, String avator);
 
- 	/**
 
- 	 * 根据user_id查询USER_AVATOR表数据
 
- 	 *
 
- 	 * @param id
 
- 	 * @return String
 
- 	 */
 
- 	public String selectUserAvator(Long id);
 
- }
 
 
  |