From 15cf6ccc6ed529b550c375ab68fdb7582464e942 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Thu, 13 Jun 2024 14:12:15 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=94=AF=E4=BB=98=E5=AE=9D=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/PileMerchantInfoService.java | 4 +++- .../impl/PileMerchantInfoServiceImpl.java | 23 ++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) 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));