From 4348c321dfe200e4cdc430b1dc5b1caef4991261 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期四, 18 四月 2019 23:46:00 +0800
Subject: [PATCH] 入驻小区 和退订开发测试完成
---
WebService/src/main/java/com/java110/web/components/NavComponent.java | 66 +++++++++++++++++++++++++++++++++
1 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/WebService/src/main/java/com/java110/web/components/NavComponent.java b/WebService/src/main/java/com/java110/web/components/NavComponent.java
index c6dbd4f..ff4f7cf 100644
--- a/WebService/src/main/java/com/java110/web/components/NavComponent.java
+++ b/WebService/src/main/java/com/java110/web/components/NavComponent.java
@@ -1,5 +1,12 @@
package com.java110.web.components;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.INavServiceSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
/**
@@ -9,4 +16,63 @@
@Component("nav")
public class NavComponent {
+
+ @Autowired
+ private INavServiceSMO navServiceSMOImpl;
+
+ public ResponseEntity<String> getNavData(IPageData pd){
+
+ String result = "{'noticeSize':10," +
+ "'moreNoticeUrl':'/moreNotice','notices':[" +
+ "{'msg':'鏂扮郴缁熷紑鍙戞祴璇�','date':'2019-03-19'}," +
+ "{'msg':'鏉冮檺妫�鏌ユ祴璇�','date':'2019-03-21'}," +
+ "{'msg':'绯荤粺娆插紑鍙戞祴璇�','date':'2019-03-20'}" +
+ "]}";
+
+ JSONObject nav = JSONObject.parseObject(result);
+
+ return new ResponseEntity<String>(nav.toJSONString(), HttpStatus.OK);
+ }
+
+
+ /**
+ * 閫�鍑虹櫥褰�
+ * @param pd
+ * @return
+ */
+ public ResponseEntity<String> logout(IPageData pd){
+ ResponseEntity<String> responseEntity = null;
+ try{
+ responseEntity = navServiceSMOImpl.doExit(pd);
+ }catch (Exception e){
+ responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+ }finally {
+ return responseEntity;
+ }
+ }
+
+ /**
+ * 鑾峰彇鐢ㄦ埛淇℃伅
+ * @param pd
+ * @return
+ */
+ public ResponseEntity<String> getUserInfo(IPageData pd){
+ ResponseEntity<String> responseEntity = null;
+ try{
+ responseEntity = navServiceSMOImpl.getUserInfo(pd);
+ }catch (Exception e){
+ responseEntity = new ResponseEntity<String>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
+ }finally {
+ return responseEntity;
+ }
+ }
+
+
+ public INavServiceSMO getNavServiceSMOImpl() {
+ return navServiceSMOImpl;
+ }
+
+ public void setNavServiceSMOImpl(INavServiceSMO navServiceSMOImpl) {
+ this.navServiceSMOImpl = navServiceSMOImpl;
+ }
}
--
Gitblit v1.8.0