Pu Zhibing
2024-10-24 18d2ac4785e5ff819fe077bdd4eb4ee9731ab454
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -92,7 +92,8 @@
    private TokenService tokenService;
    @Autowired
    private TOrderEvaluateService orderEvaluateService;
    @Autowired
    private TGrantVipService tGrantVipService;
    @Resource
    private WxPaymentClient wxPaymentClient;
    
@@ -133,6 +134,15 @@
    @Resource
    private TOrderInvoiceService invoiceService;
    /**
     * 远程调用 增加管理后台赠送会员记录
     * @return
     */
    @ResponseBody
    @PostMapping(value = "/management/give/vip")
    public R managementGiveVip(@RequestBody TGrantVip grantVip) {
        return R.ok(tGrantVipService.save(grantVip));
    }
    /**
     * 远程调用根据枪id 查询最新的订单id 用户后台结束充电
@@ -333,7 +343,7 @@
        chargingOrderInfoVO.setSurplus(byId.getTotalElectricity()!=null?byId.getTotalElectricity().setScale(2, BigDecimal.ROUND_HALF_DOWN)+"":"");
        chargingOrderInfoVO.setTotalPower(byId.getPower()!=null?byId.getPower().setScale(2, BigDecimal.ROUND_HALF_DOWN)+"":"");
        if (byId.getAppUserCarId()!=null){
            List<TAppUserCar> data = appUserCarClient.getCarByIds(Collections.singletonList(byId.getAppUserCarId())).getData();
            List<TAppUserCar> data = appUserCarClient.getCarByIds(Arrays.asList(byId.getAppUserCarId())).getData();
            if (!data.isEmpty()){
                chargingOrderInfoVO.setLicensePlate(data.get(0).getLicensePlate());
                chargingOrderInfoVO.setVehicleBrand(data.get(0).getVehicleBrand());