From 04eb3f2f80f195a0135fe31adda7e9a01c19589d Mon Sep 17 00:00:00 2001 From: shicf <shi_chongfu@163.com> Date: 星期四, 24 十月 2024 16:58:19 +0800 Subject: [PATCH] 签到打卡 --- src/main/java/com/product/mobile/core/controller/SignInController.java | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 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..f0f0c15 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,6 +45,7 @@ fse = reqp.getFormData(); } //绛惧埌鏃讹紝濡傛灉涓婁紶浜唘uid锛岃〃绀猴紝寰佸鍏徃瑙勫畾鐨勮�冨嫟鐐圭殑绛惧埌锛屽惁鍒欒〃绀轰笉鍦ㄥ叕鍙歌瀹氱殑鑰冨嫟鐐圭殑绛惧埌(浠绘剰鍦扮偣绛惧埌銆�) + signInService.signIn(fse); return this.OK(); } @@ -60,7 +65,13 @@ 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 +88,7 @@ RequestParameterEntity reqp = (RequestParameterEntity) bean; fse = reqp.getFormData(); } - - return this.OK_List(signInService.signInSites(null)); + //鑾峰彇褰撳墠浜虹殑鍏徃 + return this.OK_List(signInService.signInSites(SpringMVCContextHolder.getCurrentUser().getCurrentCompany().getUUID())); } } -- Gitblit v1.9.2