台桌预订改造
This commit is contained in:
parent
099f5f58a5
commit
41faaf4808
|
|
@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
|
@ -172,6 +173,7 @@ public class TbShopTableBookingServiceImpl extends ServiceImpl<TbShopTableBookin
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void markStatus(Long id, Integer status) {
|
||||
if (id == null) {
|
||||
throw new BadRequestException("id不能为空");
|
||||
|
|
@ -191,6 +193,10 @@ public class TbShopTableBookingServiceImpl extends ServiceImpl<TbShopTableBookin
|
|||
entity.setArrivedTime(null);
|
||||
}
|
||||
super.updateById(entity);
|
||||
mpShopTableMapper.update(Wrappers.<TbShopTable>lambdaUpdate()
|
||||
.set(TbShopTable::getStatus, "idle")
|
||||
.eq(TbShopTable::getStatus, "subscribe")
|
||||
.eq(TbShopTable::getId, entity.getShopTableId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue