Authored by qinchao

fix alipay id

... ... @@ -206,7 +206,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
throw new UfoServiceException(400,"商户存在出售中商品,不允许退驻!");
}
String aliPayAccount = getAlipayAccount(uid);
String aliPayAccount = getAlipayIDOrAccount(uid);
if(StringUtils.isBlank(aliPayAccount)){
logger.error("quitStoredSeller not allowed cause of aliPayAccount is blank ,uid {}" ,uid);
throw new UfoServiceException(400,"支付宝账号未绑定,不允许退驻!");
... ... @@ -272,12 +272,18 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@SuppressWarnings("unchecked")
private String getAlipayAccount(int targetUid) {
private String getAlipayIDOrAccount(int targetUid) {
ApiResponse<AuthorizeResultRespVO> resp = ufoServiceCaller.call("ufo.user.aliPayAccountQuery", ApiResponse.class, targetUid);
if (resp != null) {
AuthorizeResultRespVO data = (AuthorizeResultRespVO) resp.getData();
if (data != null && data.getAlipayAccount() != null) {
return data.getAlipayAccount();
if (data != null ) {
if(StringUtils.isNotBlank(data.getAlipayId()) ){
return data.getAlipayId();
}else if(StringUtils.isNotBlank(data.getAlipayAccount())){
return data.getAlipayAccount();
}else{
return null;
}
}
}
return null;
... ...