java110 лет назад: 4
Родитель
Сommit
23803d79ae

+ 1 - 0
java110-bean/src/main/java/com/java110/dto/fee/FeeDto.java

@@ -28,6 +28,7 @@ public class FeeDto extends PageDto implements Serializable {
     public static final String FEE_FLAG_ONCE = "2006012";//一次性费用
     public static final String FEE_FLAG_CYCLE = "1003006";//周期性费用
     public static final String REDIS_PAY_OWE_FEE = "PAY_OWE_FEE_";
+    public static final String REDIS_PAY_TEMP_CAR_FEE = "PAY_TEMP_CAR_FEE_";
 
     private String amount;
     private String incomeObjId;

+ 2 - 0
service-api/src/main/java/com/java110/api/configuration/ServiceConfiguration.java

@@ -29,6 +29,8 @@ public class ServiceConfiguration {
         exclusions.append("/app/payment/rentingNotify,");//微信支付通知
         exclusions.append("/app/payment/oweFeeNotify,");//欠费微信支付通知
         exclusions.append("/app/payment/oweFeeNotifyChinaUms,");//欠费银联支付回调
+        exclusions.append("/app/payment/toPayTempCarFee,");//欠费银联支付回调
+        exclusions.append("/app/payment/tempCarFeeNotifyUrl,");//欠费银联支付回调
         exclusions.append("/app/notice.listNotices,");//通知放开登录
         exclusions.append("/app/tempCarFee.getTempCarFeeOrder,");//通知放开登录
         exclusions.append("/goods/notify,");//商品购买通知

+ 37 - 0
service-api/src/main/java/com/java110/api/controller/app/PaymentController.java

@@ -74,6 +74,9 @@ public class PaymentController extends BaseController {
     @Autowired
     private IToPayBackCitySMO toPayBackCitySMOImpl;
 
+    @Autowired
+    private IToPayTempCarFeeSMO toPayTempCarFeeSMOImpl;
+
     /**
      * <p>统一下单入口</p>
      *
@@ -115,6 +118,27 @@ public class PaymentController extends BaseController {
         return toPayOweFeeSMOImpl.toPay(newPd);
     }
 
+    /**
+     * <p>统一下单入口</p>
+     *
+     * @param request
+     * @throws Exception
+     */
+    @RequestMapping(path = "/toPayTempCarFee", method = RequestMethod.POST)
+    public ResponseEntity<String> toPayTempCarFee(@RequestBody String postInfo, HttpServletRequest request) {
+        IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);
+        /*IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);*/
+        String appId = request.getHeader("APP_ID");
+        if (StringUtil.isEmpty(appId)) {
+            appId = request.getHeader("APP-ID");
+        }
+
+        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(), pd.getToken(), postInfo,
+                "", "", "", pd.getSessionId(),
+                appId,pd.getHeaders());
+        return toPayTempCarFeeSMOImpl.toPay(newPd);
+    }
+
     /**
      * <p>统一下单入口</p>
      *
@@ -286,6 +310,19 @@ public class PaymentController extends BaseController {
         return oweFeeToNotifySMOImpl.toNotify(postInfo, request);
     }
 
+    /**
+     * <p>出租统一下单入口</p>
+     *
+     * @param request
+     * @throws Exception
+     */
+    @RequestMapping(path = "/tempCarFeeNotifyUrl", method = RequestMethod.POST)
+    public ResponseEntity<String> tempCarFeeNotifyUrl(@RequestBody String postInfo, HttpServletRequest request) {
+        logger.debug("微信支付回调报文" + postInfo);
+
+        return oweFeeToNotifySMOImpl.toNotify(postInfo, request);
+    }
+
     /**
      * <p>支付回调Api</p>
      *

+ 10 - 0
service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java

@@ -31,6 +31,8 @@ public class WechatAuthProperties {
     private String rentingNotifyUrl;
     private String goodsNotifyUrl;
     private String oweFeeNotifyUrl;
+    private String tempCarFeeNotifyUrl;
+
 
     private String wechatAppId;//微信公众号ID
     private String wechatAppSecret;//微信公众号秘钥
@@ -148,4 +150,12 @@ public class WechatAuthProperties {
     public void setGoodsNotifyUrl(String goodsNotifyUrl) {
         this.goodsNotifyUrl = goodsNotifyUrl;
     }
+
+    public String getTempCarFeeNotifyUrl() {
+        return tempCarFeeNotifyUrl;
+    }
+
+    public void setTempCarFeeNotifyUrl(String tempCarFeeNotifyUrl) {
+        this.tempCarFeeNotifyUrl = tempCarFeeNotifyUrl;
+    }
 }

+ 18 - 0
service-api/src/main/java/com/java110/api/smo/payment/ITempCarFeeToNotifySMO.java

@@ -0,0 +1,18 @@
+package com.java110.api.smo.payment;
+
+import org.springframework.http.ResponseEntity;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 房屋租赁微信通知 支付完成
+ */
+public interface ITempCarFeeToNotifySMO {
+
+    /**
+     * 支付完成
+     * @param request
+     * @return
+     */
+    public ResponseEntity<String> toNotify(String param,HttpServletRequest request);
+}

+ 17 - 0
service-api/src/main/java/com/java110/api/smo/payment/IToPayTempCarFeeSMO.java

@@ -0,0 +1,17 @@
+package com.java110.api.smo.payment;
+
+import com.java110.core.context.IPageData;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 统一下单接口类
+ */
+public interface IToPayTempCarFeeSMO {
+
+    /**
+     * 下单
+     * @param pd
+     * @return
+     */
+    public ResponseEntity<String> toPay(IPageData pd);
+}

+ 33 - 0
service-api/src/main/java/com/java110/api/smo/payment/adapt/ITempCarFeeToNotifyAdapt.java

@@ -0,0 +1,33 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.api.smo.payment.adapt;
+
+/**
+ * 房屋租赁 通知
+ */
+public interface ITempCarFeeToNotifyAdapt {
+
+    /**
+     * 通知
+     *
+     * @param param
+     * @return
+     * @throws Exception
+     */
+    String confirmPayFee(String param,String wId);
+
+
+}

+ 197 - 0
service-api/src/main/java/com/java110/api/smo/payment/adapt/wechatPay/WechatTempCarFeeToNotifyAdapt.java

@@ -0,0 +1,197 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.api.smo.payment.adapt.wechatPay;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.properties.WechatAuthProperties;
+import com.java110.api.smo.DefaultAbstractComponentSMO;
+import com.java110.api.smo.payment.adapt.IOweFeeToNotifyAdapt;
+import com.java110.api.smo.payment.adapt.ITempCarFeeToNotifyAdapt;
+import com.java110.core.factory.WechatFactory;
+import com.java110.dto.fee.FeeDto;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.utils.cache.CommonCache;
+import com.java110.utils.constant.CommonConstant;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.PayUtil;
+import com.java110.utils.util.StringUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.*;
+
+/**
+ * 微信通用 支付 通知实现
+ * 此实现方式为 直接调用微信下单方式,不经过 第三方支付平台
+ *
+ * @desc add by 吴学文 15:33
+ */
+
+@Component(value = "wechatTempCarFeeToNotifyAdapt")
+public class WechatTempCarFeeToNotifyAdapt extends DefaultAbstractComponentSMO implements ITempCarFeeToNotifyAdapt {
+
+    private static final Logger logger = LoggerFactory.getLogger(WechatTempCarFeeToNotifyAdapt.class);
+
+    private static final String APP_ID = "992020011134400001";
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Autowired
+    private WechatAuthProperties wechatAuthProperties;
+
+    /**
+     * 预下单
+     *
+     * @param param
+     * @return
+     * @throws Exception
+     */
+    public String confirmPayFee(String param,String wId) {
+        String resXml = "";
+        try {
+            Map<String, Object> map = PayUtil.getMapFromXML(param);
+            logger.info("【小程序支付回调】 回调数据: \n" + map);
+            String returnCode = (String) map.get("return_code");
+            if ("SUCCESS".equalsIgnoreCase(returnCode)) {
+                String returnmsg = (String) map.get("result_code");
+                if ("SUCCESS".equals(returnmsg)) {
+                    //更新数据
+                    int result = confirmPayFee(map);
+                    if (result > 0) {
+                        //支付成功
+                        resXml = "<xml>" + "<return_code><![CDATA[SUCCESS]]></return_code>"
+                                + "<return_msg><![CDATA[OK]]></return_msg>" + "</xml>";
+                    }
+                } else {
+                    resXml = "<xml>" + "<return_code><![CDATA[FAIL]]></return_code>"
+                            + "<return_msg><![CDATA[报文为空]></return_msg>" + "</xml>";
+                    logger.info("支付失败:" + resXml);
+                }
+            } else {
+                resXml = "<xml>" + "<return_code><![CDATA[FAIL]]></return_code>"
+                        + "<return_msg><![CDATA[报文为空]></return_msg>" + "</xml>";
+                logger.info("【订单支付失败】");
+            }
+        } catch (Exception e) {
+            logger.error("通知失败", e);
+            resXml = "<xml>" + "<return_code><![CDATA[FAIL]]></return_code>"
+                    + "<return_msg><![CDATA[鉴权失败]></return_msg>" + "</xml>";
+        }
+
+        return resXml;
+    }
+
+
+    public int confirmPayFee(Map<String, Object> map) {
+        String wId = map.get("wId").toString();
+        wId = wId.replace(" ", "+");
+        SortedMap<String, String> paramMap = new TreeMap<String, String>();
+        ResponseEntity<String> responseEntity = null;
+        for (String key : map.keySet()) {
+            if ("wId".equals(key)) {
+                continue;
+            }
+            paramMap.put(key, map.get(key).toString());
+        }
+        String appId = WechatFactory.getAppId(wId);
+        SmallWeChatDto smallWeChatDto = getSmallWechat(appId);
+
+        if (smallWeChatDto == null) { //从配置文件中获取 小程序配置信息
+            smallWeChatDto = new SmallWeChatDto();
+            smallWeChatDto.setAppId(wechatAuthProperties.getAppId());
+            smallWeChatDto.setAppSecret(wechatAuthProperties.getSecret());
+            smallWeChatDto.setMchId(wechatAuthProperties.getMchId());
+            smallWeChatDto.setPayPassword(wechatAuthProperties.getKey());
+        }
+        String sign = PayUtil.createSign(paramMap, smallWeChatDto.getPayPassword());
+
+        if (!sign.equals(map.get("sign"))) {
+            throw new IllegalArgumentException("鉴权失败");
+        }
+
+        String orderId = map.get("out_trade_no").toString();
+        String order = CommonCache.getAndRemoveValue(FeeDto.REDIS_PAY_TEMP_CAR_FEE + orderId);
+
+        if (StringUtil.isEmpty(order)) {
+            return 1;// 说明已经处理过了 再不处理
+        }
+
+        //查询用户ID
+        JSONObject paramIn = JSONObject.parseObject(order);
+        paramIn.put("oId", orderId);
+        String url = "tempCarFee.notifyTempCarFeeOrder";
+        /**
+         *   postParameters.put("carNum", tempCarPayOrderDto.getCarNum());
+         *         postParameters.put("extPaId", tempCarPayOrderDto.getPaId());
+         *         postParameters.put("orderId", tempCarPayOrderDto.getOrderId());
+         *         postParameters.put("amount", tempCarPayOrderDto.getAmount());
+         *         postParameters.put("payTime", tempCarPayOrderDto.getPayTime());
+         *         postParameters.put("payType", tempCarPayOrderDto.getPayType());
+         */
+        responseEntity = this.callCenterService(getHeaders("-1"), paramIn.toJSONString(), url, HttpMethod.POST);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return 0;
+        }
+        return 1;
+    }
+
+
+
+
+
+    private Map<String, String> getHeaders(String userId) {
+        Map<String, String> headers = new HashMap<>();
+        headers.put(CommonConstant.HTTP_APP_ID.toLowerCase(), APP_ID);
+        headers.put(CommonConstant.HTTP_USER_ID.toLowerCase(), userId);
+        headers.put(CommonConstant.HTTP_TRANSACTION_ID.toLowerCase(), UUID.randomUUID().toString());
+        headers.put(CommonConstant.HTTP_REQ_TIME.toLowerCase(), DateUtil.getDefaultFormateTimeString(new Date()));
+        headers.put(CommonConstant.HTTP_SIGN.toLowerCase(), "");
+        return headers;
+    }
+
+    private SmallWeChatDto getSmallWechat(String appId) {
+
+        ResponseEntity responseEntity = null;
+
+        responseEntity = this.callCenterService(getHeaders("-1"), "",
+                "smallWeChat.listSmallWeChats?appId="
+                        + appId + "&page=1&row=1", HttpMethod.GET);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return null;
+        }
+        JSONObject smallWechatObj = JSONObject.parseObject(responseEntity.getBody().toString());
+        JSONArray smallWeChats = smallWechatObj.getJSONArray("smallWeChats");
+
+        if (smallWeChats == null || smallWeChats.size() < 1) {
+            return null;
+        }
+
+        return BeanConvertUtil.covertBean(smallWeChats.get(0), SmallWeChatDto.class);
+    }
+
+
+}

