叫号记录降序
This commit is contained in:
@@ -16,7 +16,7 @@ public interface TbCallQueueMapper extends BaseMapper<TbCallQueue> {
|
|||||||
|
|
||||||
@Select("select a.*, b.note, TIMESTAMPDIFF(SECOND, a.create_time, NOW()) as since_at from tb_call_queue a " +
|
@Select("select a.*, b.note, TIMESTAMPDIFF(SECOND, a.create_time, NOW()) as since_at from tb_call_queue a " +
|
||||||
"left join tb_call_table b on a.call_table_id=b.id " +
|
"left join tb_call_table b on a.call_table_id=b.id " +
|
||||||
"where a.shop_id=#{shopId} and a.state in (3, 2, 1)")
|
"where a.shop_id=#{shopId} and a.state in (3, 2, 1) order by a.create_time desc")
|
||||||
Page<CallRecordVO> selectCallRecord(Integer shopId, Integer callTableId, Page<Object> objectPage);
|
Page<CallRecordVO> selectCallRecord(Integer shopId, Integer callTableId, Page<Object> objectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ public class TbCallServiceImpl implements TbCallService {
|
|||||||
case 3:
|
case 3:
|
||||||
callQueue.setPassTime(DateUtil.date());
|
callQueue.setPassTime(DateUtil.date());
|
||||||
// 已经顺延
|
// 已经顺延
|
||||||
callQueue.setIsPostpone(callQueue.getIsPostpone() == 0 ? 1 : 2);
|
callQueue.setIsPostpone(callQueue.getIsPostpone() == null ? 1 : callQueue.getIsPostpone() == 0 ? 1 : 2);
|
||||||
TbShopInfo shopInfo = shopInfoRepository.findById(callQueue.getShopId()).orElse(null);
|
TbShopInfo shopInfo = shopInfoRepository.findById(callQueue.getShopId()).orElse(null);
|
||||||
if (shopInfo == null) {
|
if (shopInfo == null) {
|
||||||
throw new BadRequestException("店铺信息不存在");
|
throw new BadRequestException("店铺信息不存在");
|
||||||
@@ -428,8 +428,10 @@ public class TbCallServiceImpl implements TbCallService {
|
|||||||
for (TbCallTable item : pageInfo.getRecords()) {
|
for (TbCallTable item : pageInfo.getRecords()) {
|
||||||
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
|
LambdaQueryChainWrapper<TbCallQueue> q = callQueueService.lambdaQuery()
|
||||||
.eq(TbCallQueue::getCallTableId, item.getId())
|
.eq(TbCallQueue::getCallTableId, item.getId())
|
||||||
|
.eq(TbCallQueue::getShopId, shopId)
|
||||||
|
.ne(TbCallQueue::getIsPostpone, 2)
|
||||||
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
||||||
.in(TbCallQueue::getState, 0, 1);
|
.in(TbCallQueue::getState, 0, 1, 3);
|
||||||
Long count = q.count();
|
Long count = q.count();
|
||||||
|
|
||||||
totalCount += count;
|
totalCount += count;
|
||||||
|
|||||||
Reference in New Issue
Block a user