叫号取消接口
This commit is contained in:
parent
32de1b80b7
commit
2ce1d30f06
|
|
@ -77,5 +77,16 @@ public class UCallTableController {
|
|||
return CzgResult.success(callTableService.subMsg(subMsgDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订阅
|
||||
* @param queueId 队列id
|
||||
* @param shopId 店铺id
|
||||
* @return 是否成功
|
||||
*/
|
||||
@DeleteMapping("/cancel")
|
||||
public CzgResult<Boolean> cancel(@RequestParam Long queueId, @RequestParam Long shopId) {
|
||||
return CzgResult.success(callTableService.cancel(shopId, queueId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,4 +40,6 @@ public interface CallTableService extends IService<CallTable> {
|
|||
boolean subMsg(CallSubMsgDTO subMsgDTO);
|
||||
|
||||
Object getStatus(Long shopId, String openId, Long queueId);
|
||||
|
||||
Boolean cancel(Long shopId, Long queueId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -613,4 +613,13 @@ public class CallTableServiceImpl extends ServiceImpl<CallTableMapper, CallTable
|
|||
data.put("queueInfo", callQueueInfoVOS.isEmpty() ? null : callQueueInfoVOS.getFirst());
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean cancel(Long shopId, Long queueId) {
|
||||
return callQueueService.updateChain()
|
||||
.eq(CallQueue::getShopId, shopId)
|
||||
.eq(CallQueue::getId, queueId)
|
||||
.set(CallQueue::getCallTime, DateUtil.date())
|
||||
.set(CallQueue::getState, -1).update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue