| | |
| | | import org.springblade.modules.farmplant.service.StrainService; |
| | | import org.springblade.modules.farmplant.vo.StrainVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 农场检测报告/证书控制器 |
| | |
| | | return R.data(strainService.strainTree(strain)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/strain-trees") |
| | | public R<IPage<Strain>> list(@ApiIgnore @RequestParam Map<String, Object> strain, Query query) { |
| | | IPage<Strain> pages = strainService.page(Condition.getPage(query), Condition.getQueryWrapper(strain, Strain.class)); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 获取农产品和加工产品列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("kind-tree") |
| | | public R kindTree(){ |
| | | return R.data(strainService.kindTree()); |
| | | } |
| | | |
| | | } |