修改bug
This commit is contained in:
parent
86a287cf8b
commit
8d3c862719
@ -3,6 +3,7 @@ package com.zoo.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zoo.common.R;
|
||||
import com.zoo.entity.Breedingplan;
|
||||
import com.zoo.entity.Health;
|
||||
import com.zoo.service.IHealthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -51,8 +52,10 @@ public class HealthController {
|
||||
|
||||
@PostMapping("/update")
|
||||
public R update(@RequestBody Health health){
|
||||
boolean update = iHealthService.save(health);
|
||||
if (update){
|
||||
QueryWrapper<Health> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id",health.getId());
|
||||
boolean b = iHealthService.update(health,queryWrapper);
|
||||
if (b){
|
||||
return R.success("修改成功");
|
||||
}
|
||||
return R.error("修改失败");
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user