+ 40 - 0
service-api/src/main/java/com/java110/api/smo/payment/impl/TempCarFeeToNotifySMOImpl.java

@@ -0,0 +1,40 @@
+package com.java110.api.smo.payment.impl;
+
+import com.java110.api.smo.payment.IOweFeeToNotifySMO;
+import com.java110.api.smo.payment.ITempCarFeeToNotifySMO;
+import com.java110.api.smo.payment.adapt.IOweFeeToNotifyAdapt;
+import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.WechatConstant;
+import com.java110.utils.factory.ApplicationContextFactory;
+import com.java110.utils.util.StringUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+
+@Service("oweFeeToNotifySMOImpl")
+public class TempCarFeeToNotifySMOImpl implements ITempCarFeeToNotifySMO {
+    private static final Logger logger = LoggerFactory.getLogger(TempCarFeeToNotifySMOImpl.class);
+
+    private static final String APP_ID = "992020011134400001";
+
+    private static final String DEFAULT_OWE_FEE_TO_NOTIFY_ADAPT = "wechatTempCarFeeToNotifyAdapt";// 默认微信通用支付
+
+
+    @Override
+    public ResponseEntity<String> toNotify(String param, HttpServletRequest request) {
+        String wId = request.getParameter("wId");
+        String payNotifyAdapt = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, WechatConstant.PAY_NOTIFY_ADAPT);
+        payNotifyAdapt = StringUtil.isEmpty(payNotifyAdapt) ? DEFAULT_OWE_FEE_TO_NOTIFY_ADAPT : payNotifyAdapt;
+        //支付适配器
+        IOweFeeToNotifyAdapt tPayNotifyAdapt = ApplicationContextFactory.getBean(payNotifyAdapt, IOweFeeToNotifyAdapt.class);
+        String resXml = tPayNotifyAdapt.confirmPayFee(param,wId);
+        logger.info("【小程序支付回调响应】 响应内容:\n" + resXml);
+        return new ResponseEntity<String>(resXml, HttpStatus.OK);
+    }
+
+
+}

