| | |
| | | orderMapper.updateById(order); |
| | | Integer orderType = order.getOrderType(); |
| | | if (orderType.equals(OrderType.SERVICE.getCode())){ |
| | | R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId()); |
| | | if (shopdetail.getCode() != R.SUCCESS){ |
| | | throw new ServiceException("获取技师信息失败"); |
| | | R<TechnicianSubscribe> subscribeR = technicianClient.getSubscribeByOrderId(order.getId()); |
| | | if (R.isError(subscribeR)){ |
| | | throw new ServiceException("获取预约信息失败"); |
| | | } |
| | | Technician technician = shopdetail.getData(); |
| | | R<Void> r = technicianClient.updateStatus(2, technician.getId()); |
| | | if (r.getCode() != R.SUCCESS){ |
| | | throw new ServiceException("修改技师状态失败"); |
| | | TechnicianSubscribe subscribe = subscribeR.getData(); |
| | | subscribe.setStatus(2); |
| | | R<Void> r = technicianClient.updateStatus(subscribe.getStatus(), subscribe.getId()); |
| | | if (R.isError(r)){ |
| | | throw new ServiceException("更新预约状态失败"); |
| | | } |
| | | } |
| | | |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | Long days = jsonObject.getLong("days"); |
| | | commissionService.addToCommissionDelayQueue(order.getId(), LocalDateTime.now().plusDays(days)); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void commission(Long orderId) { |
| | | |
| | | } |
| | | } |