From ded40ebbd1613490fc68190dbd92db5d7243267f Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 22 八月 2023 16:25:20 +0800
Subject: [PATCH] 优化代码
---
service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java b/service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java
index 9d58ad8..4653398 100644
--- a/service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java
+++ b/service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java
@@ -10,8 +10,8 @@
import com.java110.core.factory.WechatFactory;
import com.java110.core.log.LoggerFactory;
import com.java110.dto.owner.OwnerAppUserDto;
-import com.java110.dto.smallWeChat.SmallWeChatDto;
-import com.java110.utils.cache.MappingCache;
+import com.java110.dto.wechat.SmallWeChatDto;
+import com.java110.utils.cache.UrlCache;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.constant.WechatConstant;
import com.java110.utils.exception.SMOException;
@@ -108,7 +108,16 @@
ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, paramAuth.toJSONString(),
"/staff/updateStaffAppAuth", HttpMethod.POST);
- url = MappingCache.getValue("OWNER_WECHAT_URL")+"/#/?wAppId="+smallWeChatDto.getAppId();
+ url = UrlCache.getOwnerUrl();
+ if(url.contains("/#/")){
+ if(url.contains("?")){
+ url += ("&wAppId="+smallWeChatDto.getAppId());
+ }else{
+ url += ("?wAppId="+smallWeChatDto.getAppId());
+ }
+ }else{
+ url += ("/#/?wAppId="+smallWeChatDto.getAppId());
+ }
return ResultVo.redirectPage(url);
}
@@ -138,7 +147,7 @@
}
String openUrl = "";
- String url = MappingCache.getValue("OWNER_WECHAT_URL");
+ String url = UrlCache.getOwnerUrl();
url = url
+ "/app/loginStaffWechatAuth?appId=992020061452450002&staffId="
+ staffId + "&storeId=" + storeId + "&wId=" + WechatFactory.getWId(smallWeChatDto.getAppId())
--
Gitblit v1.8.0