|
@@ -1,40 +0,0 @@
|
|
|
-package com.gis.cms.controller;
|
|
|
-
|
|
|
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
-import com.gis.cms.entity.po.RoomEntity;
|
|
|
-import com.gis.cms.service.RoomService;
|
|
|
-import com.gis.common.util.Result;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-import java.time.LocalDateTime;
|
|
|
-
|
|
|
-/**
|
|
|
- * Created by owen on 2022/2/23 0023 11:30
|
|
|
- */
|
|
|
-@Slf4j
|
|
|
-@Api(tags = "test-测试相关")
|
|
|
-@RestController
|
|
|
-@RequestMapping("test")
|
|
|
-public class TestController {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- RoomService roomService;
|
|
|
-
|
|
|
- @GetMapping("updateWrapper/{status}")
|
|
|
- public Result updateWrapper(@PathVariable Integer status){
|
|
|
- LambdaUpdateWrapper<RoomEntity> ew = new LambdaUpdateWrapper<>();
|
|
|
- ew.set(RoomEntity::getStatus, 0)
|
|
|
- .eq(RoomEntity::getStatus,status)
|
|
|
- .le(RoomEntity::getEndTime, LocalDateTime.now()); // le: 小于等于<= 当前时间
|
|
|
-
|
|
|
- roomService.update(ew);
|
|
|
-
|
|
|
- return Result.success();
|
|
|
- }
|
|
|
-}
|