|
@@ -1,14 +1,16 @@
|
|
|
package com.java110.api.smo.payment.impl;
|
|
package com.java110.api.smo.payment.impl;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.java110.core.context.IPageData;
|
|
|
|
|
import com.java110.api.properties.WechatAuthProperties;
|
|
import com.java110.api.properties.WechatAuthProperties;
|
|
|
import com.java110.api.smo.AppAbstractComponentSMO;
|
|
import com.java110.api.smo.AppAbstractComponentSMO;
|
|
|
import com.java110.api.smo.payment.IToPayInGoOutSMO;
|
|
import com.java110.api.smo.payment.IToPayInGoOutSMO;
|
|
|
|
|
+import com.java110.core.context.IPageData;
|
|
|
|
|
+import com.java110.core.log.LoggerFactory;
|
|
|
|
|
+import com.java110.dto.smallWeChat.SmallWeChatDto;
|
|
|
|
|
+import com.java110.intf.store.ISmallWechatV1InnerServiceSMO;
|
|
|
import com.java110.utils.cache.MappingCache;
|
|
import com.java110.utils.cache.MappingCache;
|
|
|
import com.java110.utils.util.Assert;
|
|
import com.java110.utils.util.Assert;
|
|
|
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.HttpStatus;
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
@@ -16,11 +18,12 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@Service("toPayInGoOutSMOImpl")
|
|
@Service("toPayInGoOutSMOImpl")
|
|
|
public class ToPayInGoOutSMOImpl extends AppAbstractComponentSMO implements IToPayInGoOutSMO {
|
|
public class ToPayInGoOutSMOImpl extends AppAbstractComponentSMO implements IToPayInGoOutSMO {
|
|
|
- private static final Logger logger = LoggerFactory.getLogger( ToPayInGoOutSMOImpl.class);
|
|
|
|
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(ToPayInGoOutSMOImpl.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -33,6 +36,9 @@ public class ToPayInGoOutSMOImpl extends AppAbstractComponentSMO implements IToP
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private WechatAuthProperties wechatAuthProperties;
|
|
private WechatAuthProperties wechatAuthProperties;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ISmallWechatV1InnerServiceSMO smallWechatV1InnerServiceSMOImpl;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public ResponseEntity<String> toPay(IPageData pd) {
|
|
public ResponseEntity<String> toPay(IPageData pd) {
|
|
|
return super.businessProcess(pd);
|
|
return super.businessProcess(pd);
|
|
@@ -54,10 +60,18 @@ public class ToPayInGoOutSMOImpl extends AppAbstractComponentSMO implements IToP
|
|
|
|
|
|
|
|
String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL")
|
|
String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL")
|
|
|
+ "/#/pages/reportInfoDetail/reportInfoDetail?settingId=" +
|
|
+ "/#/pages/reportInfoDetail/reportInfoDetail?settingId=" +
|
|
|
- paramIn.getString( "settingId" ) +
|
|
|
|
|
- "&communityId=" + paramIn.getString( "communityId" ) ;
|
|
|
|
|
- Map result = new HashMap( );
|
|
|
|
|
- result.put( "codeUrl", ownerUrl);
|
|
|
|
|
|
|
+ paramIn.getString("settingId") +
|
|
|
|
|
+ "&communityId=" + paramIn.getString("communityId");
|
|
|
|
|
+ SmallWeChatDto smallWeChatDto = new SmallWeChatDto();
|
|
|
|
|
+ smallWeChatDto.setWeChatType(SmallWeChatDto.WECHAT_TYPE_PUBLIC);
|
|
|
|
|
+ smallWeChatDto.setObjId(paramIn.getString("communityId"));
|
|
|
|
|
+ List<SmallWeChatDto> smallWeChatDtos = smallWechatV1InnerServiceSMOImpl.querySmallWechats(smallWeChatDto);
|
|
|
|
|
+
|
|
|
|
|
+ if (smallWeChatDtos != null && smallWeChatDtos.size() > 0) {
|
|
|
|
|
+ ownerUrl += ("&wAppId=" + smallWeChatDtos.get(0).getAppId());
|
|
|
|
|
+ }
|
|
|
|
|
+ Map result = new HashMap();
|
|
|
|
|
+ result.put("codeUrl", ownerUrl);
|
|
|
responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK);
|
|
responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK);
|
|
|
|
|
|
|
|
return responseEntity;
|
|
return responseEntity;
|