|
|
@ -40,6 +40,9 @@ public class RemoteAuthServiceImpl implements IRemoteAuthService { |
|
|
*/ |
|
|
*/ |
|
|
@Value("${opai.app-key}") |
|
|
@Value("${opai.app-key}") |
|
|
private String appKey; |
|
|
private String appKey; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${opai.app-id}") |
|
|
|
|
|
private Long appId; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Res<String> remoteLogin(String username, String password) { |
|
|
public Res<String> remoteLogin(String username, String password) { |
|
|
@ -63,6 +66,7 @@ public class RemoteAuthServiceImpl implements IRemoteAuthService { |
|
|
public Res<String> remoteRegister(SysUser user) { |
|
|
public Res<String> remoteRegister(SysUser user) { |
|
|
String url = authUrl + "/auth/register"; |
|
|
String url = authUrl + "/auth/register"; |
|
|
try { |
|
|
try { |
|
|
|
|
|
user.setAppId(appId); |
|
|
return restTemplate.postForObject(url, user, Res.class); |
|
|
return restTemplate.postForObject(url, user, Res.class); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error("远程注册调用失败: {}", e.getMessage()); |
|
|
log.error("远程注册调用失败: {}", e.getMessage()); |
|
|
|