修改bug
This commit is contained in:
parent
5399d16135
commit
86a287cf8b
@ -26,15 +26,15 @@ public class HealthController {
|
|||||||
IHealthService iHealthService;
|
IHealthService iHealthService;
|
||||||
|
|
||||||
@GetMapping("info")
|
@GetMapping("info")
|
||||||
public R info(Integer id, Integer animallId){
|
public R info(Integer id, Integer animalId){
|
||||||
QueryWrapper<Health> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Health> queryWrapper = new QueryWrapper<>();
|
||||||
if (id!=null){
|
if (id!=null){
|
||||||
queryWrapper.eq("id",id);
|
queryWrapper.eq("id",id);
|
||||||
Health one = iHealthService.getOne(queryWrapper);
|
Health one = iHealthService.getOne(queryWrapper);
|
||||||
return R.success(one);
|
return R.success(one);
|
||||||
}
|
}
|
||||||
if (animallId!=null){
|
if (animalId!=null){
|
||||||
queryWrapper.eq("animallId",animallId);
|
queryWrapper.eq("animal_id",animalId);
|
||||||
List<Health> list = iHealthService.list(queryWrapper);
|
List<Health> list = iHealthService.list(queryWrapper);
|
||||||
return R.success(list);
|
return R.success(list);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user