This commit is contained in:
hy001 2026-06-25 23:37:58 +08:00
parent 9de0155d7e
commit 97738f5b5e
2 changed files with 28 additions and 6 deletions

View File

@ -104,6 +104,12 @@ public class UserProfileAndCountryQueryExe {
PayCountry compatiblePayCountry = payCountryAliasResolver PayCountry compatiblePayCountry = payCountryAliasResolver
.resolvePayCountryByCountryId(countryCode.getId()); .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 控制这里仅返回用户真实国家商品接口再按国家码查该国商品. // LIKEI/Yumi 的支付国家开放由 H5 JSON 控制这里仅返回用户真实国家商品接口再按国家码查该国商品.
PayCountryCO payCountryCO = new PayCountryCO() PayCountryCO payCountryCO = new PayCountryCO()
@ -119,6 +125,12 @@ public class UserProfileAndCountryQueryExe {
.setRegionId(regionId); .setRegionId(regionId);
} }
private boolean existsFreightBalance(Long userId) {
return Boolean.TRUE.equals(ResponseAssert.requiredSuccess(
freightGoldClient.existsBalance(userId)
));
}
private SysCountryCodeDTO getUserCountryCode(UserProfileDTO userProfile) { private SysCountryCodeDTO getUserCountryCode(UserProfileDTO userProfile) {
if (Objects.nonNull(userProfile.getCountryId())) { if (Objects.nonNull(userProfile.getCountryId())) {
return ResponseAssert.requiredSuccess( return ResponseAssert.requiredSuccess(

View File

@ -44,12 +44,22 @@ public class WebSiteUseProfileCO extends ClientObject {
*/ */
private String account; private String account;
/** /**
* 归属平台. * 归属平台.
*/ */
private String sysOrigin; private String sysOrigin;
public static WebSiteUseProfileCO toWebSiteUseProfileCO(UserProfileDTO userProfile) { /**
* 是否存在货运金币账户Yumi H5 用这个身份决定展示普通金币还是货运金币商品.
*/
private Boolean freightUser;
/**
* 本次 H5 充值应该请求的商品类型普通用户是 GOLD货运/币商用户是 FREIGHT_GOLD.
*/
private String commodityType;
public static WebSiteUseProfileCO toWebSiteUseProfileCO(UserProfileDTO userProfile) {
if (userProfile == null) { if (userProfile == null) {
return null; return null;
} }