update 支付宝小程序

This commit is contained in:
Guoqs
2024-06-17 14:11:59 +08:00
parent 27c199617e
commit 20d7f06e8f
5 changed files with 77 additions and 19 deletions

View File

@@ -90,6 +90,11 @@ public class PileMerchantInfo extends BaseEntity {
*/
private String appId;
/**
* 运营商的支付宝小程序id
*/
private String alipayAppId;
/**
* 部门id
*/

View File

@@ -37,7 +37,7 @@ public interface PileMerchantInfoMapper {
* @param appId
* @return
*/
List<PileMerchantInfo> selectPileMerchantInfoByAppId(String appId);
List<PileMerchantInfo> selectPileMerchantInfoByWxAppId(String appId);
/**
* 查询充电桩运营商信息列表
@@ -102,17 +102,24 @@ public interface PileMerchantInfoMapper {
/**
* 根据appid查询对应一级运营商id
* @param appId
* @param wxAppId
* @return
*/
PileMerchantInfo getFirstLevelMerchantByAppId(String appId);
PileMerchantInfo getFirstLevelMerchantByWxAppId(String wxAppId);
/**
* 根据支付宝appid查询对应一级运营商id
* @param alipayAppId
* @return
*/
PileMerchantInfo getFirstLevelMerchantByAlipayAppId(String alipayAppId);
/**
* 通过appid查询运营商部门id
* @param appId
* @return
*/
List<String> getDeptIdsByAppId(@Param("appId") String appId);
List<String> getDeptIdsByWxAppId(@Param("appId") String appId);
/**
* 后管财务中心页面运营商列表

View File

@@ -70,9 +70,21 @@ public interface PileMerchantInfoService {
*/
public int deletePileMerchantInfoById(Long id);
PileMerchantInfo getFirstLevelMerchantByAppId(String appId);
/**
* 根据微信appId查询一级运营商信息
* @param wxAppId 微信appId
* @return
*/
PileMerchantInfo getFirstLevelMerchantByWxAppId(String wxAppId);
/**
/**
* 根据支付宝appId查询一级运营商信息
* @param alipayAppId 微信appId
* @return
*/
PileMerchantInfo getFirstLevelMerchantByAlipayAppId(String alipayAppId);
/**
* 通过微信小程序appId查询一级运营商merchantId
* @param wechatAppId 微信小程序appId
* @return 一级运营商merchantId

View File

@@ -293,15 +293,28 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
/**
* 通过微信小程序appId查询一级运营商merchant对象
* @param appId 微信小程序appId
* @param wxAppId 微信小程序appId
* @return 一级运营商merchant对象
*/
@Override
public PileMerchantInfo getFirstLevelMerchantByAppId(String appId) {
if (StringUtils.isBlank(appId)) {
public PileMerchantInfo getFirstLevelMerchantByWxAppId(String wxAppId) {
if (StringUtils.isBlank(wxAppId)) {
return null;
}
return pileMerchantInfoMapper.getFirstLevelMerchantByAppId(appId);
return pileMerchantInfoMapper.getFirstLevelMerchantByWxAppId(wxAppId);
}
/**
* 通过支付宝小程序appId查询一级运营商merchant对象
* @param alipayAppId 支付宝小程序appId
* @return 一级运营商merchant对象
*/
@Override
public PileMerchantInfo getFirstLevelMerchantByAlipayAppId(String alipayAppId) {
if (StringUtils.isBlank(alipayAppId)) {
return null;
}
return pileMerchantInfoMapper.getFirstLevelMerchantByAlipayAppId(alipayAppId);
}
/**
@@ -312,7 +325,7 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
@Override
public String getFirstLevelMerchantIdByWxAppId(String wechatAppId) {
String merchantId = null;
PileMerchantInfo merchant = getFirstLevelMerchantByAppId(wechatAppId);
PileMerchantInfo merchant = getFirstLevelMerchantByWxAppId(wechatAppId);
if (Objects.nonNull(merchant)) {
merchantId = String.valueOf(merchant.getId());
}
@@ -327,7 +340,7 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
@Override
public String getFirstLevelMerchantIdByAliAppId(String alipayAppId) {
String merchantId = null;
PileMerchantInfo merchant = getFirstLevelMerchantByAppId(alipayAppId);
PileMerchantInfo merchant = getFirstLevelMerchantByAlipayAppId(alipayAppId);
if (Objects.nonNull(merchant)) {
merchantId = String.valueOf(merchant.getId());
}
@@ -467,7 +480,7 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
*/
@Override
public List<String> getDeptIdsByAppId(String appId) {
return pileMerchantInfoMapper.getDeptIdsByAppId(appId);
return pileMerchantInfoMapper.getDeptIdsByWxAppId(appId);
}
/**
@@ -494,7 +507,7 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
*/
@Override
public String getDelayModeByWechatAppId(String wechatAppId) {
PileMerchantInfo merchant = getFirstLevelMerchantByAppId(wechatAppId);
PileMerchantInfo merchant = getFirstLevelMerchantByWxAppId(wechatAppId);
if (merchant == null) {
throw new BusinessException(ReturnCodeEnum.CODE_GET_FIRST_LEVEL_MERCHANT_BY_APP_ID);
}