|
@@ -66,7 +66,6 @@ import com.lantone.security.enums.ReturnTypeEnum;
|
|
|
import com.lantone.security.client.AuthService;
|
|
|
import com.lantone.security.client.MessageService;
|
|
|
import eu.bitwalker.useragentutils.UserAgent;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -87,7 +86,6 @@ import java.util.stream.Collectors;
|
|
|
* @time: 2021/7/20 12:39
|
|
|
*/
|
|
|
@Component
|
|
|
-@Slf4j
|
|
|
public class UserManagementFacade {
|
|
|
|
|
|
@Autowired
|
|
@@ -152,23 +150,13 @@ public class UserManagementFacade {
|
|
|
sendToTopicDTO.setType("login");
|
|
|
sendToTopicDTO.setTopic(userId);
|
|
|
sendToTopics.add(sendToTopicDTO);
|
|
|
- try {
|
|
|
- messageService.sendToTopic(sendToTopics);
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- log.error(e.getMessage());
|
|
|
- }
|
|
|
+ messageService.sendToTopic(sendToTopics);
|
|
|
}
|
|
|
JwtStore jwtStore = new JwtStore();
|
|
|
jwtStore.setAccessToken(map.get(AuthConstant.ASSESS_TOKEN).toString());
|
|
|
jwtStore.setRefreshToken(map.get(AuthConstant.REFRESH_TOKEN).toString());
|
|
|
jwtStore.setIp(HttpUtils.getIpAddress());
|
|
|
- try {
|
|
|
- sysTokenService.createToken(jwtStore);
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- log.error(e.getMessage());
|
|
|
- }
|
|
|
+ sysTokenService.createToken(jwtStore);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -870,12 +858,7 @@ public class UserManagementFacade {
|
|
|
// 获取客户端浏览器
|
|
|
String browser = userAgent.getBrowser().getName();
|
|
|
loginLog.setLoginBrowser(browser);
|
|
|
- try {
|
|
|
- messageService.loginLogHandle(loginLog);
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
- log.error(e.getMessage());
|
|
|
- }
|
|
|
+ messageService.loginLogHandle(loginLog);
|
|
|
}
|
|
|
}
|
|
|
}
|