From 7214ae59e03b79372a923eae8206082efc3fab85 Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Thu, 07 Dec 2017 17:08:28 +0800
Subject: [PATCH] app 接口

---
 src/main/java/com/moral/controller/MobileController.java |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/moral/controller/MobileController.java b/src/main/java/com/moral/controller/MobileController.java
index d178bc7..8fcf666 100644
--- a/src/main/java/com/moral/controller/MobileController.java
+++ b/src/main/java/com/moral/controller/MobileController.java
@@ -9,13 +9,15 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.github.pagehelper.PageHelper;
-import com.moral.common.bean.PageBean;
 import com.moral.common.bean.ResultBean;
 import com.moral.entity.Device;
+import com.moral.entity.MonitorPoint;
 import com.moral.entity.OperateUser;
+import com.moral.entity.Organization;
 import com.moral.service.DeviceService;
+import com.moral.service.MonitorPointService;
 import com.moral.service.OperateUserService;
+import com.moral.service.OrganizationService;
 
 @RestController
 @RequestMapping(value = "mobile")
@@ -27,6 +29,12 @@
 
 	@Resource
 	private DeviceService deviceService;
+
+	@Resource
+	private OrganizationService organizationService;
+
+	@Resource
+	private MonitorPointService monitorPointService;
 
 	// 1������
 	@GetMapping(value = "accountlogin")
@@ -57,15 +65,20 @@
 	}
 
 	@GetMapping(value = "getEquInfoByMac")
-	public void getEquInfoByMac(String mac) {
+	public ResultBean<Device> getDeviceByMac(String mac) {
+		Device device = deviceService.getDeviceByMac(mac);
+		return new ResultBean<Device>(device);
 	}
 
 	@GetMapping(value = "getMpointsByAreaName")
-	public void getMpointsByAreaName(String areaName) {
+	public ResultBean<List<MonitorPoint>> getMonitorPointsByAreaName(String areaName) {
+		List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsByAreaName(areaName);
+		return new ResultBean<List<MonitorPoint>>(monitorPoints);
 	}
 
 	@GetMapping(value = "getOrgsByAreaName")
-	public void getOrgsByAreaName(String areaName) {
-
+	public ResultBean<List<Organization>> getOrganizationsByAreaName(String areaName) {
+		List<Organization> organizations = organizationService.getOrganizationsByAreaName(areaName);
+		return new ResultBean<List<Organization>>(organizations);
 	}
 }

--
Gitblit v1.8.0