|
@@ -0,0 +1,52 @@
|
|
|
+package com.bosshand.virgo.api.operate.controller;
|
|
|
+
|
|
|
+import com.bosshand.virgo.api.operate.model.Godown;
|
|
|
+import com.bosshand.virgo.api.operate.service.GodownService;
|
|
|
+import com.bosshand.virgo.core.response.Response;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("godown")
|
|
|
+@Api(tags = {"仓库设置"})
|
|
|
+public class GodownController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ GodownService godownService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "详情", notes = "详情")
|
|
|
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
|
+ public Response get(@PathVariable long id) {
|
|
|
+ return Response.ok(godownService.get(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "新增", notes = "新增")
|
|
|
+ @RequestMapping(value = "", method = RequestMethod.POST)
|
|
|
+ public Response save(@RequestBody Godown godown) {
|
|
|
+ godownService.save(godown);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除", notes = "删除")
|
|
|
+ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
|
|
+ public Response delete(@PathVariable long id) {
|
|
|
+ godownService.delete(id);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "编辑", notes = "编辑")
|
|
|
+ @RequestMapping(value = "", method = RequestMethod.PUT)
|
|
|
+ public Response update(@RequestBody Godown godown) {
|
|
|
+ godownService.update(godown);
|
|
|
+ return Response.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取", notes = "获取")
|
|
|
+ @RequestMapping(value = "/query", method = RequestMethod.POST)
|
|
|
+ public Response getList(@RequestBody Godown godown) {
|
|
|
+ return Response.ok(godownService.getList(godown));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|