修改bug

This commit is contained in:
dongjie 2024-06-09 23:36:07 +08:00
parent 5399d16135
commit 86a287cf8b
3 changed files with 3 additions and 3 deletions

View File

@ -26,15 +26,15 @@ public class HealthController {
IHealthService iHealthService;
@GetMapping("info")
public R info(Integer id, Integer animallId){
public R info(Integer id, Integer animalId){
QueryWrapper<Health> queryWrapper = new QueryWrapper<>();
if (id!=null){
queryWrapper.eq("id",id);
Health one = iHealthService.getOne(queryWrapper);
return R.success(one);
}
if (animallId!=null){
queryWrapper.eq("animallId",animallId);
if (animalId!=null){
queryWrapper.eq("animal_id",animalId);
List<Health> list = iHealthService.list(queryWrapper);
return R.success(list);
}