diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/PileMerchantInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileMerchantInfoService.java index 51f7eac1e..04a6cbf48 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/PileMerchantInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/PileMerchantInfoService.java @@ -75,7 +75,9 @@ public interface PileMerchantInfoService { * @param appId 微信小程序appId * @return 一级运营商merchantId */ - String getFirstLevelMerchantIdByWxAppId(String appId); + String getFirstLevelMerchantIdByWxAppId(String wechatAppId); + + String getFirstLevelMerchantIdByAliAppId(String alipayAppId); MerchantInfoVO getMerchantInfoVO(String merchantId); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java index c208a74b0..887908e56 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileMerchantInfoServiceImpl.java @@ -294,19 +294,36 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService { /** * 通过微信小程序appId查询一级运营商merchantId - * @param appId 微信小程序appId + * @param wechatAppId 微信小程序appId * @return 一级运营商merchantId */ @Override - public String getFirstLevelMerchantIdByWxAppId(String appId) { + public String getFirstLevelMerchantIdByWxAppId(String wechatAppId) { String merchantId = null; - PileMerchantInfo merchant = getFirstLevelMerchantByAppId(appId); + PileMerchantInfo merchant = getFirstLevelMerchantByAppId(wechatAppId); if (Objects.nonNull(merchant)) { merchantId = String.valueOf(merchant.getId()); } return merchantId; } + /** + * 通过支付宝小程序appId查询一级运营商merchantId + * @param alipayAppId 支付宝小程序appId + * @return 一级运营商merchantId + */ + @Override + public String getFirstLevelMerchantIdByAliAppId(String alipayAppId) { + String merchantId = null; + PileMerchantInfo merchant = getFirstLevelMerchantByAppId(alipayAppId); + if (Objects.nonNull(merchant)) { + merchantId = String.valueOf(merchant.getId()); + } + return merchantId; + } + + + @Override public MerchantInfoVO getMerchantInfoVO(String merchantId) { PileMerchantInfo pileMerchantInfo = selectPileMerchantInfoById(Long.parseLong(merchantId));