diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/PayController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/PayController.java index f66ed7e36..8199794a3 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/PayController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/PayController.java @@ -255,6 +255,9 @@ public class PayController extends BaseController { throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR); } dto.setMemberId(memberId); + // 设置appId + dto.setAppId(request.getHeader("appId")); + // 获取openId String openId = memberService.getOpenIdByCode(dto.getCode()); if (StringUtils.isBlank(openId)) { throw new BusinessException(ReturnCodeEnum.CODE_GET_OPEN_ID_BY_CODE_ERROR); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileMerchantInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileMerchantInfoService.java index 127cd7b20..b2ce707cc 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileMerchantInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileMerchantInfoService.java @@ -65,9 +65,9 @@ public interface IPileMerchantInfoService { public int deletePileMerchantInfoById(Long id); /** - * 获取一级运营商merchantId - * @param appId - * @return + * 通过微信小程序appId查询一级运营商merchantId + * @param appId 微信小程序appId + * @return 一级运营商merchantId */ String getFirstLevelMerchantIdByAppId(String appId); 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 12723e93f..e7e198182 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 @@ -26,7 +26,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Objects; -import java.util.stream.Collectors; /** * 充电桩运营商信息Service业务层处理 @@ -258,6 +257,11 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService { } + /** + * 通过微信小程序appId查询一级运营商merchantId + * @param appId 微信小程序appId + * @return 一级运营商merchantId + */ @Override public String getFirstLevelMerchantIdByAppId(String appId) { if (StringUtils.isBlank(appId)) {