| | |
| | | import com.java110.front.properties.WechatAuthProperties; |
| | | import com.java110.front.smo.AppAbstractComponentSMO; |
| | | import com.java110.front.smo.payment.IToPayOweFeeSMO; |
| | | import com.java110.front.smo.payment.adapt.IPayAdapt; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.constant.WechatConstant; |
| | | import com.java110.utils.factory.ApplicationContextFactory; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | smallWeChatDto.setPayPassword(wechatAuthProperties.getKey()); |
| | | } |
| | | |
| | | String payObjType = "3333"; |
| | | if(paramIn.containsKey("payObjType")){ |
| | | payObjType = paramIn.getString("payObjType"); |
| | | } |
| | | |
| | | //查询用户ID |
| | | paramIn.put("userId", pd.getUserId()); |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/feeApi/listOweFees?page=1&row=50&communityId=" + paramIn.getString("communityId") + "&payObjId=" + paramIn.getString("roomId") + "&payObjType=3333"; |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/feeApi/listOweFees?page=1&row=50&communityId=" + paramIn.getString("communityId") + "&payObjId=" + paramIn.getString("roomId") + "&payObjType="+payObjType; |
| | | responseEntity = super.callCenterService(restTemplate, pd, "", url, HttpMethod.GET); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | JSONObject realUserInfo = userResult.getJSONArray("data").getJSONObject(0); |
| | | |
| | | String openId = realUserInfo.getString("openId"); |
| | | |
| | | Map result = super.java110Payment(outRestTemplate, paramIn.getString("feeName"), paramIn.getString("tradeType"), |
| | | String payAdapt = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, WechatConstant.PAY_ADAPT); |
| | | payAdapt = StringUtil.isEmpty(payAdapt) ? DEFAULT_PAY_ADAPT : payAdapt; |
| | | //支付适配器 |
| | | IPayAdapt tPayAdapt = ApplicationContextFactory.getBean(payAdapt, IPayAdapt.class); |
| | | Map result = tPayAdapt.java110Payment(outRestTemplate, paramIn.getString("feeName"), paramIn.getString("tradeType"), |
| | | orderId, money, openId, smallWeChatDto,wechatAuthProperties.getOweFeeNotifyUrl()); |
| | | responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK); |
| | | if (!"0".equals(result.get("code"))) { |