+ 4 - 0
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPayOweFeeSMOImpl.java

@@ -55,6 +55,8 @@ public class ToPayOweFeeSMOImpl extends AppAbstractComponentSMO implements IToPa
         return super.businessProcess(pd);
     }
 
+
+
     @Override
     protected void validate(IPageData pd, JSONObject paramIn) {
 
@@ -155,6 +157,8 @@ public class ToPayOweFeeSMOImpl extends AppAbstractComponentSMO implements IToPa
     }
 
 
+
+
     private SmallWeChatDto getSmallWechat(IPageData pd, JSONObject paramIn) {
 
         ResponseEntity responseEntity = null;

+ 149 - 0
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPayTempCarFeeSMOImpl.java

@@ -0,0 +1,149 @@
+package com.java110.api.smo.payment.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.api.properties.WechatAuthProperties;
+import com.java110.api.smo.AppAbstractComponentSMO;
+import com.java110.api.smo.payment.IToPayTempCarFeeSMO;
+import com.java110.api.smo.payment.adapt.IPayAdapt;
+import com.java110.core.context.IPageData;
+import com.java110.core.context.PageData;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.app.AppDto;
+import com.java110.dto.fee.FeeDto;
+import com.java110.dto.owner.OwnerAppUserDto;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.utils.cache.CommonCache;
+import com.java110.utils.cache.MappingCache;
+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.DateUtil;
+import com.java110.utils.util.StringUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service("toPayOweFeeSMOImpl")
+public class ToPayTempCarFeeSMOImpl extends AppAbstractComponentSMO implements IToPayTempCarFeeSMO {
+    private static final Logger logger = LoggerFactory.getLogger(ToPayTempCarFeeSMOImpl.class);
+
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Autowired
+    private RestTemplate outRestTemplate;
+
+
+    @Autowired
+    private WechatAuthProperties wechatAuthProperties;
+
+    @Override
+    public ResponseEntity<String> toPay(IPageData pd) {
+        return super.businessProcess(pd);
+    }
+
+
+    @Override
+    protected void validate(IPageData pd, JSONObject paramIn) {
+
+        Assert.jsonObjectHaveKey(paramIn, "carNum", "请求报文中未包含房屋信息节点");
+        Assert.jsonObjectHaveKey(paramIn, "appId", "请求报文中未包含appId节点");
+        Assert.jsonObjectHaveKey(paramIn, "openId", "请求报文中未包含openId节点");
+        Assert.jsonObjectHaveKey(paramIn, "paId", "请求报文中未包含paId节点");
+        Assert.jsonObjectHaveKey(paramIn, "inoutId", "请求报文中未包含inoutId节点");
+
+    }
+
+    @Override
+    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) throws Exception {
+
+        ResponseEntity responseEntity = null;
+
+        SmallWeChatDto smallWeChatDto = getSmallWechat(pd, paramIn);
+
+        if (smallWeChatDto == null) { //从配置文件中获取 小程序配置信息
+            smallWeChatDto = new SmallWeChatDto();
+            smallWeChatDto.setAppId(wechatAuthProperties.getAppId());
+            smallWeChatDto.setAppSecret(wechatAuthProperties.getSecret());
+            smallWeChatDto.setMchId(wechatAuthProperties.getMchId());
+            smallWeChatDto.setPayPassword(wechatAuthProperties.getKey());
+        }
+
+
+        //查询用户ID
+        paramIn.put("userId", pd.getUserId());
+        String url = "/tempCarFee.getTempCarFeeOrder?paId=" + paramIn.getString("paId") + "&carNum=" + paramIn.getString("carNum");
+        responseEntity = super.callCenterService(restTemplate, pd, "", url, HttpMethod.GET);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return responseEntity;
+        }
+        JSONObject orderInfo = JSONObject.parseObject(responseEntity.getBody().toString());
+        if (orderInfo.getIntValue("code") != 0) {
+            throw new IllegalArgumentException("缴费失败");
+        }
+        JSONObject fee = orderInfo.getJSONObject("data");
+
+        double money = fee.getDouble("payCharge");
+        String orderId = orderInfo.getString("oId");
+        String openId = paramIn.getString("openId");
+        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.getTempCarFeeNotifyUrl());
+        responseEntity = new ResponseEntity(JSONObject.toJSONString(result), HttpStatus.OK);
+        if (!"0".equals(result.get("code"))) {
+            return responseEntity;
+        }
+        JSONObject saveFees = new JSONObject();
+        saveFees.put("orderId", paramIn.getString("inoutId"));
+        saveFees.put("carNum", paramIn.getString("carNum"));
+        saveFees.put("amount", money);
+        saveFees.put("paId", paramIn.getString("paId"));
+        saveFees.put("payTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        saveFees.put("payType", "2");
+        CommonCache.setValue(FeeDto.REDIS_PAY_TEMP_CAR_FEE + orderId, saveFees.toJSONString(), CommonCache.PAY_DEFAULT_EXPIRE_TIME);
+        return responseEntity;
+    }
+
+
+    private SmallWeChatDto getSmallWechat(IPageData pd, JSONObject paramIn) {
+
+        ResponseEntity responseEntity = null;
+
+        pd = PageData.newInstance().builder(pd.getUserId(), "", "", pd.getReqData(),
+                "", "", "", "",
+                pd.getAppId());
+        responseEntity = this.callCenterService(restTemplate, pd, "",
+                "smallWeChat.listSmallWeChats?appId="
+                        + paramIn.getString("appId") + "&page=1&row=1&communityId=" + paramIn.getString("communityId"), HttpMethod.GET);
+
+        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+            return null;
+        }
+        JSONObject smallWechatObj = JSONObject.parseObject(responseEntity.getBody().toString());
+        JSONArray smallWeChats = smallWechatObj.getJSONArray("smallWeChats");
+
+        if (smallWeChats == null || smallWeChats.size() < 1) {
+            return null;
+        }
+
+        return BeanConvertUtil.covertBean(smallWeChats.get(0), SmallWeChatDto.class);
+    }
+
+
+}

