From d7fb9e92779e971954ca59b86848569592f6185b Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期四, 07 一月 2021 10:48:35 +0800
Subject: [PATCH] update basic

---
 src/main/java/com/whyc/controller/MotorSystemInfController.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/whyc/controller/MotorSystemInfController.java b/src/main/java/com/whyc/controller/MotorSystemInfController.java
index 748d509..e544a5b 100644
--- a/src/main/java/com/whyc/controller/MotorSystemInfController.java
+++ b/src/main/java/com/whyc/controller/MotorSystemInfController.java
@@ -1,30 +1,40 @@
 package com.whyc.controller;
 
 import com.whyc.dto.Response;
+import com.whyc.pojo.MotorSystemInf;
 import com.whyc.service.MotorSystemInfService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
 
 /**
  * Motor绯荤粺
  */
 @RequestMapping("motorSystem")
 @RestController
-@Api(tags = "MotorSystem淇℃伅")
+@Api(tags = "MotorSystem璁惧淇℃伅")
 public class MotorSystemInfController {
 
     @Autowired
-    private MotorSystemInfService service = new MotorSystemInfService();
+    private MotorSystemInfService service;
 
     @GetMapping("all")
-    @ApiOperation(value = "鏌ヨ鎵�鏈�")
-    public Response getAll(){
-        return null;
+    @ApiOperation(value = "鏌ヨ鎵�鏈夎澶囦俊鎭�")
+    public Response<MotorSystemInf> getAll(){
+        return service.getAll();
     }
 
+    @GetMapping("devBySysId")
+    @ApiOperation(value = "鏍规嵁绯荤粺id鏌ヨ璁惧")
+    public Response<List<MotorSystemInf>> getDevBySysId(@RequestParam int sysId){
+        return service.getDevBySysId(sysId);
+    }
 
 }

--
Gitblit v1.9.1