|
@@ -7,6 +7,7 @@ import boot.common.utils.IpUtil;
|
|
|
import boot.common.utils.RedisUtils;
|
|
|
import boot.common.utils.StringUtils;
|
|
|
import boot.modules.manage.pojo.Manage;
|
|
|
+import boot.modules.manage.service.ManageService;
|
|
|
import boot.modules.user.param.RegParam;
|
|
|
import boot.modules.user.pojo.User;
|
|
|
import boot.modules.user.service.UserService;
|
|
@@ -32,6 +33,7 @@ import java.util.List;
|
|
|
public class AuthService {
|
|
|
|
|
|
private final UserService userService;
|
|
|
+ private final ManageService manageService;
|
|
|
private final RedisUtils redisUtils;
|
|
|
private static Integer expiredTimeIn;
|
|
|
|
|
@@ -61,6 +63,25 @@ public class AuthService {
|
|
|
userService.save(user);
|
|
|
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 注册
|
|
|
+ * @param param RegDTO
|
|
|
+ */
|
|
|
+ public void registerManage(RegParam param){
|
|
|
+
|
|
|
+ String account = param.getAccount();
|
|
|
+ String ip = IpUtil.getRequestIp();
|
|
|
+ Manage user = Manage.builder()
|
|
|
+ .username(account)
|
|
|
+ .nickName(param.getNickname())
|
|
|
+ .password(SecureUtil.md5(param.getPassword()))
|
|
|
+ .phone(account)
|
|
|
+ .avatarId(null)
|
|
|
+ .build();
|
|
|
+
|
|
|
+ manageService.save(user);
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/**
|