提交 afc29cf3 authored 作者: 胡宁宁's avatar 胡宁宁

增加司机保证金冻结支付接口 增加测试方法

上级 a103b8ca
......@@ -57,10 +57,11 @@ public class TempController {
@ApiOperation(value = "测试支付划账 (临时接口)", notes = "<br>By:胡宁宁")
@RequestMapping(value = "/paymentTest", method = RequestMethod.GET)
public Result<Void> paymentTest(@RequestParam("fromUser") @NotBlank(message = "扣款方") String fromUser,
@RequestParam("toUser") @NotBlank(message = "收款方") String toUser,
@RequestParam("figure") @NotBlank(message = "金额") String figure) {
@RequestParam("pwd") @NotBlank(message = "收款方") String pwd,
@RequestParam("tradeNo") @NotBlank(message = "金额") String tradeNo,
@RequestParam("type") @NotBlank(message = "类型") int type) {
tempService.paymentTest(fromUser,toUser,figure);
tempService.paymentTest(fromUser,pwd,tradeNo,type);
return Result.ok();
}
......
......@@ -6,6 +6,6 @@ public interface TempService {
void updateBreakContractDriverSettlementFinish(String settlementNo);
void paymentTest(String fromUser,String toUser,String figure);
void paymentTest(String fromUser,String toUser,String figure,int type);
}
......@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Objects;
import java.util.UUID;
@Slf4j
......@@ -42,7 +43,7 @@ public class TempServiceImpl implements TempService {
}
@Override
public void paymentTest(String fromUser, String toUser, String figure) {
public void paymentTest(String fromUser, String pwd, String tradeNo,int type) {
// PayParam noCheckPwd = PayParam.builder().from(
// Integer.valueOf(fromUser))
// .to(Integer.valueOf(toUser))
......@@ -57,10 +58,23 @@ public class TempServiceImpl implements TempService {
// paymentService.paymentWallet(noCheckPwd);
PayPlatformFeeParam payPlatformFeeParam = new PayPlatformFeeParam();
payPlatformFeeParam.setFigure(Integer.valueOf(figure));
payPlatformFeeParam.setFigure(678);
payPlatformFeeParam.setFrom(Integer.valueOf(fromUser));
payPlatformFeeParam.setPwd(toUser);
payPlatformFeeParam.setTradeNo(UUID.randomUUID().toString().replaceAll("-", ""));
payPlatformFeeParam.setPwd(pwd);
payPlatformFeeParam.setTradeNo(tradeNo);
if(Objects.equals(type,1)){
paymentService.paymentPlatformFee(payPlatformFeeParam);
}
if(Objects.equals(type,2)){
paymentService.paymentChangePlatformFee(payPlatformFeeParam);
}
if(Objects.equals(type,3)){
paymentService.paymentCompletePlatformFee(payPlatformFeeParam);
}
if(Objects.equals(type,4)){
paymentService.paymentCancelPlatformFee(payPlatformFeeParam);
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论