java110
2022-02-25 8a2a463d46b3dce73015462c9f6a2a258dd25f5b
service-api/src/main/java/com/java110/api/smo/payment/impl/ToPayTempCarFeeSMOImpl.java
@@ -23,8 +23,9 @@
import com.java110.utils.util.BeanConvertUtil;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@@ -32,10 +33,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.*;
@Service("toPayTempCarFeeSMOImpl")
public class ToPayTempCarFeeSMOImpl extends AppAbstractComponentSMO implements IToPayTempCarFeeSMO {
@@ -69,6 +67,7 @@
        Assert.jsonObjectHaveKey(paramIn, "openId", "请求报文中未包含openId节点");
        Assert.jsonObjectHaveKey(paramIn, "paId", "请求报文中未包含paId节点");
        Assert.jsonObjectHaveKey(paramIn, "inoutId", "请求报文中未包含inoutId节点");
        Assert.jsonObjectHaveKey(paramIn, "couponList", "请求报文中未包含couponList节点");
    }
@@ -86,11 +85,16 @@
            smallWeChatDto.setMchId(wechatAuthProperties.getMchId());
            smallWeChatDto.setPayPassword(wechatAuthProperties.getKey());
        }
        JSONArray couponList = paramIn.getJSONArray("couponList");
        List<String> couponIds = new ArrayList<String>();
        if (couponList != null && couponList.size() > 0) {
            for (int couponIndex = 0; couponIndex < couponList.size(); couponIndex++) {
                couponIds.add(couponList.getJSONObject(couponIndex).getString("couponId"));
            }
        }
        //查询用户ID
        paramIn.put("userId", pd.getUserId());
        String url = "tempCarFee.getTempCarFeeOrder?paId=" + paramIn.getString("paId") + "&carNum=" + paramIn.getString("carNum");
        String url = "tempCarFee.queryTempCarFeeOrder?paId=" + paramIn.getString("paId") + "&carNum=" + paramIn.getString("carNum")+"&couponIds="+StringUtils.join(couponIds,",");
        responseEntity = super.callCenterService(restTemplate, pd, "", url, HttpMethod.GET);
        if (responseEntity.getStatusCode() != HttpStatus.OK) {