ios内购-验单-加判参数非空

(cherry picked from commit 40a49976f5)
This commit is contained in:
2025-08-27 13:57:14 +08:00
parent ddd4c67ff1
commit 0c0ecc9cb0
2 changed files with 11 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ public class IOSStoreKitV2Service {
clientIp, null, null, deviceInfo, roomUid, null, null, null);
}
public String verifyOrder(String uid, String chargeRecordId, String transcationId, String clientIp, DeviceInfo deviceInfo) {
public String verifyOrder(String chargeRecordId, String transcationId, String clientIp, DeviceInfo deviceInfo) {
boolean locked = false;
String lockKey = RedisKey.lock_iospay_verify.getKey(transcationId);
RLock lock = redissonClient.getLock(lockKey);
@@ -67,7 +67,7 @@ public class IOSStoreKitV2Service {
if (!locked){
throw new ServiceException(BusiStatus.SERVERBUSY);
}
log.info("[verifyOrder] 参数 {} {} {} {} {}", uid, chargeRecordId, transcationId, clientIp, deviceInfo.getDeviceId());
log.info("[verifyOrder] 参数 {} {} {} {} {}", chargeRecordId, transcationId, clientIp, deviceInfo.getDeviceId());
ChargeRecord chargeRecord = chargeRecordService.getChargeRecordById(chargeRecordId);
if (null == chargeRecord
@@ -76,7 +76,7 @@ public class IOSStoreKitV2Service {
throw new ServiceException(BusiStatus.TRANSFER_COMPLETED);
}
ChargeRecord pingxxChargeRecord = chargeRecordService.getChargeRecordByPingxxChargeId(chargeRecord.getPingxxChargeId());
ChargeRecord pingxxChargeRecord = chargeRecordService.getChargeRecordByPingxxChargeId(transcationId);
if (null != pingxxChargeRecord && !Constant.ChargeRecordStatus.create.equals(pingxxChargeRecord.getChargeStatus())){
throw new ServiceException(BusiStatus.TRANSFER_COMPLETED);
}

View File

@@ -38,14 +38,17 @@ public class IOSStorekitV2Controller extends BaseController {
@Authorization
@RequestMapping("/verifyOrder")
public BusiResult<String> verifyOrder(String uid, String chargeRecordId, String transcationId,
public BusiResult<String> verifyOrder(String chargeRecordId, String transcationId,
HttpServletRequest request) {
String clientIp = IPUtils.getRealIpAddress(request);
DeviceInfo deviceInfo = getDeviceInfo(request);
if (!StringUtils.hasText(uid) || !StringUtils.hasText(deviceInfo.getDeviceId())) {
if (!StringUtils.hasText(chargeRecordId) || !StringUtils.hasText(transcationId)) {
return new BusiResult<>(BusiStatus.PARAMETERILLEGAL);
}
String tId = iosPayPlaService.verifyOrder(uid, chargeRecordId, transcationId, clientIp, deviceInfo);
String clientIp = IPUtils.getRealIpAddress(request);
DeviceInfo deviceInfo = getDeviceInfo(request);
if (!StringUtils.hasText(deviceInfo.getDeviceId())) {
return new BusiResult<>(BusiStatus.PARAMETERILLEGAL);
}
String tId = iosPayPlaService.verifyOrder(chargeRecordId, transcationId, clientIp, deviceInfo);
return new BusiResult<>(tId);
}