Compare commits
No commits in common. "c7d0f6e70725cab3af2b9b92207d9b44a7aebd28" and "68dd037dcc601457d7dc6ef777e4571f9169b623" have entirely different histories.
c7d0f6e707
...
68dd037dcc
@ -111,6 +111,6 @@ public class RepairOrderInfoController {
|
|||||||
@GetMapping("/toPay")
|
@GetMapping("/toPay")
|
||||||
@Operation(summary = "PC支付按钮")
|
@Operation(summary = "PC支付按钮")
|
||||||
public CommonResult<?> toPay(@RequestParam("id")String id) throws IOException, NoSuchAlgorithmException, SignatureException, InvalidKeyException {
|
public CommonResult<?> toPay(@RequestParam("id")String id) throws IOException, NoSuchAlgorithmException, SignatureException, InvalidKeyException {
|
||||||
return success(repairOrderInfoService.payTransactionsCode(id));
|
return success(repairOrderInfoService.payTransactions(id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -743,21 +743,21 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
params.put("bankAddress", bankAddress);
|
params.put("bankAddress", bankAddress);
|
||||||
params.put("account", account);
|
params.put("account", account);
|
||||||
|
|
||||||
// 调支付接口
|
// 调支付接口 todo 这个地方应该还要加东西
|
||||||
String payUrl = "";
|
String payUrl = "";
|
||||||
try {
|
try {
|
||||||
Map<String, Object> stringObjectMap = repairOrderInfoService.payTransactionsCode(orderInfo.getId());
|
Map<String, Object> stringObjectMap = repairOrderInfoService.payTransactions(orderInfo.getId());
|
||||||
payUrl = (String) stringObjectMap.get("code_url");
|
payUrl = (String) stringObjectMap.get("prepay_id");
|
||||||
// 这个地方可能报错,报错就不生成二维码了,保证工单是能出来的
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
throw exception0(500, "系统异常");
|
||||||
|
}
|
||||||
// 生成收款二维码
|
// 生成收款二维码
|
||||||
int width = 100, height = 100;
|
int width = 100, height = 100;
|
||||||
byte[] texts = CreateQRCodeUtil.GenerateQRCode(payUrl, width, height);
|
byte[] texts = CreateQRCodeUtil.GenerateQRCode(payUrl, width, height);
|
||||||
if (ObjectUtil.isNotEmpty(texts)){
|
if (ObjectUtil.isNotEmpty(texts)){
|
||||||
params.put("qrCode", new PictureRenderData(width, height, PictureType.PNG, texts));
|
params.put("qrCode", new PictureRenderData(width, height, PictureType.PNG, texts));
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
Configure config = configureBuilder.build();
|
Configure config = configureBuilder.build();
|
||||||
try {
|
try {
|
||||||
@ -1357,16 +1357,6 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
|||||||
BigDecimal confirmFaultMoney = ObjectUtil.isNotEmpty(oldTicket.getConfirmFaultMoney()) ? oldTicket.getConfirmFaultMoney() : new BigDecimal("0");
|
BigDecimal confirmFaultMoney = ObjectUtil.isNotEmpty(oldTicket.getConfirmFaultMoney()) ? oldTicket.getConfirmFaultMoney() : new BigDecimal("0");
|
||||||
|
|
||||||
tickets.setTotalPrice(tickets.getTotalPrice().add(managerMoney).add(rescueMoney).add(threePackMoney).add(confirmFaultMoney));
|
tickets.setTotalPrice(tickets.getTotalPrice().add(managerMoney).add(rescueMoney).add(threePackMoney).add(confirmFaultMoney));
|
||||||
|
|
||||||
// 因为订单是在工单创建的时候就新增了,后面加的配件之类的金额没有同步到订单,这里同步一下
|
|
||||||
RepairOrderInfo orderInfo = repairOrderInfoService.getOne(new LambdaQueryWrapper<RepairOrderInfo>().eq(RepairOrderInfo::getGoodsId, ticketId));
|
|
||||||
RepairOrderInfo newOrderInfo = new RepairOrderInfo();
|
|
||||||
newOrderInfo.setId(orderInfo.getId());
|
|
||||||
// 更新商品原价和实付金额
|
|
||||||
newOrderInfo.setGoodsPrice(tickets.getTotalPrice());
|
|
||||||
newOrderInfo.setPayMoney(tickets.getTotalPrice());
|
|
||||||
repairOrderInfoService.updateById(newOrderInfo);
|
|
||||||
|
|
||||||
return baseMapper.updateById(tickets) > 0;
|
return baseMapper.updateById(tickets) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user