kongdeqiang
2024-04-22 7bc78d8f70a4d11e46f8bd640228804a3dd0dc68
src/main/java/com/boying/controller/WhiteListController.java
@@ -8,6 +8,8 @@
import com.boying.entity.WhiteList;
import com.boying.service.ParkService;
import com.boying.service.WhiteListService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,12 +19,14 @@
@RestController
@RequestMapping("ffzf/whiteList")
@RequiredArgsConstructor
@Tag(description = "ffzf/whiteList" , name = "白名单接口" )
public class WhiteListController{
    private final WhiteListService whiteListService;
    private final ParkService parkService;
    @PostMapping("/findPage")
    @Operation(summary = "分页查询" , description = "分页查询" )
    public Object findPage(Page page, String carNo) {
        QueryWrapper<WhiteList> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -38,6 +42,7 @@
    }
    @PostMapping("/findPageNew")
    @Operation(summary = "分页查询(新)" , description = "分页查询(新)" )
    public Object findPageNew(Page page, String carNo) {
        QueryWrapper<WhiteList> wrapper = new QueryWrapper<>();
        wrapper.lambda()
@@ -64,12 +69,14 @@
    }
    @PostMapping("/save")
    @Operation(summary = "新增白名单" , description = "新增白名单" )
    public Object save(WhiteList whiteList) {
        whiteListService.saveOrUpdate(whiteList);
        return R.ok("保存成功");
    }
    @PostMapping("/delete")
    @Operation(summary = "删除白名单" , description = "删除白名单" )
    public Object delete(Long id) {
        whiteListService.removeById(id);
        return R.ok("删除成功");