From eaa5216743b873e7c8ac37ad952776401a951f82 Mon Sep 17 00:00:00 2001
From: 6c <420680616@qq.com>
Date: 星期六, 11 十月 2025 11:46:02 +0800
Subject: [PATCH] 移动端加载mvc
---
src/main/java/com/product/mobile/core/controller/SignInController.java | 62 ++++++++++++++++++++++++++++--
1 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/product/mobile/core/controller/SignInController.java b/src/main/java/com/product/mobile/core/controller/SignInController.java
index c86aee4..b6ea1fe 100644
--- a/src/main/java/com/product/mobile/core/controller/SignInController.java
+++ b/src/main/java/com/product/mobile/core/controller/SignInController.java
@@ -11,8 +11,12 @@
import com.product.core.controller.support.AbstractBaseController;
import com.product.core.entity.FieldSetEntity;
import com.product.core.entity.RequestParameterEntity;
+import com.product.core.exception.BaseException;
+import com.product.core.spring.context.SpringMVCContextHolder;
+import com.product.mobile.core.config.MobileCoreCode;
import com.product.mobile.core.service.SignInService;
import com.product.module.sys.version.ApiVersion;
+import com.product.org.admin.config.CmnCode;
/**
* 鎵嬫満绛惧埌
@@ -41,8 +45,15 @@
fse = reqp.getFormData();
}
//绛惧埌鏃讹紝濡傛灉涓婁紶浜唘uid锛岃〃绀猴紝寰佸鍏徃瑙勫畾鐨勮�冨嫟鐐圭殑绛惧埌锛屽惁鍒欒〃绀轰笉鍦ㄥ叕鍙歌瀹氱殑鑰冨嫟鐐圭殑绛惧埌(浠绘剰鍦扮偣绛惧埌銆�)
- signInService.signIn(fse);
- return this.OK();
+ try {
+ signInService.signIn(fse);
+ return this.OK();
+ } catch (BaseException e) {
+ return this.error(e);
+ } catch (Exception e) {
+
+ return this.error(MobileCoreCode.SIGN_IN_FAIL);
+ }
}
/**
@@ -60,7 +71,14 @@
RequestParameterEntity reqp = (RequestParameterEntity) bean;
fse = reqp.getFormData();
}
- return this.OK_List(signInService.signInList(fse));
+ try {
+ return this.OK_List(signInService.signInList());
+ } catch (BaseException e) {
+ return this.error(e);
+ } catch (Exception e) {
+
+ return this.error(MobileCoreCode.SIGN_IN_FAIL);
+ }
}
/**
* 鑾峰彇鍏徃鍥哄畾鑰冨嫟鐐圭殑淇℃伅
@@ -77,7 +95,41 @@
RequestParameterEntity reqp = (RequestParameterEntity) bean;
fse = reqp.getFormData();
}
-
- return this.OK_List(signInService.signInSites(null));
+ try {
+ //鑾峰彇褰撳墠浜虹殑鍏徃
+ return this.OK_List(signInService.signInSites(SpringMVCContextHolder.getCurrentUser().getCurrentCompany().getUUID()));
+
+ } catch (BaseException e) {
+ return this.error(e);
+ } catch (Exception e) {
+
+ return this.error(MobileCoreCode.SIGN_IN_FAIL);
+ }
+ }
+ /**
+ * 鍦扮悊鍧愭爣杞崲鎺ュ彛
+ *
+ * @param request
+ * @return
+ */
+ @RequestMapping(value = "/map/coord/convert/{version}", method = RequestMethod.POST)
+ @ApiVersion(1)
+ public String coordinateTransform(HttpServletRequest request) {
+ FieldSetEntity fse = null;
+ Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
+ if (bean != null) {
+ RequestParameterEntity reqp = (RequestParameterEntity) bean;
+ fse = reqp.getFormData();
+ }
+ try {
+ //杩斿洖缁忕含搴�
+ return this.OK_List(signInService.coordinateTransform(fse.getInteger("type"),fse.getDouble("longitude"),fse.getDouble("latitude")));
+
+ } catch (BaseException e) {
+ return this.error(e);
+ } catch (Exception e) {
+
+ return this.error(MobileCoreCode.SIGN_IN_FAIL);
+ }
}
}
--
Gitblit v1.9.2