充值
This commit is contained in:
parent
9de0155d7e
commit
97738f5b5e
@ -104,6 +104,12 @@ public class UserProfileAndCountryQueryExe {
|
||||
|
||||
PayCountry compatiblePayCountry = payCountryAliasResolver
|
||||
.resolvePayCountryByCountryId(countryCode.getId());
|
||||
boolean freightUser = existsFreightBalance(userProfile.getId());
|
||||
webSiteUseProfile
|
||||
.setFreightUser(freightUser)
|
||||
// Yumi H5 先确认用户身份,再用这里返回的商品类型查询后台商品,避免币商误买普通金币商品后入普通金币账户.
|
||||
.setCommodityType(freightUser ? PayApplicationCommodityType.FREIGHT_GOLD.name()
|
||||
: PayApplicationCommodityType.GOLD.name());
|
||||
|
||||
// LIKEI/Yumi 的支付国家开放由 H5 JSON 控制;这里仅返回用户真实国家,商品接口再按国家码查该国商品.
|
||||
PayCountryCO payCountryCO = new PayCountryCO()
|
||||
@ -119,6 +125,12 @@ public class UserProfileAndCountryQueryExe {
|
||||
.setRegionId(regionId);
|
||||
}
|
||||
|
||||
private boolean existsFreightBalance(Long userId) {
|
||||
return Boolean.TRUE.equals(ResponseAssert.requiredSuccess(
|
||||
freightGoldClient.existsBalance(userId)
|
||||
));
|
||||
}
|
||||
|
||||
private SysCountryCodeDTO getUserCountryCode(UserProfileDTO userProfile) {
|
||||
if (Objects.nonNull(userProfile.getCountryId())) {
|
||||
return ResponseAssert.requiredSuccess(
|
||||
|
||||
@ -44,12 +44,22 @@ public class WebSiteUseProfileCO extends ClientObject {
|
||||
*/
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
public static WebSiteUseProfileCO toWebSiteUseProfileCO(UserProfileDTO userProfile) {
|
||||
/**
|
||||
* 归属平台.
|
||||
*/
|
||||
private String sysOrigin;
|
||||
|
||||
/**
|
||||
* 是否存在货运金币账户;Yumi H5 用这个身份决定展示普通金币还是货运金币商品.
|
||||
*/
|
||||
private Boolean freightUser;
|
||||
|
||||
/**
|
||||
* 本次 H5 充值应该请求的商品类型,普通用户是 GOLD,货运/币商用户是 FREIGHT_GOLD.
|
||||
*/
|
||||
private String commodityType;
|
||||
|
||||
public static WebSiteUseProfileCO toWebSiteUseProfileCO(UserProfileDTO userProfile) {
|
||||
if (userProfile == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user