|
|
@@ -8,11 +8,10 @@ import com.unissoft.model.ResponseEntity;
|
|
8
|
8
|
import io.swagger.annotations.Api;
|
|
9
|
9
|
import io.swagger.annotations.ApiOperation;
|
|
10
|
10
|
import org.springframework.validation.annotation.Validated;
|
|
11
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
12
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
13
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
11
|
+import org.springframework.web.bind.annotation.*;
|
|
14
|
12
|
|
|
15
|
13
|
import javax.annotation.Resource;
|
|
|
14
|
+import javax.ws.rs.GET;
|
|
16
|
15
|
|
|
17
|
16
|
|
|
18
|
17
|
/**
|
|
|
@@ -31,9 +30,27 @@ public class TDevControlController {
|
|
31
|
30
|
private TDevControlService devControlService;
|
|
32
|
31
|
|
|
33
|
32
|
@GetMapping("/getPageList")
|
|
34
|
|
- @ApiOperation(value="设备配置分页列表", notes = "支持分页")
|
|
|
33
|
+ @ApiOperation(value = "设备配置分页列表", notes = "支持分页")
|
|
35
|
34
|
public ResponseEntity<Page<TDevControl>> getPageList(@Validated TDevControlPageParam devControl) {
|
|
36
|
35
|
return ResponseEntity.ok(devControlService.selectPageList(devControl));
|
|
37
|
36
|
}
|
|
38
|
37
|
|
|
|
38
|
+ @PostMapping("/save")
|
|
|
39
|
+ @ApiOperation(value = "设备配置新增", notes = "新增")
|
|
|
40
|
+ public ResponseEntity save(@RequestBody TDevControl devControl) {
|
|
|
41
|
+ return ResponseEntity.ok(devControlService.saveData(devControl));
|
|
|
42
|
+ }
|
|
|
43
|
+
|
|
|
44
|
+ @PutMapping("/update")
|
|
|
45
|
+ @ApiOperation(value = "设备配置修改", notes = "修改")
|
|
|
46
|
+ public ResponseEntity update(@RequestBody TDevControl devControl) {
|
|
|
47
|
+ return ResponseEntity.ok(devControlService.updateData(devControl));
|
|
|
48
|
+ }
|
|
|
49
|
+
|
|
|
50
|
+ @DeleteMapping("/delete/{id}")
|
|
|
51
|
+ @ApiOperation(value = "设备配置删除", notes = "id删除")
|
|
|
52
|
+ public ResponseEntity delete(@PathVariable("id") String id) {
|
|
|
53
|
+ return ResponseEntity.ok(devControlService.deleteData(id));
|
|
|
54
|
+ }
|
|
|
55
|
+
|
|
39
|
56
|
}
|