| | |
| | | import com.xinquan.order.service.OrderPaymentRecordService; |
| | | import com.xinquan.order.service.OrderService; |
| | | import com.xinquan.common.core.utils.JuHeFuUtil; |
| | | import com.xinquan.order.utils.MD5Generator; |
| | | import com.xinquan.order.utils.OrderUtil; |
| | | import com.xinquan.system.api.domain.AppUser; |
| | | import com.xinquan.system.api.domain.AppUserWalletRecord; |
| | |
| | | @Override |
| | | public String placeOrderApple(Long targetId, Integer orderFrom, |
| | | Long receiverId, Integer balanceFlag, |
| | | BigDecimal amount, Integer vipType, String transactionIdentifier) { |
| | | BigDecimal amount, Integer vipType, String transactionIdentifier |
| | | ,String originTransactionIdentifier,String receipt) { |
| | | // String s = MD5Generator.generateMD5(receipt); |
| | | |
| | | // 获取当前登录用户id |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | // 获取用户信息 |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | } |
| | | |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | } |
| | | } |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | } |
| | | } else { |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | } |
| | | } |
| | |
| | | order.setBuyContent(vipType1); |
| | | this.save(order); |
| | | Long orderId = order.getId(); |
| | | |
| | | order.setPayType(3); |
| | | this.updateById(order); |
| | | // 创建支付订单 |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | }else { |
| | | // 充值 |
| | |
| | | order.setAppUserId(userId); |
| | | order.setTotalAmount(amount); |
| | | order.setRealPayAmount(amount); |
| | | |
| | | order.setBuyContent("充值"); |
| | | this.save(order); |
| | | Long orderId = order.getId(); |
| | |
| | | paymentRecord.setOrderId(orderId); |
| | | paymentRecord.setPaymentType(PaymentTypeEnum.IOS_PAY.getCode()); |
| | | paymentRecord.setPaymentStatus(PaymentStatusEnum.TO_BE_PAID.getCode()); |
| | | // paymentRecord.setReceipt(s); |
| | | orderPaymentRecordService.save(paymentRecord); |
| | | } |
| | | return order.getId()+""; |