无关风月
2024-08-10 0001861cc63fc670646a103284b9eaefb193e91f
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.google.api.client.http.UrlEncodedParser;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.CharteredCar.server.IOrderCharteredCarService;
import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity;
@@ -27,8 +28,12 @@
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.http.client.utils.URLEncodedUtils;
import org.bouncycastle.util.encoders.UrlBase64Encoder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -37,6 +42,8 @@
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -917,6 +924,24 @@
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            if(ToolUtil.isNotEmpty(reason)){
                reason = reason.replaceAll("& #40;", "(")
                        .replaceAll("& #41;", ")")
                        .replaceAll("& #40;", "(")
                        .replaceAll("& #41;", ")")
                        .replaceAll("& #39;", "'")
                        .replaceAll("& lt;", "<")
                        .replaceAll("& gt;", ">");
            }
            if(ToolUtil.isNotEmpty(remark)){
                remark = remark.replaceAll("& #40;", "(")
                        .replaceAll("& #41;", ")")
                        .replaceAll("& #40;", "(")
                        .replaceAll("& #41;", ")")
                        .replaceAll("& #39;", "'")
                        .replaceAll("& lt;", "<")
                        .replaceAll("& gt;", ">");
            }
            switch (orderType){
                case 1:
                    return orderPrivateCarService.addCancle(id, reason, remark, uid, lon, lat, address, language);
@@ -937,8 +962,9 @@
            return ResultUtil.runErr();
        }
    }
    /**
     * 取消订单退款回调
     * @param request
@@ -1730,7 +1756,6 @@
                return ResultUtil.tokenErr();
            }
            Double payMoney = 0D;
            Integer companyId = 1;
            switch (orderType){
                case 1:
                    OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId);
@@ -1754,7 +1779,7 @@
                    if(null != query1){
                        Integer orderNum=orderLogisticsService.selectCount(new EntityWrapper<OrderLogistics>().eq("userId", uid).eq("activityId",query1.getId()).last(" and to_days(getoffTime) = to_days(now())"));
                        if(query1.getDistance()*1000>orderLogistics.getMileage() && query1.getOrderNum()>orderNum){
                            Double special = query1.getSpecial();
                            Double special = query1.getLogistics();
                            if(null != special){
                                double v = new BigDecimal(orderMoney1).multiply(new BigDecimal(special / 10)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
                                payMoney = v;