|
@@ -125,4 +125,16 @@ public class UserLogicImpl extends BaseLogic implements UserLogic {
|
|
|
List<User> users = userService.findByFuzzyEmail(userDTO.getEmail());
|
|
|
return userWrapper.wrap(users);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<UserDTO> getUserByFuzzyNameOrEmail(UserDTO userDTO) {
|
|
|
+ String keyword = null;
|
|
|
+ if(userDTO.getName() != null) {
|
|
|
+ keyword = userDTO.getName();
|
|
|
+ } else if (userDTO.getEmail() != null) {
|
|
|
+ keyword = userDTO.getEmail();
|
|
|
+ }
|
|
|
+ List<User> userList = userService.findByFuzzyNameOrEmail(keyword);
|
|
|
+ return userWrapper.wrap(userList);
|
|
|
+ }
|
|
|
}
|