Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user