liujie
2 天以前 04fac4cee44e51b9bd5e079990566836a64670ae
Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev
6个文件已修改
225 ■■■■ 已修改文件
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/governmentCloud/UploadDataTaskUtil.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/rocket/produce/ChargingMessageListener.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/H5PayUtil.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/H5AliPayController.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/governmentCloud/UploadDataTaskUtil.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.integration.api.model.*;
import com.ruoyi.jianguan.mongodb.service.*;
@@ -38,7 +39,7 @@
    /**
     * 每天的9点执行的任务
     */
    @Scheduled(cron = "0 0 16 * * *")
    @Scheduled(cron = "0 0 10 * * *")
//    @Scheduled(fixedRate = 60000)
    public void taskDay(){
        try {
@@ -91,12 +92,12 @@
            customthreadPoolExecutor.execute(() -> {
                if (uploadRealTimeMonitoringDataList != null && uploadRealTimeMonitoringDataList.size() > 0) {
                    for (UploadRealTimeMonitoringData uploadRealTimeMonitoringData : uploadRealTimeMonitoringDataList) {
                        log.info("线程:{},办理业务", Thread.currentThread().getName());
                        JSONObject jsonObject = new JSONObject();
                        jsonObject.put("device_code", uploadRealTimeMonitoringData.getCharging_pile_code());
                        jsonObject.put("report_time", System.currentTimeMillis());
                        jsonObject.put("properties", uploadRealTimeMonitoringData);
                        mqttPushUtil.pushChargePileData(TopicConstants.CHARGE_PILE_CODE.replace("CHARGE_PILE_CODE", uploadRealTimeMonitoringData.getCharging_pile_code()), jsonObject.toJSONString());
                        R<String> chargePileCode = mqttPushUtil.pushChargePileData(TopicConstants.CHARGE_PILE_CODE.replace("CHARGE_PILE_CODE", uploadRealTimeMonitoringData.getCharging_pile_code()), jsonObject.toJSONString());
                        log.info("返回结果:{}", chargePileCode.getData());
                        log.info("数据:{}", uploadRealTimeMonitoringData.getCharging_pile_code());
                        log.info("数据:{}", jsonObject.toJSONString());
                    }
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/rocket/produce/ChargingMessageListener.java
@@ -223,6 +223,8 @@
                    JSONObject jsonObject = new JSONObject();
                    jsonObject.put("StartChargeSeq",chargingOrder2.getCode());
                    jsonObject.put("ConnectorID",chargingGun2.getFullNumber());
                    LocalDateTime startTime = chargingOrder2.getStartTime();
                    //状态(0=未知,1=等待中/已插枪,2=启动中,3=充电中,4=停止中,5=已结束)
                    int tempStatus = 0;
                    switch (chargingOrder2.getStatus()){
@@ -232,7 +234,18 @@
                        case 2:
                            tempStatus=1;
                            jsonObject.put("StartChargeSeqStat",tempStatus);
                            LocalDateTime startTime = chargingOrder2.getStartTime();
                            if (startTime!=null){
                                jsonObject.put("StartTime",startTime.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }else{
                                LocalDateTime now = LocalDateTime.now();
                                // 转化为yyyy-MM-dd HH:mm:ss格式字符串
                                jsonObject.put("StartTime",now.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }
                            chuanYiChongSuperviseUtil.notificationStationStatus(new Operator(), jsonObject);
                            break;
                        case 3:
                            tempStatus=2;
                            jsonObject.put("StartChargeSeqStat",tempStatus);
                            if (startTime!=null){
                                jsonObject.put("StartTime",startTime.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }else{
@@ -243,7 +256,17 @@
                            chuanYiChongSuperviseUtil.notificationStationStatus(new Operator(), jsonObject);
                            break;
                        case 4:
                            tempStatus=3;
                            jsonObject.put("StartChargeSeqStat",tempStatus);
                            if (startTime!=null){
                                jsonObject.put("StartTime",startTime.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }else{
                                LocalDateTime now = LocalDateTime.now();
                                // 转化为yyyy-MM-dd HH:mm:ss格式字符串
                                jsonObject.put("StartTime",now.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
                            }
                            chuanYiChongSuperviseUtil.notificationStationStatus(new Operator(), jsonObject);
                            break;
                        case 5:
                            jsonObject.put("StartChargeSeqStat",4);
                            int temp = 0;
ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java
@@ -81,6 +81,7 @@
import com.ruoyi.other.api.vo.GovernmentCloudOtherVO;
import com.ruoyi.system.api.feignClient.JianGuanSystemClient;
import com.ruoyi.system.api.vo.GovernmentCloudSystemVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -94,6 +95,7 @@
 * @date 2023/7/11 8:39
 */
@Component
@Slf4j
public class GovernmentCloudTask {
@@ -275,49 +277,67 @@
    private JianGuanSystemClient  jianGuanSystemClient;
    // 每天早上9点执行的定时任务
    @Scheduled(cron = "0 0 9 * * ?")
    @Scheduled(cron = "0 0 16 * * ?")
    public void taskMonth() {
        System.err.println("传数据");
        // account服务
        GovernmentCloudAccountVO data = jianGuanAccountClient.listAll().getData();
        if (data != null) {
            List<TAppCoupon> appCoupons = data.getAppCoupons();
            if (!appCoupons.isEmpty()) {
                log.info("用户优惠券"+appCoupons);
                appCouponService.saveBatch(appCoupons);
            }
            List<TAppUser> appUsers = data.getAppUsers();
            if (!appUsers.isEmpty()) {
                log.info("用户"+appUsers);
                appUserService.saveBatch(appUsers);
            }
            List<TAppUserAddress> appUserAddresses = data.getAppUserAddresses();
            if (!appUserAddresses.isEmpty()) {
                log.info("用户地址"+appUserAddresses);
                appUserAddressService.saveBatch(appUserAddresses);
            }
            List<TAppUserCar> appUserCars = data.getAppUserCars();
            if (!appUserCars.isEmpty()) {
                log.info("用户车辆"+appUserCars);
                appUserCarService.saveBatch(appUserCars);
            }
            List<TAppUserIntegralChange> appUserIntegralChanges = data.getAppUserIntegralChanges();
            if (!appUserIntegralChanges.isEmpty()) {
                log.info("用户积分变动"+appUserIntegralChanges);
                appUserIntegralChangeService.saveBatch(appUserIntegralChanges);
            }
            List<TAppUserSign> appUserSigns = data.getAppUserSigns();
            if (!appUserSigns.isEmpty()) {
                log.info("用户签到"+appUserSigns);
                appUserSignService.saveBatch(appUserSigns);
            }
            List<TAppUserTag> appUserTags = data.getAppUserTags();
            if (!appUserTags.isEmpty()) {
                log.info("用户标签"+appUserTags);
                appUserTagService.saveBatch(appUserTags);
            }
            List<TAppUserVipDetail> appUserVipDetails = data.getAppUserVipDetails();
            if (!appUserVipDetails.isEmpty()) {
                log.info("用户会员明细"+appUserVipDetails);
                appUserVipDetailService.saveBatch(appUserVipDetails);
            }
            List<TInviteUser> inviteUsers = data.getInviteUsers();
            if (!inviteUsers.isEmpty()) {
                log.info("邀请用户"+inviteUsers);
                inviteUserService.saveBatch(inviteUsers);
            }
            List<TInvoiceInformation> invoiceInformations = data.getInvoiceInformations();
            if (!invoiceInformations.isEmpty()) {
                log.info("开票"+invoiceInformations);
                tInvoiceInformationService.saveBatch(invoiceInformations);
            }
        }
@@ -326,54 +346,80 @@
        if (data1 != null) {
            List<Partner> partners = data1.getPartners();
            if (!partners.isEmpty()) {
                log.info("合作商"+partners);
                partnerService.saveBatch(partners);
            }
            List<Site> sites = data1.getSites();
            if (!sites.isEmpty()) {
                log.info("站点"+sites);
                siteService.saveBatch(sites);
            }
            List<TAccountingStrategy> accountingStrategies = data1.getAccountingStrategies();
            if (!accountingStrategies.isEmpty()) {
                log.info("策略"+accountingStrategies);
                accountingStrategyService.saveBatch(accountingStrategies);
            }
            List<TAccountingStrategyDetail> accountingStrategyDetails = data1.getAccountingStrategyDetails();
            if (!accountingStrategyDetails.isEmpty()) {
                log.info("策略明细"+accountingStrategyDetails);
                accountingStrategyDetailService.saveBatch(accountingStrategyDetails);
            }
            List<TApplyChargingPile> applyChargingPiles = data1.getApplyChargingPiles();
            if (!applyChargingPiles.isEmpty()) {
                log.info("申请充电桩"+applyChargingPiles);
                applyChargingPileService.saveBatch(applyChargingPiles);
            }
            List<TCarport> carports = data1.getCarports();
            if (!carports.isEmpty()) {
                log.info("停车场"+carports);
                carportService.saveBatch(carports);
            }
            List<TChargingGun> chargingGuns = data1.getChargingGuns();
            if (!chargingGuns.isEmpty()) {
                log.info("充电枪"+chargingGuns);
                chargingGunService.saveBatch(chargingGuns);
            }
            List<TChargingPile> chargingPiles = data1.getChargingPiles();
            if (!chargingPiles.isEmpty()) {
                log.info("充电桩"+chargingPiles);
                chargingPileService.saveBatch(chargingPiles);
            }
            List<TChargingPileNotification> chargingPileNotifications = data1.getChargingPileNotifications();
            if (!chargingPileNotifications.isEmpty()) {
                log.info("通知"+chargingPileNotifications);
                chargingPileNotificationService.saveBatch(chargingPileNotifications);
            }
            List<TFaultMessage> faultMessages = data1.getFaultMessages();
            if (!faultMessages.isEmpty()) {
                log.info("故障"+faultMessages);
                faultMessageService.saveBatch(faultMessages);
            }
            List<TMonitoringEquipment> monitoringEquipments = data1.getMonitoringEquipments();
            if (!monitoringEquipments.isEmpty()) {
                log.info("监控设备"+monitoringEquipments);
                monitoringEquipmentService.saveBatch(monitoringEquipments);
            }
            List<TParkingLot> parkingLots = data1.getParkingLots();
            if (!parkingLots.isEmpty()) {
                log.info("停车场"+parkingLots);
                parkingLotService.saveBatch(parkingLots);
            }
            List<TParkingRecord> parkingRecords = data1.getParkingRecords();
            if (!parkingRecords.isEmpty()) {
                log.info("停车记录"+parkingRecords);
                parkingRecordService.saveBatch(parkingRecords);
            }
//            List<TPartnerSite> partnerSites = data1.getPartnerSites();
@@ -382,6 +428,8 @@
//            }
            List<TRepair> repairs = data1.getRepairs();
            if (!repairs.isEmpty()) {
                log.info("报修"+repairs);
                repairService.saveBatch(repairs);
            }
//            List<TSiteMenu> siteMenus = data1.getSiteMenus();
@@ -390,6 +438,8 @@
//            }
            List<TVehicleRamp> vehicleRamps = data1.getVehicleRamps();
            if (!vehicleRamps.isEmpty()) {
                log.info("车道"+vehicleRamps);
                vehicleRampService.saveBatch(vehicleRamps);
            }
        }
@@ -400,74 +450,110 @@
        if (data2 != null) {
            List<AccountingStrategyDetailOrder> accountingStrategyDetailOrders = data2.getAccountingStrategyDetailOrders();
            if (!accountingStrategyDetailOrders.isEmpty()) {
                log.info("订单明细策略"+accountingStrategyDetailOrders);
                accountingStrategyDetailOrderService.saveBatch(accountingStrategyDetailOrders);
            }
            List<AccountingStrategyOrder> accountingStrategyOrders = data2.getAccountingStrategyOrders();
            if (!accountingStrategyOrders.isEmpty()) {
                log.info("订单策略"+accountingStrategyOrders);
                accountingStrategyOrderService.saveBatch(accountingStrategyOrders);
            }
            List<TChargingBill> chargingBills = data2.getChargingBills();
            if (!chargingBills.isEmpty()) {
                log.info("账单"+chargingBills);
                chargingBillService.saveBatch(chargingBills);
            }
            List<TChargingOrder> chargingOrders = data2.getChargingOrders();
            if (!chargingOrders.isEmpty()) {
                log.info("充电订单"+chargingOrders);
                chargingOrderService.saveBatch(chargingOrders);
            }
            List<TChargingOrderAccountingStrategy> chargingOrderAccountingStrategies = data2.getChargingOrderAccountingStrategies();
            if (!chargingOrderAccountingStrategies.isEmpty()) {
                log.info("充电订单策略"+chargingOrderAccountingStrategies);
                chargingOrderAccountingStrategyService.saveBatch(chargingOrderAccountingStrategies);
            }
            List<TChargingOrderRefund> chargingOrderRefunds = data2.getChargingOrderRefunds();
            if (!chargingOrderRefunds.isEmpty()) {
                log.info("充电订单退款"+chargingOrderRefunds);
                chargingOrderRefundService.saveBatch(chargingOrderRefunds);
            }
            List<TExchangeOrder> exchangeOrders = data2.getExchangeOrders();
            if (!exchangeOrders.isEmpty()) {
                log.info("兑换订单"+exchangeOrders);
                exchangeOrderService.saveBatch(exchangeOrders);
            }
            List<TGrantVip> grantVips = data2.getGrantVips();
            if (!grantVips.isEmpty()) {
                log.info("赠送vip"+grantVips);
                grantVipService.saveBatch(grantVips);
            }
            List<TOrderAppeal> orderAppeals = data2.getOrderAppeals();
            if (!orderAppeals.isEmpty()) {
                log.info("订单申诉"+orderAppeals);
                orderAppealService.saveBatch(orderAppeals);
            }
            List<TOrderEvaluate> orderEvaluates = data2.getOrderEvaluates();
            if (!orderEvaluates.isEmpty()) {
                log.info("订单评价"+orderEvaluates);
                orderEvaluateService.saveBatch(orderEvaluates);
            }
            List<TOrderEvaluateTag> orderEvaluateTags = data2.getOrderEvaluateTags();
            if (!orderEvaluateTags.isEmpty()) {
                log.info("订单评价标签"+orderEvaluateTags);
                orderEvaluateTagService.saveBatch(orderEvaluateTags);
            }
            List<TOrderInvoice> orderInvoices = data2.getOrderInvoices();
            if (!orderInvoices.isEmpty()) {
                log.info("订单开票"+orderInvoices);
                orderInvoiceService.saveBatch(orderInvoices);
            }
            List<TOrderInvoiceDetail> orderInvoiceDetails = data2.getOrderInvoiceDetails();
            if (!orderInvoiceDetails.isEmpty()) {
                log.info("订单开票明细"+orderInvoiceDetails);
                orderInvoiceDetailService.saveBatch(orderInvoiceDetails);
            }
            List<TSettlementConfirm> settlementConfirms = data2.getSettlementConfirms();
            if (!settlementConfirms.isEmpty()) {
                log.info("账单结算"+settlementConfirms);
                settlementConfirmService.saveBatch(settlementConfirms);
            }
            List<TShoppingOrder> shoppingOrders = data2.getShoppingOrders();
            if (!shoppingOrders.isEmpty()) {
                log.info("购物订单"+shoppingOrders);
                shoppingOrderService.saveBatch(shoppingOrders);
            }
            List<TShoppingOrderRefund> shoppingOrderRefunds = data2.getShoppingOrderRefunds();
            if (!shoppingOrderRefunds.isEmpty()) {
                log.info("购物订单退款"+shoppingOrderRefunds);
                shoppingOrderRefundService.saveBatch(shoppingOrderRefunds);
            }
            List<TVipOrder> vipOrders = data2.getVipOrders();
            if (!vipOrders.isEmpty()) {
                log.info("会员订单"+vipOrders);
                vipOrderService.saveBatch(vipOrders);
            }
            List<TVipOrderRefund> vipOrderRefunds = data2.getVipOrderRefunds();
            if (!vipOrderRefunds.isEmpty()) {
                log.info("会员订单退款"+vipOrderRefunds);
                vipOrderRefundService.saveBatch(vipOrderRefunds);
            }
        }
@@ -476,62 +562,89 @@
        if (data3 != null) {
            List<Operator> operators = data3.getOperators();
            if (!operators.isEmpty()) {
                log.info("运营商"+operators);
                operatorService.saveOrUpdateBatch(operators);
            }
            List<TActivity> activities = data3.getActivities();
            if (!activities.isEmpty()) {
                log.info("活动"+activities);
                activityService.saveBatch(activities);
            }
            List<TAdvertising> advertisings = data3.getAdvertisings();
            if (!advertisings.isEmpty()) {
                log.info("广告"+advertisings);
                advertisingService.saveBatch(advertisings);
            }
            List<TCompany> companies = data3.getCompanies();
            if (!companies.isEmpty()) {
                log.info("公司"+companies);
                companyService.saveBatch(companies);
            }
            List<TCoupon> coupons = data3.getCoupons();
            if (!coupons.isEmpty()) {
                log.info("优惠券"+coupons);
                couponService.saveBatch(coupons);
            }
            List<TEnterpriseUserApplication> enterpriseUserApplications = data3.getEnterpriseUserApplications();
            if (!enterpriseUserApplications.isEmpty()) {
                log.info("公司申请"+enterpriseUserApplications);
                enterpriseUserApplicationService.saveBatch(enterpriseUserApplications);
            }
            List<TEvaluationTag> evaluationTags = data3.getEvaluationTags();
            if (!evaluationTags.isEmpty()) {
                log.info("评价标签"+evaluationTags);
                evaluationTagService.saveBatch(evaluationTags);
            }
            List<TGoods> goods = data3.getGoods();
            if (!goods.isEmpty()) {
                log.info("商品"+goods);
                goodsService.saveBatch(goods);
            }
            List<THtml> htmls = data3.getHtmls();
            if (!htmls.isEmpty()) {
                log.info("html"+htmls);
                htmlService.saveOrUpdateBatch(htmls);
            }
            List<TIntegralRule> integralRules = data3.getIntegralRules();
            if (!integralRules.isEmpty()) {
                log.info("积分规则"+integralRules);
                integralRuleService.saveBatch(integralRules);
            }
            List<TInvoiceType> invoiceTypes = data3.getInvoiceTypes();
            if (!invoiceTypes.isEmpty()) {
                log.info("开票类型"+invoiceTypes);
                invoiceTypeService.saveBatch(invoiceTypes);
            }
            List<TNotice> notices = data3.getNotices();
            if (!notices.isEmpty()) {
                log.info("通知"+notices);
                noticeService.saveBatch(notices);
            }
            List<TSystemConfiguration> systemConfigurations = data3.getSystemConfigurations();
            if (!systemConfigurations.isEmpty()) {
                log.info("系统设置"+systemConfigurations);
                systemConfigurationService.saveOrUpdateBatch(systemConfigurations);
            }
            List<TUserTag> userTags = data3.getUserTags();
            if (!userTags.isEmpty()) {
                log.info("用户标签"+userTags);
                userTagService.saveBatch(userTags);
            }
            List<TVip> vips = data3.getVips();
            if (!vips.isEmpty()) {
                log.info("会员"+vips);
                vipService.saveBatch(vips);
            }
        }
@@ -539,18 +652,22 @@
        if (data4 != null) {
            List<SysLoginLog> loginLogs = data4.getLoginLogs();
            if (!loginLogs.isEmpty()) {
                log.info("登录日志"+loginLogs);
                sysLoginLogService.saveBatch(loginLogs);
            }
            List<SysOperLog> sysOperLogs = data4.getSysOperLogs();
            if (!sysOperLogs.isEmpty()) {
                log.info("操作日志"+sysOperLogs);
                sysOperLogService.saveBatch(sysOperLogs);
            }
            List<SysRole> sysRoles = data4.getSysRoles();
            if (!sysRoles.isEmpty()) {
                log.info("角色"+sysRoles);
                sysRoleService.saveBatch(sysRoles);
            }
            List<SysUser> sysUsers = data4.getSysUsers();
            if (!sysUsers.isEmpty()) {
                log.info("系统用户"+sysUsers);
                sysUserService.saveBatch(sysUsers);
            }
        }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java
@@ -1026,7 +1026,7 @@
            }
            if(3 == rechargePaymentType){
                RefundReq dto = new RefundReq();
                dto.setOutTradeNo(chargingOrder.getCode());
                dto.setOutTradeNo(chargingOrder.getRechargeSerialNumber());
                dto.setOutRequestNo(chargingOrderRefund.getCode());
                dto.setRefundAmount(rechargeAmount.toString());
                dto.setRefundReason("充电失败,取消充电订单");
@@ -1123,7 +1123,7 @@
            }
            if(3 == rechargePaymentType){
                RefundReq dto = new RefundReq();
                dto.setOutTradeNo(chargingOrder.getCode());
                dto.setOutTradeNo(chargingOrder.getRechargeSerialNumber());
                dto.setOutRequestNo(chargingOrderRefund.getCode());
                dto.setRefundAmount(money.toString());
                dto.setRefundReason("充电完成退款");
@@ -2723,7 +2723,7 @@
                }
                if(3 == rechargePaymentType){
                    RefundReq dto = new RefundReq();
                    dto.setOutTradeNo(chargingOrder.getCode());
                    dto.setOutTradeNo(chargingOrder.getRechargeSerialNumber());
                    dto.setOutRequestNo(chargingOrderRefund.getRefundCode());
                    dto.setRefundAmount(refundAmount.toString());
                    dto.setRefundReason("充电完成退款");
@@ -2936,7 +2936,7 @@
                }
                if(3 == tChargingOrder.getRechargePaymentType()){
                    RefundReq dto = new RefundReq();
                    dto.setOutTradeNo(tChargingOrder.getCode());
                    dto.setOutTradeNo(tChargingOrder.getRechargeSerialNumber());
                    dto.setOutRequestNo(tChargingOrder.getCode());
                    dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString());
                    dto.setRefundReason("取消订单");
@@ -3016,20 +3016,20 @@
                        shoppingOrderRefundService.save(chargingOrderRefund);
                    }
                }
                if(3 == tChargingOrder.getPaymentType()){
                    RefundReq dto = new RefundReq();
                    dto.setOutTradeNo(tChargingOrder.getCode());
                    dto.setOutRequestNo(tChargingOrder.getCode());
                    dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString());
                    dto.setRefundReason("取消订单");
                    RefundResp resp = h5AliPaymentClient.refund(dto).getData();
                    if(null != resp){
                        tChargingOrder.setRefundStatus(2);
                        tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
                        shoppingOrderService.updateById(tChargingOrder);
                        shoppingOrderRefundService.save(chargingOrderRefund);
                    }
                }
//                if(3 == tChargingOrder.getPaymentType()){
//                    RefundReq dto = new RefundReq();
//                    dto.setOutTradeNo(tChargingOrder.getCode());
//                    dto.setOutRequestNo(tChargingOrder.getCode());
//                    dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString());
//                    dto.setRefundReason("取消订单");
//                    RefundResp resp = h5AliPaymentClient.refund(dto).getData();
//                    if(null != resp){
//                        tChargingOrder.setRefundStatus(2);
//                        tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
//                        shoppingOrderService.updateById(tChargingOrder);
//                        shoppingOrderRefundService.save(chargingOrderRefund);
//                    }
//                }
            }
@@ -3095,20 +3095,20 @@
                    vipOrderRefundService.save(chargingOrderRefund);
                }
            }
            if(3 == tChargingOrder.getPaymentType()){
                RefundReq dto = new RefundReq();
                dto.setOutTradeNo(tChargingOrder.getCode());
                dto.setOutRequestNo(tChargingOrder.getCode());
                dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString());
                dto.setRefundReason("取消订单");
                RefundResp resp = h5AliPaymentClient.refund(dto).getData();
                if(null != resp){
                    tChargingOrder.setRefundStatus(2);
                    tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
                    vipOrderService.updateById(tChargingOrder);
                    vipOrderRefundService.save(chargingOrderRefund);
                }
            }
//            if(3 == tChargingOrder.getPaymentType()){
//                RefundReq dto = new RefundReq();
//                dto.setOutTradeNo(tChargingOrder.getCode());
//                dto.setOutRequestNo(tChargingOrder.getCode());
//                dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString());
//                dto.setRefundReason("取消订单");
//                RefundResp resp = h5AliPaymentClient.refund(dto).getData();
//                if(null != resp){
//                    tChargingOrder.setRefundStatus(2);
//                    tChargingOrder.setRefundAmount((tChargingOrder.getRefundAmount()==null? BigDecimal.valueOf(0) :tChargingOrder.getRefundAmount()).add(payOrderQueryDto.getRefundAmount()));
//                    vipOrderService.updateById(tChargingOrder);
//                    vipOrderRefundService.save(chargingOrderRefund);
//                }
//            }
        }
        return R.ok();
    }
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/H5PayUtil.java
@@ -146,7 +146,7 @@
        //切记alipaypublickey是支付宝的公钥,请去open.alipay.com对应应用下查看。
        //boolean AlipaySignature.rsaCheckV1(Map<String, String> params, String publicKey, String charset, String sign_type)
        Map<String, String> map = new HashMap<>();
        System.err.println("返回码"+params);
        System.err.println("H5返回码"+params);
        if (params.get("trade_status").equals("TRADE_SUCCESS")){
            String out_trade_no = params.get("out_trade_no");
            String subject = params.get("subject");
@@ -158,7 +158,6 @@
            map.put("total_amount", total_amount);
            map.put("trade_no", trade_no);//支付宝交易号
            map.put("passback_params", passback_params);//回传参数
            System.err.println("回调map");
            return map;
        }else{
            return null;
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/controller/H5AliPayController.java
@@ -9,6 +9,7 @@
import com.ruoyi.payment.api.model.RefundResp;
import com.ruoyi.payment.api.vo.AliPaymentReq;
import com.ruoyi.payment.api.vo.AliQueryOrder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
@@ -22,6 +23,7 @@
 * @author zhibing.pu
 * @Date 2024/8/24 14:29
 */
@Slf4j
@RestController
@RequestMapping("/aliH5")
public class H5AliPayController {
@@ -92,6 +94,7 @@
    public void chargingOrderALICallback(HttpServletRequest request, HttpServletResponse response) {
        try {
            Map<String, String> callback = h5PayUtil.alipayCallback(request);
            log.info("H5支付回调:{}", callback);
            if(null != callback){
                String out_trade_no = callback.get("out_trade_no");
                String attach = callback.get("subject");
@@ -101,7 +104,7 @@
                switch (substring){
                    case "CD":
                        chargingOrderClient.chargingOrderALIH5Callback(out_trade_no, transaction_id, attach);
                        System.err.println("----充电支付回调");
                        System.err.println("----H5充电支付回调");
                        break;
                }
                PrintWriter writer = response.getWriter();