+ 1 - 0
service-api/src/main/resources/wechatAuth.properties

@@ -9,6 +9,7 @@ java110.auth.wechat.wxNotifyUrl=http://www.vipwuye.com/app/payment/notify
 java110.auth.wechat.rentingNotifyUrl=http://www.vipwuye.com/app/payment/rentingNotify
 java110.auth.wechat.goodsNotifyUrl=http://www.vipwuye.com/goods/notify
 java110.auth.wechat.oweFeeNotifyUrl=http://www.vipwuye.com/app/payment/oweFeeNotify
+java110.auth.wechat.tempCarFeeNotifyUrl=http://www.vipwuye.com/app/payment/tempCarFeeNotifyUrl
 
 # ¹«ÖÚºÅÐÅÏ¢
 java110.auth.wechat.wechatAppId=key

+ 42 - 0
service-fee/src/main/java/com/java110/fee/cmd/tempCarFee/NotifyTempCarFeeOrderCmd.java

@@ -0,0 +1,42 @@
+package com.java110.fee.cmd.tempCarFee;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.tempCarFeeConfig.TempCarPayOrderDto;
+import com.java110.fee.bmo.tempCarFee.IGetTempCarFeeRules;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 类表述:通知
+ * 服务编码:tempCarFee.notifyTempCarFeeOrder
+ * 请求路劲:/app/tempCarFee.notifyTempCarFeeOrder
+ * add by 吴学文 at 2021-09-16 22:26:04 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "tempCarFee.notifyTempCarFeeOrder")
+public class NotifyTempCarFeeOrderCmd extends AbstractServiceCmdListener {
+
+    @Autowired
+    private IGetTempCarFeeRules getTempCarFeeRulesImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+        TempCarPayOrderDto tempCarPayOrderDto = BeanConvertUtil.covertBean(reqJson, TempCarPayOrderDto.class);
+        ResponseEntity<String> responseEntity = getTempCarFeeRulesImpl.notifyTempCarFeeOrder(tempCarPayOrderDto);
+        cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 1 - 1
service-job/src/main/java/com/java110/job/adapt/hcIot/NotifyTempCarFeeOrderAdapt.java

@@ -69,7 +69,7 @@ public class NotifyTempCarFeeOrderAdapt extends DatabusAdaptImpl {
         JSONObject postParameters = new JSONObject();
         postParameters.put("taskId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_machineTranslateId));
         postParameters.put("carNum", tempCarPayOrderDto.getCarNum());
-        postParameters.put("extPaId", tempCarPayOrderDto.getExtPaId());
+        postParameters.put("extPaId", tempCarPayOrderDto.getPaId());
         postParameters.put("orderId", tempCarPayOrderDto.getOrderId());
         postParameters.put("amount", tempCarPayOrderDto.getAmount());
         postParameters.put("payTime", tempCarPayOrderDto.getPayTime());