|
@@ -130,7 +130,10 @@ public class DishesController extends BaseController {
|
130
|
130
|
}
|
131
|
131
|
|
132
|
132
|
dishes.setStatus(1);
|
133
|
|
- dishesService.updateById(dishes);
|
|
133
|
+ if(dishesService.updateById(dishes)){
|
|
134
|
+ dishesService.getById(id);
|
|
135
|
+ }
|
|
136
|
+
|
134
|
137
|
return ResponseBean.success(dishes);
|
135
|
138
|
}
|
136
|
139
|
|
|
@@ -143,7 +146,8 @@ public class DishesController extends BaseController {
|
143
|
146
|
@ApiOperation("通过主键删除数据")
|
144
|
147
|
@DeleteMapping("/dishes/{id}")
|
145
|
148
|
public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable Integer id){
|
146
|
|
- dishesService.removeLogicById(id);
|
|
149
|
+// dishesService.removeLogicById(id);
|
|
150
|
+ dishesService.removeById(id);
|
147
|
151
|
return ResponseBean.success("success");
|
148
|
152
|
}
|
149
|
153
|
}
|