Bladeren bron

优化 费用

java110 4 jaren geleden
bovenliggende
commit
974aa1e56e

+ 9 - 5
service-api/src/main/java/com/java110/api/smo/staff/impl/StaffAuthSMOImpl.java

@@ -2,25 +2,23 @@ package com.java110.api.smo.staff.impl;
 
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
+import com.java110.api.properties.WechatAuthProperties;
 import com.java110.api.smo.DefaultAbstractComponentSMO;
 import com.java110.api.smo.DefaultAbstractComponentSMO;
-import com.java110.core.base.smo.front.AbstractFrontServiceSMO;
+import com.java110.api.smo.staff.IStaffAuthSMO;
 import com.java110.core.context.IPageData;
 import com.java110.core.context.IPageData;
 import com.java110.core.context.PageData;
 import com.java110.core.context.PageData;
 import com.java110.core.factory.WechatFactory;
 import com.java110.core.factory.WechatFactory;
+import com.java110.core.log.LoggerFactory;
 import com.java110.dto.owner.OwnerAppUserDto;
 import com.java110.dto.owner.OwnerAppUserDto;
 import com.java110.dto.smallWeChat.SmallWeChatDto;
 import com.java110.dto.smallWeChat.SmallWeChatDto;
-import com.java110.api.properties.WechatAuthProperties;
-import com.java110.api.smo.staff.IStaffAuthSMO;
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.ServiceConstant;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.exception.SMOException;
 import com.java110.utils.exception.SMOException;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.StringUtil;
 import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import com.java110.vo.ResultVo;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.HttpStatus;
@@ -141,6 +139,12 @@ public class StaffAuthSMOImpl extends DefaultAbstractComponentSMO implements ISt
 
 
         String openUrl = "";
         String openUrl = "";
         String url = MappingCache.getValue("OWNER_WECHAT_URL");
         String url = MappingCache.getValue("OWNER_WECHAT_URL");
+
+        if (url.contains("?")) {
+            url += ("&wAppId=" + smallWeChatDto.getAppId());
+        } else {
+            url += ("?wAppId=" + smallWeChatDto.getAppId());
+        }
         try {
         try {
             openUrl = WechatConstant.OPEN_AUTH
             openUrl = WechatConstant.OPEN_AUTH
                     .replace("APPID", smallWeChatDto.getAppId())
                     .replace("APPID", smallWeChatDto.getAppId())

+ 5 - 0
service-job/src/main/java/com/java110/job/adapt/payment/notice/MachinePaymentNoticeAdapt.java

@@ -512,6 +512,11 @@ public class MachinePaymentNoticeAdapt extends DatabusAdaptImpl {
             templateMessage.setData(data);
             templateMessage.setData(data);
             //获取业主公众号地址
             //获取业主公众号地址
             String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL");
             String wechatUrl = MappingCache.getValue("OWNER_WECHAT_URL");
+            if(wechatUrl.contains("?")){
+                wechatUrl += ( "&wAppId="+smallWeChatDtos.get(0).getAppId());
+            }else{
+                wechatUrl += ( "?wAppId="+smallWeChatDtos.get(0).getAppId());
+            }
             templateMessage.setUrl(wechatUrl);
             templateMessage.setUrl(wechatUrl);
             logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage));
             logger.info("发送模板消息内容:{}", JSON.toJSONString(templateMessage));
             ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class);
             ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(url, JSON.toJSONString(templateMessage), String.class);