| 5432 |
amar.kumar |
1 |
package in.shop2020.user.persistence;
|
|
|
2 |
|
|
|
3 |
import java.util.Date;
|
|
|
4 |
import java.util.List;
|
|
|
5 |
|
|
|
6 |
import org.apache.ibatis.annotations.Param;
|
|
|
7 |
|
|
|
8 |
import in.shop2020.model.v1.user.UserType;
|
|
|
9 |
import in.shop2020.user.domain.Cart;
|
|
|
10 |
import in.shop2020.user.domain.User;
|
|
|
11 |
import in.shop2020.user.domain.UserCommunication;
|
|
|
12 |
|
|
|
13 |
public interface UserMapper {
|
|
|
14 |
|
|
|
15 |
User createAnonymousUser(@Param("jsession_id") String jsession_id, @Param("cart") Cart cart);
|
|
|
16 |
|
|
|
17 |
User getUserById(long user_id);
|
|
|
18 |
|
|
|
19 |
User getUserByMobileNumber(String mobile_number);
|
|
|
20 |
|
|
|
21 |
User getUserByEmail(String email);
|
|
|
22 |
|
|
|
23 |
int createUser(User user);
|
|
|
24 |
|
|
|
25 |
int updateUser(User user);
|
|
|
26 |
|
|
|
27 |
boolean deleteUser(long userId);
|
|
|
28 |
|
|
|
29 |
// UserState getUserState(long userId);
|
|
|
30 |
|
|
|
31 |
User authenticateUser(@Param("email") String email, @Param("password") String password);
|
|
|
32 |
|
|
|
33 |
boolean userExists(String email);
|
|
|
34 |
|
|
|
35 |
// UserState getUserStateByUserId(long userId);
|
|
|
36 |
|
|
|
37 |
List<User> getAllUsers(@Param("userType") int userType, @Param("startDate") long startDate, @Param("endDate")long endDate);
|
|
|
38 |
|
|
|
39 |
void setDefaultAddress(@Param("userId") long userId, @Param("addressId") long addressId);
|
|
|
40 |
|
|
|
41 |
void setLastLogin(@Param("userId") long userId, @Param("date") Date date);
|
|
|
42 |
|
|
|
43 |
void setLastLogout(@Param("userId") long userId, @Param("date") Date date);
|
|
|
44 |
|
|
|
45 |
void increaseTrustLevel(@Param("userId") long userId, @Param("trustLevelDelta") double trustLevelDelta);
|
|
|
46 |
|
|
|
47 |
User getUserNameById(int id);
|
|
|
48 |
|
|
|
49 |
void createAnonymousUser(User user);
|
|
|
50 |
|
|
|
51 |
in.shop2020.user.domain.UserCommunication getUserCommunicationById(long id);
|
|
|
52 |
|
|
|
53 |
List<in.shop2020.user.domain.UserCommunication> getUserCommunicationByUser(long userId);
|
|
|
54 |
|
|
|
55 |
List<in.shop2020.user.domain.UserCommunication> getAllUserCommunications();
|
|
|
56 |
|
|
|
57 |
void updatePassword(@Param("userId") long userId, @Param("newPassword") String newPassword);
|
|
|
58 |
|
|
|
59 |
long getUserCount();
|
|
|
60 |
|
|
|
61 |
long getUserCountByType(int userType);
|
|
|
62 |
|
|
|
63 |
User getUserByCartId(long cartId);
|
|
|
64 |
|
|
|
65 |
void insertUserCommunication(
|
|
|
66 |
in.shop2020.user.domain.UserCommunication userCommunication);
|
|
|
67 |
|
|
|
68 |
void removeUserCommunication(long id);
|
|
|
69 |
|
|
|
70 |
double getTrustLevel(long userId);
|
|
|
71 |
|
|
|
72 |
}
|