2025-07-17 15:26:39 +08:00
|
|
|
package com.gunshi.project.hsz.controller;
|
2024-07-08 17:47:02 +08:00
|
|
|
|
2024-07-10 09:27:20 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.core.result.R;
|
2025-11-05 09:38:37 +08:00
|
|
|
import com.gunshi.project.hsz.common.model.so.OsmoticQueryPageSo;
|
2025-07-17 15:26:39 +08:00
|
|
|
import com.gunshi.project.hsz.model.OsmoticFlowR;
|
|
|
|
|
import com.gunshi.project.hsz.service.OsmoticFlowRService;
|
2025-11-04 16:14:38 +08:00
|
|
|
import com.gunshi.project.hsz.common.validate.markers.Insert;
|
|
|
|
|
import com.gunshi.project.hsz.common.validate.markers.Update;
|
2024-07-08 17:47:02 +08:00
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
/**
|
|
|
|
|
* 描述: 渗流监测记录表
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 17:40:37
|
|
|
|
|
*/
|
2025-11-03 16:47:35 +08:00
|
|
|
//@Tag(name = "渗流监测记录表")
|
|
|
|
|
//@RestController
|
|
|
|
|
//@RequestMapping(value="/osmoticFlowR")
|
2024-07-08 17:47:02 +08:00
|
|
|
public class OsmoticFlowRController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private OsmoticFlowRService service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "新增")
|
|
|
|
|
@PostMapping("/insert")
|
|
|
|
|
public R<OsmoticFlowR> insert(@Validated(Insert.class) @RequestBody OsmoticFlowR dto) {
|
|
|
|
|
boolean result = service.save(dto);
|
|
|
|
|
return R.ok(result ? dto : null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "修改")
|
|
|
|
|
@PostMapping("/update")
|
|
|
|
|
public R<OsmoticFlowR> update(@Validated(Update.class) @RequestBody OsmoticFlowR dto) {
|
|
|
|
|
boolean result = service.updateById(dto);
|
|
|
|
|
return R.ok(result ? dto : null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "删除")
|
|
|
|
|
@GetMapping("/del/{id}")
|
|
|
|
|
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
|
|
|
|
return R.ok(service.removeById(id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "列表")
|
|
|
|
|
@PostMapping("/list")
|
|
|
|
|
public R<List<OsmoticFlowR>> list() {
|
|
|
|
|
return R.ok(service.lambdaQuery().list());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "分页")
|
|
|
|
|
@PostMapping("/page")
|
2024-07-10 09:27:20 +08:00
|
|
|
public R<Page<OsmoticFlowR>> page(@RequestBody OsmoticQueryPageSo osmoticQueryPageSo) {
|
|
|
|
|
return R.ok(service.queryPage(osmoticQueryPageSo));
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|