From 171e36997e733176cc249ebfa368a62ae3f78b75 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Wed, 20 Dec 2017 11:43:10 +0800
Subject: [PATCH] updated
---
src/main/java/com/moral/controller/MobileController.java | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/main/java/com/moral/controller/MobileController.java b/src/main/java/com/moral/controller/MobileController.java
index 09b9c68..ff56619 100644
--- a/src/main/java/com/moral/controller/MobileController.java
+++ b/src/main/java/com/moral/controller/MobileController.java
@@ -14,7 +14,7 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
-import com.moral.common.bean.ResultBean;
+import com.moral.common.bean.AppData;
import com.moral.entity.Device;
import com.moral.entity.MonitorPoint;
import com.moral.entity.OperateUser;
@@ -56,9 +56,9 @@
* @return the result bean
*/
@GetMapping("accountlogin")
- public ResultBean<OperateUser> mobileLogin(String username, String password) {
+ public AppData<OperateUser> mobileLogin(String username, String password) {
OperateUser operateUser = operateUserService.mobileLogin(username,password);
- return new ResultBean<OperateUser>(operateUser);
+ return new AppData<OperateUser>(operateUser);
}
/**
@@ -70,9 +70,9 @@
* @return the result bean
*/
@GetMapping("upPassword")
- public ResultBean<OperateUser> updatePassword(Integer uid, String password, String newpassword) {
+ public AppData<OperateUser> updatePassword(Integer uid, String password, String newpassword) {
OperateUser operateUser = operateUserService.updatePassword(uid,password,newpassword);
- return new ResultBean<OperateUser>(operateUser);
+ return new AppData<OperateUser>(operateUser);
}
/**
@@ -82,9 +82,9 @@
* @return the result bean
*/
@GetMapping("reportDevice")
- public ResultBean<String> installDevice(Device device) {
+ public AppData<String> installDevice(Device device) {
deviceService.saveOrUpdateDevice(device);
- return new ResultBean<String>("");
+ return new AppData<String>("");
}
/**
@@ -96,10 +96,10 @@
* @return the install devices by operate user
*/
@GetMapping("myRelease")
- public ResultBean<List<Device>> getInstallDevicesByOperateUser(@RequestParam(value="uid", required=true)Integer uid,
+ public AppData<List<Device>> getInstallDevicesByOperateUser(@RequestParam(value="uid", required=true)Integer uid,
@RequestParam(defaultValue="0")Integer pageIndex, @RequestParam(defaultValue="0")Integer pageSize) {
List<Device> devices = deviceService.getInstallDevicesByOperateUser(uid, pageIndex, pageSize);
- return new ResultBean<List<Device>>(devices);
+ return new AppData<List<Device>>(devices);
}
/**
@@ -109,9 +109,9 @@
* @return the device by mac
*/
@GetMapping("getEquInfoByMac")
- public ResultBean<Device> getDeviceByMac(@RequestParam(value="mac", required=true)String mac) {
+ public AppData<Device> getDeviceByMac(@RequestParam(value="mac", required=true)String mac) {
Device device = deviceService.getDeviceByMac(mac);
- return new ResultBean<Device>(device);
+ return new AppData<Device>(device);
}
/**
@@ -121,10 +121,10 @@
* @return the monitor points by area name
*/
@GetMapping("getMpointsByAreaName")
- public ResultBean<List<MonitorPoint>> getMonitorPointsByAreaName(HttpServletRequest request) {
+ public AppData<List<MonitorPoint>> getMonitorPointsByAreaName(HttpServletRequest request) {
Map<String, Object> parameters = getParametersStartingWith(request, null);
List<MonitorPoint> monitorPoints = monitorPointService.getMonitorPointsByAreaName(parameters);
- return new ResultBean<List<MonitorPoint>>(monitorPoints);
+ return new AppData<List<MonitorPoint>>(monitorPoints);
}
/**
@@ -134,9 +134,9 @@
* @return the organizations by area name
*/
@GetMapping("getOrgsByAreaName")
- public ResultBean<List<Organization>> getOrganizationsByAreaName(HttpServletRequest request) {
+ public AppData<List<Organization>> getOrganizationsByAreaName(HttpServletRequest request) {
Map<String, Object> parameters = getParametersStartingWith(request, null);
List<Organization> organizations = organizationService.getOrganizationsByAreaName(parameters);
- return new ResultBean<List<Organization>>(organizations);
+ return new AppData<List<Organization>>(organizations);
}
}
--
Gitblit v1.8.0