Yansen 2 years ago
parent
commit
be51925b03

+ 6
- 2
src/main/java/com/yunzhi/inte/controller/DishesController.java View File

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

+ 1
- 1
src/main/resources/application.yml View File

7
 spring:
7
 spring:
8
   datasource:
8
   datasource:
9
     driver-class-name: org.sqlite.JDBC
9
     driver-class-name: org.sqlite.JDBC
10
-    url: jdbc:sqlite:E:\work\jgz\service\db\ybai.db
10
+    url: jdbc:sqlite:E:\work\jungongzhang\service\db\ybai.db
11
     username:
11
     username:
12
     password:
12
     password:
13
   application:
13
   application: