| | |
| | | return weixinpay; |
| | | } |
| | | |
| | | |
| | | private String smid = "2088330203191220";//平台支付宝商户号 |
| | | /** |
| | | * 课程支付宝支付 |
| | | * |
| | |
| | | public ResultUtil aliPaymentSite(Double paymentPrice, SiteBooking siteBooking) throws Exception { |
| | | String code = siteBooking.getOrderNo(); |
| | | Integer id = siteBooking.getId(); |
| | | ResultUtil alipay = payMoneyUtil.alipay("预约场地", "预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback"); |
| | | // 判断预约的门店 属于哪个运营商 |
| | | Integer storeId = siteBooking.getStoreId(); |
| | | Store byId = storeService.getById(storeId); |
| | | Integer operatorId = byId.getOperatorId(); |
| | | String smid1 = ""; |
| | | if (operatorId == null ){ |
| | | // 平台的门店 |
| | | smid1 = smid; |
| | | }else{ |
| | | smid1 = siteService.getSMIDByOperatorId(operatorId); |
| | | } |
| | | ResultUtil alipay = payMoneyUtil.alipay(smid1,"预约场地", "预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback"); |
| | | System.out.println("预约场地----" + alipay.getCode()); |
| | | if (alipay.getCode() == 200) { |
| | | new Thread(new Runnable() { |
| | |
| | | siteBooking.setPayOrderNo(tradeNo); |
| | | siteBookingService.updateById(siteBooking); |
| | | System.err.println("======完成支付"); |
| | | // 判断预约的门店 属于哪个运营商 |
| | | Integer storeId = siteBooking.getStoreId(); |
| | | Store byId = storeService.getById(storeId); |
| | | Integer operatorId = byId.getOperatorId(); |
| | | String smid1 = ""; |
| | | if (operatorId == null ){ |
| | | // 平台的门店 |
| | | smid1 = smid; |
| | | }else{ |
| | | smid1 = siteService.getSMIDByOperatorId(operatorId); |
| | | } |
| | | payMoneyUtil.confirm(smid1,code,tradeNo,paymentPrice.toString()); |
| | | break; |
| | | } |
| | | if ("WAIT_BUYER_PAY".equals(s)) { |
| | |
| | | return siteMapper.changeState(siteIds, type); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public String getSMIDByOperatorId(Integer id) { |
| | | return siteMapper.getSMIDByOperatorId(id); |
| | | } |
| | | } |