|
@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
import java.util.Arrays; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@Tag(name = "\uD83D\uDCA7溶液接口") |
|
|
@Tag(name = "\uD83D\uDCA7溶液接口") |
|
|
@RestController |
|
|
@RestController |
|
@ -25,11 +26,17 @@ public class SolutionController { |
|
|
private final SolutionService solutionsService; |
|
|
private final SolutionService solutionsService; |
|
|
|
|
|
|
|
|
@Operation(summary = "分页查询溶液") |
|
|
@Operation(summary = "分页查询溶液") |
|
|
@PostMapping("/list") |
|
|
|
|
|
public PageResult<Solution> list(@RequestBody BasePageQuery query) { |
|
|
|
|
|
|
|
|
@PostMapping("/page") |
|
|
|
|
|
public PageResult<Solution> getPage(@RequestBody BasePageQuery query) { |
|
|
return PageResult.success(solutionsService.page(new Page<>(query.getPageNum(), query.getPageSize()))); |
|
|
return PageResult.success(solutionsService.page(new Page<>(query.getPageNum(), query.getPageSize()))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "溶液下拉选") |
|
|
|
|
|
@GetMapping("/list") |
|
|
|
|
|
public Result<List<Solution>> getList() { |
|
|
|
|
|
return Result.success(solutionsService.list()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Operation(summary = "添加溶液") |
|
|
@Operation(summary = "添加溶液") |
|
|
@PostMapping("") |
|
|
@PostMapping("") |
|
|
public Result<String> add(@Valid @RequestBody Solution solutions) { |
|
|
public Result<String> add(@Valid @RequestBody Solution solutions) { |
|
|