驿站付款

This commit is contained in:
sxu 2025-04-28 13:34:22 +08:00
parent ea0141db6d
commit abf7640c09
4 changed files with 9 additions and 12 deletions

View File

@ -17,11 +17,8 @@ public class RequestHeaderDTO {
if (MapUtil.isEmpty(requestHeader)) {
return headerDTO;
} else {
headerDTO.setOpenid(HeaderFetchUtil.getOpenid(requestHeader));
headerDTO.setSourceType(HeaderFetchUtil.getSourceType(requestHeader));
headerDTO.setMachineNum(HeaderFetchUtil.getMachineNum(requestHeader));
headerDTO.setMachineSn(HeaderFetchUtil.getMachineSn(requestHeader));
headerDTO.setCustId(HeaderFetchUtil.getCustId(requestHeader));
return headerDTO;
}
}

View File

@ -335,13 +335,13 @@ public class OrderPlaceMobileBusinessImplV3 implements OrderPlaceMobileBusiness
@Override
public UnifyPayVO stageOrderPay(RequestHeaderDTO headerDTO, StagePayMobileDTO stagePayDTO) {
CustPayVO custInfo = this.getCustInfo(stagePayDTO.getCustId(), headerDTO.getSourceType());
CustPayVO custInfo = this.getCustInfo(stagePayDTO.getCustId(), stagePayDTO.getSourceType());
UnifyPayDTO unifyPayDTO = this.createPay(stagePayDTO.getPayType(),
stagePayDTO.getCouponId(),
headerDTO.getSourceType(),
stagePayDTO.getSourceType(),
null,
null,
headerDTO.getOpenid(),
stagePayDTO.getOpenid(),
custInfo,
stagePayDTO);
unifyPayDTO.setAmount(stagePayDTO.getAmount());

View File

@ -143,10 +143,6 @@ public class OrderPlaceMobileController {
)
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
@RequestBody StagePayMobileDTO stagePayDTO) {
String sign = HeaderFetchUtil.getSign(headers);
if(StringUtils.isBlank(sign) || !sign.equals(StageWhiteList.STAGE_SIGN_WHITE_LIST)) {
return AjaxResult.error("签名失败");
}
if(stagePayDTO.getAmount() == null) {
return AjaxResult.error("金额不能为空");
}
@ -157,7 +153,6 @@ public class OrderPlaceMobileController {
try{
long startTime = System.currentTimeMillis();
RequestHeaderDTO headerDTO = RequestHeaderDTO.of(headers);
stagePayDTO.setCustId(headerDTO.getCustId());
stagePayDTO.setPayType(PayTypeEnum.MEAL_CARD.getKey());
mobileVO = this.orderPlaceMobileBusiness.stageOrderPay(headerDTO, stagePayDTO);
LogUtil.info("[驿站支付]支付耗时", System.currentTimeMillis() - startTime, mobileVO);
@ -167,7 +162,7 @@ public class OrderPlaceMobileController {
}
return AjaxResult.success(mobileVO);
}
//
// @PostMapping({"/mixPay/by/orderId"})
// @ApiOperation(
// value = "根据交易id混合支付",

View File

@ -16,4 +16,9 @@ public class StagePayMobileDTO extends OrderPayMobileDTO{
@ApiModelProperty("支付金额")
private @NotNull(message = "支付金额不能为空") @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
@ApiModelProperty("openid")
private String openid;
@ApiModelProperty("sourceType")
private Integer sourceType;
}