| | |
| | | |
| | | @Override |
| | | public void switchingTechnician(TechnicianSubscribe technicianSubscribe) { |
| | | TechnicianSubscribe subscribe = this.getById(technicianSubscribe.getId()); |
| | | if(subscribe.getTechnicianId().equals(technicianSubscribe.getTechnicianId())){ |
| | | throw new RuntimeException("不能切换相同的技师"); |
| | | List<TechnicianSubscribe> list = this.list(new LambdaQueryWrapper<TechnicianSubscribe>().eq(TechnicianSubscribe::getOrderId, technicianSubscribe.getOrderId()) |
| | | .eq(TechnicianSubscribe::getDelFlag, 0).eq(TechnicianSubscribe::getStatus, 0)); |
| | | for (TechnicianSubscribe subscribe : list) { |
| | | if(subscribe.getTechnicianId().equals(technicianSubscribe.getTechnicianId())){ |
| | | throw new RuntimeException("不能切换相同的技师"); |
| | | } |
| | | subscribe.setTechnicianId(technicianSubscribe.getTechnicianId()); |
| | | this.updateById(subscribe); |
| | | } |
| | | subscribe.setTechnicianId(technicianSubscribe.getTechnicianId()); |
| | | this.updateById(subscribe); |
| | | |
| | | } |
| | | |
| | | /** |