Pu Zhibing
7 天以前 6e0bccef16f74b5aa80eb51d7792a36ed7e20c38
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java
@@ -1,19 +1,20 @@
package com.stylefeng.guns.modular.CharteredCar.server.impl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.CharteredCar.dao.OrderCharteredCarMapper;
import com.stylefeng.guns.modular.CharteredCar.model.OrderCharteredCar;
import com.stylefeng.guns.modular.CharteredCar.server.IOrderCharteredCarService;
import com.stylefeng.guns.modular.account.controller.AppOrderController;
import com.stylefeng.guns.modular.api.OrderController;
import com.stylefeng.guns.modular.crossCity.dao.OrderCrossCityMapper;
import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity;
import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper;
import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar;
import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.model.Company;
import com.stylefeng.guns.modular.system.model.OrderCancel;
import com.stylefeng.guns.modular.system.model.SensitiveWords;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.*;
import com.stylefeng.guns.modular.system.util.DateUtil;
import com.stylefeng.guns.modular.system.util.PayMoneyUtil;
@@ -77,6 +78,8 @@
    @Autowired
    private IPaymentRecordService paymentRecordService;
    @Autowired
    private IOpenCityService openCityService;
    @Autowired
    private IIncomeService incomeService;
@@ -230,9 +233,9 @@
            }
            userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue());
            SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCharteredCar.getCompanyId()));
            userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分
//            OpenCity openCity = openCityService.openCity1(orderCharteredCar.getStartLon().toString(), orderCharteredCar.getStartLat().toString());
//            SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId()));
//            userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分
            //添加交易明细
            transactionDetailsService.saveData(uid, "包车-感谢费", money, 2, 1, 1, 6, orderId);
@@ -268,8 +271,9 @@
        paymentRecordService.updateById(query);
        UserInfo userInfo = userInfoService.selectById(orderCharteredCar.getUserId());
        SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCharteredCar.getCompanyId()));
        userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分
//        OpenCity openCity = openCityService.openCity1(orderCharteredCar.getStartLon().toString(), orderCharteredCar.getStartLat().toString());
//        SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId()));
//        userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分
        //添加交易明细
        transactionDetailsService.saveData(userInfo.getId(), "包车-感谢费", query.getAmount(), 2, 1, 1, 6, orderId);
        userInfoService.updateById(userInfo);