luo
2023-10-09 014d7a35addafbc63689cda7c20bae61951f7852
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -63,6 +63,9 @@
    @Autowired
    private SiteMapper siteMapper;
    @Autowired
    private TBackRecordService backRecordService;
@@ -112,6 +115,11 @@
        querySiteInfoVo.setStorePhone(store.getPhone());
        querySiteInfoVo.setImgs(site.getImgs());
        querySiteInfoVo.setDistance(0D);
        querySiteInfoVo.setCashPriceOne(site.getCashPriceOne());
        if(site.getPlayPaiCoinOne()!=null){
            querySiteInfoVo.setPlayPaiCoinOne(site.getPlayPaiCoinOne().intValue());
        }
        querySiteInfoVo.setIntroduce(site.getIntroduce());
        ArrayList<String> nextName = new ArrayList<>();
        ArrayList<String> halfName = new ArrayList<>();
@@ -156,19 +164,29 @@
        e.setTime(sdf.parse(day + " " + site.getAppointmentEndTime()));
        int hour = e.get(Calendar.HOUR_OF_DAY);
        int minute = e.get(Calendar.MINUTE);
        List<QuerySiteTimes> list = new ArrayList<>();
        SimpleDateFormat sdfs = new SimpleDateFormat("HH:mm");
        while (true){
            String start = sdfs.format(s.getTime());
            s.set(Calendar.MINUTE, s.get(Calendar.MINUTE) + 30);
            int e_hour = s.get(Calendar.HOUR_OF_DAY);
            int e_minute = s.get(Calendar.MINUTE);
            String end = sdfs.format(s.getTime());
            QuerySiteTimes querySiteTimes = new QuerySiteTimes();
            querySiteTimes.setTime(start + "-" + end);
            querySiteTimes.setSelectable(1);
            SiteBooking siteBooking = siteBookingService.getOne(new QueryWrapper<SiteBooking>().eq("siteId", id).eq("state", 1)
@@ -508,6 +526,13 @@
            }
            siteBooking.setCancelUserId(uid);
            siteBookingService.updateById(siteBooking);
            TBackRecord tBackRecord = new TBackRecord();
            tBackRecord.setMoney(siteBooking.getPayMoney());
            tBackRecord.setUserId(siteBooking.getAppUserId());
            tBackRecord.setTime(new Date());
            backRecordService.save(tBackRecord);
        }
        if(siteBooking.getPayType() == 2){//支付宝
            Map<String, String> map = payMoneyUtil.aliRefund(siteBooking.getPayOrderNo(), siteBooking.getPayMoney().toString());
@@ -529,6 +554,13 @@
                userCoupon.setStatus(1);
                userCouponClient.updateUserCoupon(userCoupon);
            }
            TBackRecord tBackRecord = new TBackRecord();
            tBackRecord.setMoney(siteBooking.getPayMoney());
            tBackRecord.setUserId(siteBooking.getAppUserId());
            tBackRecord.setTime(new Date());
            backRecordService.save(tBackRecord);
        }
        if(siteBooking.getPayType() == 3){//玩湃币