ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/CallBackController.java
File was deleted ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -528,7 +528,7 @@ req.setSubject("充电充值"); req.setBuyerOpenId(appUser.getAliOpenid()); req.setBody("充电充值"); req.setNotifyUrl("/payment/callBack/ali/all"); req.setNotifyUrl("/payment/ali/callBack"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ return AjaxResult.success(data); @@ -958,10 +958,7 @@ Integer m = Integer.valueOf(data.getCumulative_charging_time() % 60); chargingDetails.setChargedTime(String.format("%02d", h) + ":" + String.format("%02d", m)); } //转换成UTC时间 ChargingHandshake chargingHandshake = chargingHandshakeClient.getDataByOrderCode(one.getCode()).getData(); if(null != chargingHandshake && null != data && null != one.getAppUserCarId()){ BigDecimal bms_battery_capacity = chargingHandshake.getBms_battery_capacity(); if(null != data && null != one.getAppUserCarId()){ TAppUserCar appUserCar = appUserCarClient.getCarByIds(Arrays.asList(one.getAppUserCarId())).getData().get(0); // 续航 = 续航里程 * soc BigDecimal multiply = new BigDecimal(data.getSoc() / 100).multiply(new BigDecimal(appUserCar.getEndurance())); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -373,7 +373,7 @@ req.setSubject("购买商品"); req.setBuyerOpenId(user.getAliOpenid()); req.setBody("购买商品"); req.setNotifyUrl("/payment/callBack/ali/all"); req.setNotifyUrl("/payment/ali/callBack"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ data.setOrderId(shopOrder.getId().toString()); ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TVipServiceImpl.java
@@ -132,7 +132,7 @@ req.setSubject("充电充值"); req.setBuyerOpenId(user.getAliOpenid()); req.setBody("充电充值"); req.setNotifyUrl("/payment/callBack/ali/all"); req.setNotifyUrl("/payment/ali/callBack"); AliPaymentResp data = aliPaymentClient.payment(req).getData(); if(null != data){ return AjaxResult.success(data); ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/config/AliProperties.java
@@ -3,6 +3,7 @@ import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; /** @@ -11,6 +12,7 @@ */ @Data @Component @Configuration @ConfigurationProperties(prefix = "payment.ali") public class AliProperties { /** ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java
@@ -64,7 +64,7 @@ AlipayTradeCreateResponse response = alipayClient.execute(request); log.info("-----调起支付宝支付-----"); log.info("请求参数:{}", pojo); log.info("请求参数:{}", JSON.toJSONString(request)); log.info("返回结果:{}", response.getBody()); if (response.isSuccess()) { return PaymentResp.build(response.getOutTradeNo(), response.getTradeNo()); ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/AliPayController.java
@@ -46,7 +46,6 @@ if(null != payment){ AliPaymentResp aliPaymentResp = new AliPaymentResp(); aliPaymentResp.setTradeNo(payment.getTradeNo()); aliPaymentResp.setNotifyUrl(aliProperties.getNotifyUrl()); return R.ok(aliPaymentResp); } return R.ok(); @@ -95,7 +94,7 @@ @Resource private ChargingOrderClient chargingOrderClient; @ResponseBody @PostMapping(value = "/all") @PostMapping(value = "/callBack") public void chargingOrderALICallback(@RequestBody AliQueryOrder aliQueryOrder, HttpServletResponse response) { try { String out_trade_no = aliQueryOrder.getOutTradeNo();