puzhibing
2023-07-31 c743f4413a00fc063bbbd9d851b6d0c3fff10581
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -134,15 +134,14 @@
        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){
            int s_hour = s.get(Calendar.HOUR_OF_DAY);
            int s_minute = s.get(Calendar.MINUTE);
            String start = s_hour + ":" + s_minute;
            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 = e_hour + ":" + e_minute;
            String end = sdfs.format(s.getTime());
            QuerySiteTimes querySiteTimes = new QuerySiteTimes();
            querySiteTimes.setTime(start + "-" + end);
@@ -193,7 +192,7 @@
        String s_time = split[0];
        String e_time = split[split.length - 1];
        s_time = s_time.substring(s_time.lastIndexOf("-"));
        s_time = s_time.substring(0,s_time.lastIndexOf("-"));
        String[] s1 = e_time.split(" ");
        e_time = s1[0] + " " + s1[1].split("-")[1];
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
@@ -277,7 +276,11 @@
        return ResultUtil.success();
    }
    public static void main(String[] args) {
        String a ="2023-07-28 10:30-15:30";
        String substring = a.substring(0,a.lastIndexOf("-"));
        System.out.println(substring);
    }
    /**
     * 课程微信支付
     * @param paymentPrice