|
@@ -1,4 +1,4 @@
|
|
|
-package com.seecoder.BlueWhale.Controller;
|
|
|
|
|
|
|
+package com.seecoder.BlueWhale.controller;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -9,18 +9,18 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
-import com.seecoder.BlueWhale.Service.StoreService;
|
|
|
|
|
-import com.seecoder.BlueWhale.VO.ResultVO;
|
|
|
|
|
-import com.seecoder.BlueWhale.VO.StoreVO;
|
|
|
|
|
|
|
+import com.seecoder.BlueWhale.service.StoreService;
|
|
|
|
|
+import com.seecoder.BlueWhale.vo.ResultVO;
|
|
|
|
|
+import com.seecoder.BlueWhale.vo.StoreVO;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("/api/store")
|
|
|
|
|
|
|
+@RequestMapping("/api/stores")
|
|
|
public class StoreController {
|
|
public class StoreController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
StoreService storeService;
|
|
StoreService storeService;
|
|
|
|
|
|
|
|
- @PostMapping("/create")
|
|
|
|
|
|
|
+ @PostMapping()
|
|
|
public ResultVO<Boolean> create(@RequestBody StoreVO storeVO){
|
|
public ResultVO<Boolean> create(@RequestBody StoreVO storeVO){
|
|
|
return ResultVO.buildSuccess(storeService.create(storeVO));
|
|
return ResultVO.buildSuccess(storeService.create(storeVO));
|
|
|
}
|
|
}
|
|
@@ -30,7 +30,7 @@ public class StoreController {
|
|
|
return ResultVO.buildSuccess(storeService.getStore(id));
|
|
return ResultVO.buildSuccess(storeService.getStore(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @GetMapping("/all")
|
|
|
|
|
|
|
+ @GetMapping
|
|
|
public ResultVO<List<StoreVO>> getAllStores(){
|
|
public ResultVO<List<StoreVO>> getAllStores(){
|
|
|
return ResultVO.buildSuccess(storeService.getAllStores());
|
|
return ResultVO.buildSuccess(storeService.getAllStores());
|
|
|
}
|
|
}
|