| | |
| | | import com.mzl.flower.dto.request.payment.UserPaymentDTO; |
| | | import com.mzl.flower.entity.flower.Flower; |
| | | import com.mzl.flower.entity.payment.*; |
| | | import com.mzl.flower.entity.system.UserWechat; |
| | | import com.mzl.flower.mapper.flower.FlowerMapper; |
| | | import com.mzl.flower.mapper.payment.*; |
| | | import com.mzl.flower.mapper.system.UserWechatMapper; |
| | |
| | | import java.io.InputStreamReader; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.ZonedDateTime; |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX"); |
| | | |
| | | // 使用formatter格式化ZonedDateTime |
| | | String formattedDateTime = zonedDateTime.plusMinutes(5).format(formatter); |
| | | String formattedDateTime = zonedDateTime.plusMinutes(15).format(formatter); |
| | | |
| | | return formattedDateTime; // 格式化日期 |
| | | } |
| | |
| | | order.setPaymentAmount(order.getTotalAmount()); |
| | | } |
| | | order.setPaymentTime(up.getPaymentTimeCallback()); |
| | | if(null!=order.getPaymentTime()){ |
| | | LocalDateTime paymentTime = order.getPaymentTime(); |
| | | LocalDate paymentDate = paymentTime.toLocalDate(); |
| | | LocalDateTime today1700 = paymentTime.with(LocalTime.of(17, 0)); |
| | | // 比较时间是否大于当天的 17:00 |
| | | if (paymentTime.isAfter(today1700)) { |
| | | // 如果大于 17:00,设置为下一天的日期 |
| | | paymentDate = paymentDate.plusDays(1); |
| | | } |
| | | order.setPaymentDateSta(paymentDate); |
| | | } |
| | | |
| | | order.setStatus(Constants.ORDER_STATUS.SEND.name()); |
| | | } else if (Constants.ORDER_STATUS_BACKEND.CANCEL.name().equals(orderStatus)){ |
| | | order.setStatus(Constants.ORDER_STATUS.CANCEL.name()); |