BerryController

@RestController
@RequestMapping(value = ["/berry"])
class BerryController(berryService: BerryService)

树果管理控制器 提供树果的分页查询、新增、更新和删除接口

Constructors

Link copied to clipboard
constructor(berryService: BerryService)

Functions

Link copied to clipboard
@DeleteMapping(value = ["/{id:\d+}"])
fun deleteById(@PathVariable id: Long)

删除指定 ID 的树果

Link copied to clipboard
@GetMapping(value = ["/page"])
fun getBerryPage(pageable: Pageable, @RequestParam(required = false) id: Long?, @RequestParam(required = false) internalName: String?, @RequestParam(required = false) name: String?, @RequestParam(required = false) growthTime: Int?, @RequestParam(required = false) maxHarvest: Int?, @RequestParam(required = false) bulk: Int?, @RequestParam(required = false) smoothness: Int?, @RequestParam(required = false) soilDryness: Int?, @RequestParam(required = false) berryFirmnessId: Long?, @RequestParam(required = false) naturalGiftTypeId: Long?, @RequestParam(required = false) naturalGiftPower: Int?): Page<Berry>

按筛选条件分页查询树果

Link copied to clipboard
@PostMapping
fun save(@RequestBody berry: Berry): Berry

创建树果

Link copied to clipboard
@PutMapping
fun update(@RequestBody berry: Berry): Berry

更新树果