This commit is contained in:
Vinjor 2024-10-18 20:05:04 +08:00
parent 6f8f2b7a3a
commit 7c0085496b

View File

@ -487,10 +487,10 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
public void updateTake(String id){ public void updateTake(String id){
// 改变时看看是否已经被接了 // 改变时看看是否已经被接了
int update = baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>() int update = baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
.set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.RECEIVED) .set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.RECEIVED.getCode())
.and(item -> { .and(item -> {
item.eq(DlRepairTickets::getId, id) item.eq(DlRepairTickets::getId, id)
.eq(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING); .eq(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING.getCode());
})); }));
if (update != 1){ if (update != 1){
throw exception0(500, "工单已被其他人接单了"); throw exception0(500, "工单已被其他人接单了");