| | |
| | | import org.jsoup.nodes.Document; |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.select.Elements; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | |
| | | |
| | | @Service |
| | | public class OrderPrivateCarServiceImpl extends ServiceImpl<OrderPrivateCarMapper, OrderPrivateCar> implements IOrderPrivateCarService { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(OrderPrivateCarServiceImpl.class); |
| | | |
| | | @Resource |
| | | private OrderPrivateCarMapper orderPrivateCarMapper; |
| | |
| | | if((orderPrivateCar.getState() == 10 || orderPrivateCar.getState() == 12) && null != orderPrivateCar.getDriverId()){ |
| | | fleetEngineUtil.updateTrip("CANCELED", null, null, orderPrivateCar.getTripId(), null, null, null, null); |
| | | } |
| | | |
| | | log.warn("取消订单:{} {}", System.currentTimeMillis(), orderPrivateCar.getTrackId()); |
| | | //添加消息 |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消出行订单,谢谢使用!" : language == 2 ? "You've cancelled the ride order successfully, thank you for using I-GO " : "Vous avez annulé la commande de course avec succès, merci d’utiliser I-GO", orderPrivateCar.getUserId(), 1); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | userRedPacketRecord.setEndTime(new Date()); |
| | | userRedPacketRecord.setState(2); |
| | | multiply1 = multiply1.subtract(remainingAmount).setScale(2, RoundingMode.HALF_EVEN); |
| | | jsonObject.put("money", remainingAmount); |
| | | jsonObject.put("money", remainingAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | jsonArray.add(jsonObject); |
| | | }else if(remainingAmount.compareTo(multiply1) > 0){ |
| | | userRedPacketRecord.setRemainingAmount(remainingAmount.subtract(multiply1).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | jsonObject.put("money", multiply1); |
| | | jsonObject.put("money", multiply1.setScale(2, RoundingMode.HALF_EVEN)); |
| | | jsonArray.add(jsonObject); |
| | | multiply1 = BigDecimal.ZERO; |
| | | } |