驿站付款
This commit is contained in:
parent
ea0141db6d
commit
abf7640c09
|
|
@ -17,11 +17,8 @@ public class RequestHeaderDTO {
|
||||||
if (MapUtil.isEmpty(requestHeader)) {
|
if (MapUtil.isEmpty(requestHeader)) {
|
||||||
return headerDTO;
|
return headerDTO;
|
||||||
} else {
|
} else {
|
||||||
headerDTO.setOpenid(HeaderFetchUtil.getOpenid(requestHeader));
|
|
||||||
headerDTO.setSourceType(HeaderFetchUtil.getSourceType(requestHeader));
|
|
||||||
headerDTO.setMachineNum(HeaderFetchUtil.getMachineNum(requestHeader));
|
headerDTO.setMachineNum(HeaderFetchUtil.getMachineNum(requestHeader));
|
||||||
headerDTO.setMachineSn(HeaderFetchUtil.getMachineSn(requestHeader));
|
headerDTO.setMachineSn(HeaderFetchUtil.getMachineSn(requestHeader));
|
||||||
headerDTO.setCustId(HeaderFetchUtil.getCustId(requestHeader));
|
|
||||||
return headerDTO;
|
return headerDTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -335,13 +335,13 @@ public class OrderPlaceMobileBusinessImplV3 implements OrderPlaceMobileBusiness
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UnifyPayVO stageOrderPay(RequestHeaderDTO headerDTO, StagePayMobileDTO stagePayDTO) {
|
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(),
|
UnifyPayDTO unifyPayDTO = this.createPay(stagePayDTO.getPayType(),
|
||||||
stagePayDTO.getCouponId(),
|
stagePayDTO.getCouponId(),
|
||||||
headerDTO.getSourceType(),
|
stagePayDTO.getSourceType(),
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
headerDTO.getOpenid(),
|
stagePayDTO.getOpenid(),
|
||||||
custInfo,
|
custInfo,
|
||||||
stagePayDTO);
|
stagePayDTO);
|
||||||
unifyPayDTO.setAmount(stagePayDTO.getAmount());
|
unifyPayDTO.setAmount(stagePayDTO.getAmount());
|
||||||
|
|
|
||||||
|
|
@ -143,10 +143,6 @@ public class OrderPlaceMobileController {
|
||||||
)
|
)
|
||||||
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
|
public AjaxResult stageOrderPay(@RequestHeader Map<String, String> headers,
|
||||||
@RequestBody StagePayMobileDTO stagePayDTO) {
|
@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) {
|
if(stagePayDTO.getAmount() == null) {
|
||||||
return AjaxResult.error("金额不能为空");
|
return AjaxResult.error("金额不能为空");
|
||||||
}
|
}
|
||||||
|
|
@ -157,7 +153,6 @@ public class OrderPlaceMobileController {
|
||||||
try{
|
try{
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
RequestHeaderDTO headerDTO = RequestHeaderDTO.of(headers);
|
RequestHeaderDTO headerDTO = RequestHeaderDTO.of(headers);
|
||||||
stagePayDTO.setCustId(headerDTO.getCustId());
|
|
||||||
stagePayDTO.setPayType(PayTypeEnum.MEAL_CARD.getKey());
|
stagePayDTO.setPayType(PayTypeEnum.MEAL_CARD.getKey());
|
||||||
mobileVO = this.orderPlaceMobileBusiness.stageOrderPay(headerDTO, stagePayDTO);
|
mobileVO = this.orderPlaceMobileBusiness.stageOrderPay(headerDTO, stagePayDTO);
|
||||||
LogUtil.info("[驿站支付]支付耗时", System.currentTimeMillis() - startTime, mobileVO);
|
LogUtil.info("[驿站支付]支付耗时", System.currentTimeMillis() - startTime, mobileVO);
|
||||||
|
|
@ -167,7 +162,7 @@ public class OrderPlaceMobileController {
|
||||||
}
|
}
|
||||||
return AjaxResult.success(mobileVO);
|
return AjaxResult.success(mobileVO);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// @PostMapping({"/mixPay/by/orderId"})
|
// @PostMapping({"/mixPay/by/orderId"})
|
||||||
// @ApiOperation(
|
// @ApiOperation(
|
||||||
// value = "根据交易id混合支付",
|
// value = "根据交易id混合支付",
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,9 @@ public class StagePayMobileDTO extends OrderPayMobileDTO{
|
||||||
@ApiModelProperty("支付金额")
|
@ApiModelProperty("支付金额")
|
||||||
private @NotNull(message = "支付金额不能为空") @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
|
private @NotNull(message = "支付金额不能为空") @Min(value = 0L, message = "金额不能小于0") BigDecimal amount;
|
||||||
|
|
||||||
|
@ApiModelProperty("openid")
|
||||||
|
private String openid;
|
||||||
|
|
||||||
|
@ApiModelProperty("sourceType")
|
||||||
|
private Integer sourceType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue