| | |
| | | |
| | | // List<SiteBooking> siteBookings = siteClient.listBooks(id); |
| | | List<SiteBooking> siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id).eq("nextName",siteName).like("times",day)); |
| | | |
| | | |
| | | if (siteName==null|| siteName.equals("")){ |
| | | siteBookings = iSiteBookingService.list(new QueryWrapper<SiteBooking>().eq("siteId", id).like("times",day)); |
| | | } |
| | |
| | | siteBookingService.save(siteBooking); |
| | | |
| | | if(reservationSite.getPayType() == 1){//微信支付 |
| | | return weChatPaymentSite(payMoney, siteBooking); |
| | | ResultUtil resultUtil = weChatPaymentSite(payMoney, siteBooking); |
| | | |
| | | return resultUtil; |
| | | } |
| | | if(reservationSite.getPayType() == 2){//支付宝支付 |
| | | return aliPaymentSite(payMoney, siteBooking); |
| | |
| | | public ResultUtil weChatPaymentSite(Double paymentPrice, SiteBooking siteBooking) throws Exception{ |
| | | String code = siteBooking.getOrderNo(); |
| | | Integer id = siteBooking.getId(); |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay("预约场地", "", code, paymentPrice.toString(), "/base/site/weChatPaymentSiteCallback", "APP", ""); |
| | | ResultUtil weixinpay = payMoneyUtil.weixinpay("预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/weChatPaymentSiteCallback", "APP", ""); |
| | | if(weixinpay.getCode() == 200){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | public ResultUtil aliPaymentSite(Double paymentPrice, SiteBooking siteBooking) throws Exception{ |
| | | String code = siteBooking.getOrderNo(); |
| | | Integer id = siteBooking.getId(); |
| | | ResultUtil alipay = payMoneyUtil.alipay("预约场地", "预约场地", "", code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback"); |
| | | ResultUtil alipay = payMoneyUtil.alipay("预约场地", "预约场地", id.toString(), code, paymentPrice.toString(), "/base/site/aliPaymentSiteCallback"); |
| | | if(alipay.getCode() == 200){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | |
| | | siteBooking.setPayTime(new Date()); |
| | | siteBooking.setStatus(1); |
| | | siteBookingService.updateById(siteBooking); |
| | | return ResultUtil.success(); |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("siteBooking",siteBooking.getId().toString()); |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | | |