Compare commits
1 Commits
cursor/che
...
add-appkey
Author | SHA1 | Date | |
---|---|---|---|
![]() |
830c501def |
@@ -18,10 +18,10 @@ public class PayOrderCreateReqDTO implements Serializable {
|
|||||||
public static final int SUBJECT_MAX_LENGTH = 32;
|
public static final int SUBJECT_MAX_LENGTH = 32;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用编号
|
* 应用密钥
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "应用编号不能为空")
|
@NotEmpty(message = "应用密钥不能为空")
|
||||||
private Long appId;
|
private String appKey;
|
||||||
/**
|
/**
|
||||||
* 用户 IP
|
* 用户 IP
|
||||||
*/
|
*/
|
||||||
|
@@ -43,4 +43,9 @@ public class PayOrderRespDTO {
|
|||||||
|
|
||||||
// ========== 渠道相关字段 ==========
|
// ========== 渠道相关字段 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用密钥
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -59,4 +59,9 @@ public class PayAppDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String transferNotifyUrl;
|
private String transferNotifyUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用密钥
|
||||||
|
*/
|
||||||
|
private String appKey;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
4
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java
Executable file → Normal file
4
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java
Executable file → Normal file
@@ -111,11 +111,11 @@ public class PayOrderServiceImpl implements PayOrderService {
|
|||||||
@Override
|
@Override
|
||||||
public Long createOrder(PayOrderCreateReqDTO reqDTO) {
|
public Long createOrder(PayOrderCreateReqDTO reqDTO) {
|
||||||
// 校验 App
|
// 校验 App
|
||||||
PayAppDO app = appService.validPayApp(reqDTO.getAppId());
|
PayAppDO app = appService.validPayApp(reqDTO.getAppKey());
|
||||||
|
|
||||||
// 查询对应的支付交易单是否已经存在。如果是,则直接返回
|
// 查询对应的支付交易单是否已经存在。如果是,则直接返回
|
||||||
PayOrderDO order = orderMapper.selectByAppIdAndMerchantOrderId(
|
PayOrderDO order = orderMapper.selectByAppIdAndMerchantOrderId(
|
||||||
reqDTO.getAppId(), reqDTO.getMerchantOrderId());
|
app.getId(), reqDTO.getMerchantOrderId());
|
||||||
if (order != null) {
|
if (order != null) {
|
||||||
log.warn("[createOrder][appId({}) merchantOrderId({}) 已经存在对应的支付单({})]", order.getAppId(),
|
log.warn("[createOrder][appId({}) merchantOrderId({}) 已经存在对应的支付单({})]", order.getAppId(),
|
||||||
order.getMerchantOrderId(), toJsonString(order)); // 理论来说,不会出现这个情况
|
order.getMerchantOrderId(), toJsonString(order)); // 理论来说,不会出现这个情况
|
||||||
|
Reference in New Issue
Block a user