|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.cloud.kicc.auth.provider; |
|
|
|
package com.cloud.kicc.auth.provider; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.data.entity.KiccUser; |
|
|
|
import com.cloud.kicc.common.data.entity.KiccUser; |
|
|
|
import com.cloud.kicc.common.data.entity.SsoUser; |
|
|
|
import com.cloud.kicc.common.data.entity.SsoUser; |
|
|
@ -23,7 +24,7 @@ public class UserProviderTemplateImpl implements UserProviderTemplate<KiccUser> |
|
|
|
public SsoUser selectByUserName(String userName) { |
|
|
|
public SsoUser selectByUserName(String userName) { |
|
|
|
R<SsoUser> result = remoteSsoUserService.selectByUserName(userName); |
|
|
|
R<SsoUser> result = remoteSsoUserService.selectByUserName(userName); |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
throw new SecurityCheckedException("Controller invoke failed!"); |
|
|
|
throw new SecurityCheckedException(ObjectUtil.defaultIfBlank(result.getMsg(), "Controller invoke failed!")); |
|
|
|
} |
|
|
|
} |
|
|
|
return result.getData(); |
|
|
|
return result.getData(); |
|
|
|
} |
|
|
|
} |
|
|
@ -32,7 +33,7 @@ public class UserProviderTemplateImpl implements UserProviderTemplate<KiccUser> |
|
|
|
public SsoUser selectByPhone(String phone) { |
|
|
|
public SsoUser selectByPhone(String phone) { |
|
|
|
R<SsoUser> result = remoteAppService.selectByPhone(phone); |
|
|
|
R<SsoUser> result = remoteAppService.selectByPhone(phone); |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
throw new SecurityCheckedException("Controller invoke failed!"); |
|
|
|
throw new SecurityCheckedException(ObjectUtil.defaultIfBlank(result.getMsg(), "Controller invoke failed!")); |
|
|
|
} |
|
|
|
} |
|
|
|
return result.getData(); |
|
|
|
return result.getData(); |
|
|
|
} |
|
|
|
} |
|
|
@ -42,7 +43,7 @@ public class UserProviderTemplateImpl implements UserProviderTemplate<KiccUser> |
|
|
|
public KiccUser selectByUserId(String userid) { |
|
|
|
public KiccUser selectByUserId(String userid) { |
|
|
|
R<KiccUser> result = remoteUserService.selectByUserId(userid); |
|
|
|
R<KiccUser> result = remoteUserService.selectByUserId(userid); |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
if (result.getCode() != R.SUCCESS) { |
|
|
|
throw new SecurityCheckedException("Controller invoke failed!"); |
|
|
|
throw new SecurityCheckedException(ObjectUtil.defaultIfBlank(result.getMsg(), "Controller invoke failed!")); |
|
|
|
} |
|
|
|
} |
|
|
|
return result.getData(); |
|
|
|
return result.getData(); |
|
|
|
} |
|
|
|
} |
|
|
|