Yansen 2 lat temu
rodzic
commit
be51925b03

+ 6
- 2
src/main/java/com/yunzhi/inte/controller/DishesController.java Wyświetl plik

@@ -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
 }

+ 1
- 1
src/main/resources/application.yml Wyświetl plik

@@ -7,7 +7,7 @@ server:
7 7
 spring:
8 8
   datasource:
9 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 11
     username:
12 12
     password:
13 13
   application: