| | |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.front.properties.WechatAuthProperties; |
| | | import com.java110.front.smo.payment.adapt.IPayNotifyAdapt; |
| | | import com.java110.front.smo.payment.adapt.IOweFeeToNotifyAdapt; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | |
| | | */ |
| | | |
| | | @Component(value = "fuiouOweFeeToNotifyAdapt") |
| | | public class FuiouOweFeeToNotifyAdapt implements IPayNotifyAdapt { |
| | | public class FuiouOweFeeToNotifyAdapt implements IOweFeeToNotifyAdapt { |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(FuiouOweFeeToNotifyAdapt.class); |
| | | |
| | |
| | | //查询用户ID |
| | | JSONObject paramIn = JSONObject.parseObject(order); |
| | | paramIn.put("oId", orderId); |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/feeApi/payOweFee"; |
| | | freshFees(paramIn); |
| | | String url = ServiceConstant.SERVICE_API_URL + "/api/fee.payOweFee"; |
| | | responseEntity = this.callCenterService(restTemplate, "-1", paramIn.toJSONString(), url, HttpMethod.POST); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | } |
| | | |
| | | |
| | | private void freshFees(JSONObject paramIn) { |
| | | if (!paramIn.containsKey("fees")) { |
| | | return; |
| | | } |
| | | |
| | | JSONArray fees = paramIn.getJSONArray("fees"); |
| | | JSONObject fee = null; |
| | | for (int feeIndex = 0; feeIndex < fees.size(); feeIndex++) { |
| | | fee = fees.getJSONObject(feeIndex); |
| | | if (fee.containsKey("deadlineTime")) { |
| | | fee.put("startTime", fee.getString("endTime")); |
| | | fee.put("endTime", fee.getString("deadlineTime")); |
| | | fee.put("receivedAmount", fee.getString("feePrice")); |
| | | fee.put("state", ""); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 调用中心服务 |
| | | * |