| | |
| | | private final OutParkLogService outParkLogService; |
| | | private final StringRedisTemplate redisTemplate; |
| | | |
| | | private final PaymentLogService paymentLogService; |
| | | |
| | | |
| | | /** |
| | | * 查询订单接口 |
| | |
| | | return R.failed("参数为空"); |
| | | } |
| | | OutPark byId = outParkService.getById(queryId); |
| | | PaymentLog byId1 = paymentLogService.getById(queryId); |
| | | if(byId1 !=null && byId !=null){ |
| | | if(byId.getCreateTime().isAfter(byId1.getCreateTime())){ |
| | | //出场表时间在月票后 |
| | | if(byId.getTime() > 0){ |
| | | byId.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(byId.getTime()).longValue())); |
| | | } |
| | | return R.ok(byId,"请求成功"); |
| | | }else { |
| | | //出场表时间在月票后 |
| | | OutPark outPark = new OutPark(); |
| | | outPark.setId(byId1.getId()); |
| | | outPark.setCreateTime(LocalDateTime.now()); |
| | | outPark.setEnterTime(LocalDateTime.now()); |
| | | outPark.setTime(0.0); |
| | | outPark.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(outPark.getTime()).longValue())); |
| | | outPark.setPrice(byId1.getMoney()); |
| | | return R.ok(outPark,"请求成功"); |
| | | } |
| | | } |
| | | if(byId == null){ |
| | | OutPark outPark = new OutPark(); |
| | | outPark.setId(byId1.getId()); |
| | | outPark.setCreateTime(LocalDateTime.now()); |
| | | outPark.setEnterTime(LocalDateTime.now()); |
| | | outPark.setTime(0.0); |
| | | outPark.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(outPark.getTime()).longValue())); |
| | | outPark.setPrice(byId1.getMoney()); |
| | | return R.ok(outPark,"请求成功"); |
| | | } |
| | | if(byId1 == null){ |
| | | if(byId.getTime() > 0){ |
| | | byId.setTimeStr(DateUtilOther.millisToDayHrMinSec(new Double(byId.getTime()).longValue())); |
| | | } |
| | | return R.ok(byId,"请求成功"); |
| | | } |
| | | return R.failed("未查询到数据"); |
| | | } |
| | | |
| | | /** |