puzhibing
2023-07-03 d6af8c450e89d515f7f77a2b4b4ddf9c5f9ad4db
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -1,5 +1,6 @@
package com.stylefeng.guns.modular.api;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.core.util.ToolUtil;
@@ -15,6 +16,7 @@
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.*;
import com.stylefeng.guns.modular.system.util.*;
import com.stylefeng.guns.modular.system.util.Tingg.model.*;
import com.stylefeng.guns.modular.system.warpper.*;
import com.stylefeng.guns.modular.taxi.model.OrderTaxi;
import com.stylefeng.guns.modular.taxi.model.TransactionDetails;
@@ -86,9 +88,6 @@
    private IOrderCharteredCarService orderCharteredCarService;
    @Autowired
    private PushMinistryOfTransportUtil pushMinistryOfTransportUtil;
    @Autowired
    private ITransactionDetailsService transactionDetailsService;
    @Autowired
@@ -96,9 +95,6 @@
    @Autowired
    private PayMoneyUtil payMoneyUtil;
    @Value("${pushMinistryOfTransport}")
    private boolean pushMinistryOfTransport;
    @Value("${filePath}")
@@ -228,18 +224,33 @@
            @ApiImplicitParam(value = "页条数", name = "size", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<List<TravelRecordWarpper>> queryMyTravelRecord(Integer pageNum, Integer size, HttpServletRequest request){
    public ResultUtil<List<TravelRecordWarpper>> queryMyTravelRecord(Integer pageNum, Integer size, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            String name = language == 1 ? "专车订单" : language == 2 ? "Private car order" : "Commande de voiture exclusive";
            pageNum = (pageNum - 1) * size;
            List<Map<String, Object>> maps = orderCancelService.queryCancel(uid, 2);
            for (Map<String, Object> map : maps) {
                Integer orderType = Integer.valueOf(map.get("orderType").toString());
                if(1 == orderType){
                    map.put("name", language == 1 ? "专车订单取消" : language == 2 ? "Private car order cancelled" : "Annulation de commande de voiture exclusive");
                }
                if(4 == orderType){
                    map.put("name", language == 1 ? "市内小件物流订单取消" : language == 2 ? "The small parts logistics order in the city has been cancelled" : "Annulation de commande pour la logistique de petites pièces dans la ville");
                }
            }
            List<Map<String, Object>> list = orderPrivateCarService.queryMyTravelRecord(uid);//专车
            List<Map<String, Object>> list1 = orderTaxiService.queryMyTravelRecord(uid);//出租车
            List<Map<String, Object>> list2 = orderCrossCityService.queryMyTravelRecord(uid);//跨城车
            for (Map<String, Object> map : list) {
                map.put("name", name);
            }
            name = language == 1 ? "市内小件物流" : language == 2 ? "Small parts logistics in the city" : "Logistique de petites pièces dans la ville";
            List<Map<String, Object>> list3 = orderLogisticsService.queryMyTravelRecord(uid);//小件物流
            for (Map<String, Object> map : list3) {
                map.put("name", name);
            }
            List<TransactionDetails> transactionDetails = transactionDetailsService.selectList(new EntityWrapper<TransactionDetails>().eq("state", 1)
                    .eq("type", 1).eq("userType", 1).eq("userId", uid).eq("orderType", 3).like("remark", "%跨城订单取消退款%"));
            List<Map<String, Object>> list4 = new ArrayList<>();
@@ -253,10 +264,10 @@
                list4.add(map);
            }
            list.addAll(maps);
            list.addAll(list1);
            list.addAll(list2);
//            list.addAll(list1);
//            list.addAll(list2);
            list.addAll(list3);
            list.addAll(list4);
//            list.addAll(list4);
            List<TravelRecordWarpper> orderWarpper = TravelRecordWarpper.getTravelRecordWarpper(list);
@@ -318,35 +329,35 @@
                    case 1://专车
                        list = orderPrivateCarService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                        break;
                    case 2://出租车
                        list = orderTaxiService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                        break;
                    case 3://跨城
                        list = orderCrossCityService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                        break;
//                    case 2://出租车
//                        list = orderTaxiService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
//                        break;
//                    case 3://跨城
//                        list = orderCrossCityService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
//                        break;
                    case 4://同城小件物流
                        list = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
                        break;
                    case 5://跨城小件物流
                        list = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
                        break;
//                    case 5://跨城小件物流
//                        list = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
//                        break;
                }
            }else{
                //专车
                List<Map<String, Object>> maps = orderPrivateCarService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                list.addAll(maps);
                //出租车
                List<Map<String, Object>> list1 = orderTaxiService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                list.addAll(list1);
                //跨城
                List<Map<String, Object>> list2 = orderCrossCityService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
                list.addAll(list2);
//                //出租车
//                List<Map<String, Object>> list1 = orderTaxiService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
//                list.addAll(list1);
//                //跨城
//                List<Map<String, Object>> list2 = orderCrossCityService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid);
//                list.addAll(list2);
                //同城小件物流
                List<Map<String, Object>> list3 = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
                list.addAll(list3);
                //跨城小件物流
                List<Map<String, Object>> list4 = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
                list.addAll(list4);
//                //跨城小件物流
//                List<Map<String, Object>> list4 = orderLogisticsService.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid, orderType);
//                list.addAll(list4);
            }
            //分页
@@ -378,13 +389,18 @@
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "语言类型(1=简体中文,2=英语,3=法语)", name = "language", required = false, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil pushOrderTaxi(Integer id, Integer orderType){
    public ResultUtil pushOrderTaxi(Integer id, Integer orderType, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            switch (orderType){
                case 1:
                    return orderPrivateCarService.pushOrderPrivateCar(id);
                    return orderPrivateCarService.pushOrderPrivateCar(uid, id, language);
                case 2:
                    return orderTaxiService.pushOrderTaxi(id);
            }
@@ -406,10 +422,10 @@
     */
    @ResponseBody
    @PostMapping("/api/order/queryOrderInfo")
    @ApiOperation(value = "获取服务中的详情数据", tags = {"用户端-服务中"}, notes = "")
    @ApiOperation(value = "获取服务中的详情数据【1.0】", tags = {"用户端-服务中"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际,4=同城小件,5=跨城小件)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<OrderInfoWarpper> queryOrderInfo(Integer orderId, Integer orderType){
@@ -424,6 +440,12 @@
                    break;
                case 3://跨城
                    map = orderCrossCityService.queryOrderInfo(orderId);
                    break;
                case 4://同城小件
                    map = orderLogisticsService.queryOrderInfo(orderId);
                    break;
                case 5://跨城小件
                    map = orderLogisticsService.queryOrderInfo(orderId);
                    break;
            }
            if(map.get("telX") != null){
@@ -444,7 +466,6 @@
                orderInfoWarpper.setOrderPositionList(list);
            }
            return ResultUtil.success(orderInfoWarpper);
            //return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
@@ -461,10 +482,10 @@
     */
    @ResponseBody
    @PostMapping("/base/order/queryOrderInfo_")
    @ApiOperation(value = "获取服务中的详情数据", tags = {"分享专用"}, notes = "")
    @ApiOperation(value = "获取服务中的详情数据【1.0】", tags = {"分享专用"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际,4=同城小件,5=跨城小件)", name = "orderType", required = true, dataType = "int"),
    })
    public ResultUtil<OrderInfoWarpper> queryOrderInfo_(Integer orderId, Integer orderType){
        try {
@@ -478,6 +499,12 @@
                    break;
                case 3://跨城
                    map = orderCrossCityService.queryOrderInfo(orderId);
                    break;
                case 4://同城小件
                    map = orderLogisticsService.queryOrderInfo(orderId);
                    break;
                case 5://跨城小件
                    map = orderLogisticsService.queryOrderInfo(orderId);
                    break;
            }
            if(null != map.get("telX")){
@@ -498,7 +525,7 @@
     * 获取订单取消支付页面详情
     * @param orderId
     * @param orderType
     * @return
     * @。,;
     */
    @ResponseBody
    @PostMapping("/api/order/queryCancelPage")
@@ -680,9 +707,9 @@
            @ApiImplicitParam(value = "用户id", name = "uid", required = true, dataType = "int"),
            @ApiImplicitParam(value = "附加参数{\"key\":\"value\"}", name = "content", required = true, dataType = "string")
    })
    public ResultUtil weChatPay(Integer orderId, Integer orderType, Integer type, Integer userType, Integer uid, String content){
    public ResultUtil weChatPay(Integer orderId, Integer orderType, Integer type, Integer userType, Integer uid, String content, Integer language){
        try {
            return orderService.weChatPay(orderId, orderType, type, userType, uid, content);
            return orderService.weChatPay(orderId, orderType, type, userType, uid, content, language);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
@@ -813,9 +840,10 @@
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "取消原因", name = "reason", required = true, dataType = "string"),
            @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"),
            @ApiImplicitParam(value = "语言类型(1=简体中文,2=英语,3=法语)", name = "language", required = false, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil addCancle(Integer id, Integer orderType, String reason, String remark, HttpServletRequest request){
    public ResultUtil addCancle(Integer id, Integer orderType, String reason, String remark, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
@@ -823,17 +851,17 @@
            }
            switch (orderType){
                case 1:
                    return orderPrivateCarService.addCancle(id, reason, remark, uid);
                case 2:
                    return orderTaxiService.addCancle(id, reason, remark, uid);
                case 3:
                    return orderCrossCityService.addCancle(id, reason, remark, uid);
                    return orderPrivateCarService.addCancle(id, reason, remark, uid, language);
//                case 2:
//                    return orderTaxiService.addCancle(id, reason, remark, uid);
//                case 3:
//                    return orderCrossCityService.addCancle(id, reason, remark, uid);
                case 4:
                    return orderLogisticsService.addCancle(id, reason, remark, uid);
                case 5:
                    return orderLogisticsService.addCancle(id, reason, remark, uid);
                case 6:
                    return orderCharteredCarService.addCancle(id, reason, remark, uid);
                    return orderLogisticsService.addCancle(id, reason, remark, uid, language);
//                case 5:
//                    return orderLogisticsService.addCancle(id, reason, remark, uid);
//                case 6:
//                    return orderCharteredCarService.addCancle(id, reason, remark, uid);
            }
            return ResultUtil.success();
        }catch (Exception e){
@@ -856,12 +884,12 @@
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "支付方式(1=微信,2=支付宝,3=余额)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "支付方式(1=线上支付,3=余额)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "取消单id(取消操作返回)", name = "cancleId", required = false, dataType = "int"),
            @ApiImplicitParam(value = "支付端(1=用户APP端,2=司机APP端,3=用户小程序端)", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil cancleOrderTaxi(Integer id, Integer orderType, Integer payType, Integer cancleId, Integer type, HttpServletRequest request){
    public ResultUtil cancleOrderTaxi(Integer id, Integer orderType, Integer payType, Integer cancleId, Integer type, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
@@ -869,11 +897,11 @@
            }
            switch (orderType){
                case 1:
                    return orderPrivateCarService.cancleOrderPrivateCar(id, payType, cancleId, type);
                case 2:
                    return orderTaxiService.cancleOrderTaxi(id, payType, cancleId, type);
                case 3:
                    return orderCrossCityService.cancleOrderCrossCity(id, payType, cancleId, type);
                    return orderPrivateCarService.cancleOrderPrivateCar(id, payType, "user_" + uid, cancleId, type, language);
//                case 2:
//                    return orderTaxiService.cancleOrderTaxi(id, payType, cancleId, type);
//                case 3:
//                    return orderCrossCityService.cancleOrderCrossCity(id, payType, cancleId, type);
            }
            return ResultUtil.success();
        }catch (Exception e){
@@ -899,15 +927,16 @@
            @ApiImplicitParam(value = "司机id", name = "driverId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "投诉原因", name = "reason", required = true, dataType = "String"),
            @ApiImplicitParam(value = "投诉描述", name = "description", required = true, dataType = "String"),
            @ApiImplicitParam(value = "语言类型(1=简体中文,2=英语,3=法语)", name = "language", required = false, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil complaintService(Integer driverId, String reason, String description, HttpServletRequest request){
    public ResultUtil complaintService(Integer driverId, String reason, String description, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            complaintService.saveData(driverId, reason, description, uid);
            complaintService.saveData(driverId, reason, description, uid, language);
            return ResultUtil.success();
        }catch (Exception e){
            e.printStackTrace();
@@ -928,7 +957,7 @@
    @ApiOperation(value = "支付页面获取可用优惠券数量和余额", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城"}, notes = "balance=余额,coupon=优惠券")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城,4=同城小件,5=跨城小件)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil queryBalance(Integer orderId, Integer orderType, HttpServletRequest request){
@@ -999,6 +1028,12 @@
                case 3:
                    list = orderCrossCityService.queryCoupon(orderId, uid, pageNum, size);
                    break;
//                case 4:
//                    list = orderLogisticsService.queryCoupon(orderId, uid, pageNum, size);
//                    break;
//                case 5:
//                    list = orderLogisticsService.queryCoupon(orderId, uid, pageNum, size);
//                    break;
            }
            return ResultUtil.success(CouponWarpper.getCouponWarppers(list));
        }catch (Exception e){
@@ -1019,16 +1054,16 @@
     */
    @ResponseBody
    @PostMapping("/api/taxi/payTaxiOrder")
    @ApiOperation(value = "订单完成支付订单操作", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城", "用户端-小件物流"}, notes = "")
    @ApiOperation(value = "订单完成支付订单操作【1.1】", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城", "用户端-小件物流"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "支付方式(1=微信,2=支付宝,3=余额)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "支付方式(1=手机支付,2=银行卡支付,3=余额,4=线下支付)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城,4=小件物流)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城,4=同城小件物流,5=跨城小件物流)", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "优惠券id", name = "couponId", required = false, dataType = "int"),
            @ApiImplicitParam(value = "支付端(1=用户APP端,2=司机APP端,3=用户小程序端)", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil payTaxiOrder(Integer payType, Integer orderId, Integer orderType, Integer couponId, Integer type, HttpServletRequest request){
    public ResultUtil payTaxiOrder(Integer payType, Integer orderId, Integer orderType, Integer couponId, Integer type, Integer language, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
@@ -1036,15 +1071,15 @@
            }
            switch (orderType){
                case 1:
                    return orderPrivateCarService.payPrivateCarOrder(payType, orderId, couponId, type);
                case 2:
                    return orderTaxiService.payTaxiOrder(payType, orderId, couponId, type);
                case 3:
                    return orderCrossCityService.payCrossCityOrder(payType, orderId, couponId, type);
                    return orderPrivateCarService.payPrivateCarOrder(payType, "user_" + uid, orderId, couponId, type, language);
//                case 2:
//                    return orderTaxiService.payTaxiOrder(payType, orderId, couponId, type);
//                case 3:
//                    return orderCrossCityService.payCrossCityOrder(payType, orderId, couponId, type);
                case 4:
                    return orderLogisticsService.payLogisticsOrder(payType, orderId, type);
                case 5:
                    return orderLogisticsService.payLogisticsOrder(payType, orderId, type);
                    return orderLogisticsService.payLogisticsOrder(payType, "user_" + uid, orderId, type, language);
//                case 5:
//                    return orderLogisticsService.payLogisticsOrder(payType, orderId, type, language);
            }
            return ResultUtil.success();
        }catch (Exception e){
@@ -1072,24 +1107,15 @@
            @ApiImplicitParam(value = "评价内容", name = "content", required = false, dataType = "String"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil orderEvaluate(Integer orderId, Integer orderType, Integer fraction, String content){
    public ResultUtil orderEvaluate(Integer orderId, Integer orderType, Integer fraction, String content, Integer language){
        try {
            ResultUtil resultUtil = orderEvaluateService.saveData(orderId, orderType, fraction, content);
            ResultUtil resultUtil = orderEvaluateService.saveData(orderId, orderType, fraction, content, language);
            if(resultUtil.getCode() == 200){
                switch (orderType){
                    case 1:
                        OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId);
                        orderPrivateCar.setState(9);
                        orderPrivateCarService.updateById(orderPrivateCar);
                        new Thread(new Runnable() {
                            @Override
                            public void run() {
                                if(pushMinistryOfTransport){//上传数据
                                    pushMinistryOfTransportUtil.ratedPassenger(Integer.valueOf(resultUtil.getData().toString()));
                                    pushMinistryOfTransportUtil.ratedDriver(orderPrivateCar.getDriverId());
                                }
                            }
                        }).start();
                        break;
                    case 2:
                        OrderTaxi orderTaxi = orderTaxiService.selectById(orderId);
@@ -1158,11 +1184,11 @@
            @ApiImplicitParam(value = "订单类型", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil shareRedEnvelope(Integer orderId, Integer orderType){
    public ResultUtil shareRedEnvelope(Integer orderId, Integer orderType, Integer language){
        try {
            switch (orderType){
                case 1:
                    return orderPrivateCarService.shareRedEnvelope(orderId);
                    return orderPrivateCarService.shareRedEnvelope(orderId, language);
                case 2:
                    return orderTaxiService.shareRedEnvelope(orderId);
                case 3:
@@ -1180,21 +1206,31 @@
    /**
     * 取消订单微信回调
     * @param request
     * @param callbackRequest
     */
    @ResponseBody
    @PostMapping("/base/wxCancelOrderTaxi")
    public void wxCancelOrderTaxi(HttpServletRequest request, HttpServletResponse response){
    public CallbackResponse wxCancelOrderTaxi(@RequestBody CallbackRequest callbackRequest){
        CallbackResponse callbackResponse = new CallbackResponse();
        try {
            Map<String, String> map = payMoneyUtil.weixinpayCallback(request);//icbcPayUtil.payCallback(request);
            if(null != map){
                String out_trade_no = map.get("out_trade_no");
                String order_id = map.get("transaction_id");
            /**
             * 指示服务是否成功或付费的总体请求代码。。
             * 177-部分付费请求
             * 178-表明请求已全额支付
             * 179-表示请求已部分支付但已过期。
             * 129-请求已过期,未付款。
             * 180.商户拒绝请求
             * 183-商户接受请求,我们可以结算资金
             * 188-商户收到请求。
             */
            String request_status_code = callbackRequest.getRequest_status_code();
            String out_trade_no = callbackRequest.getMerchant_transaction_id();
            if("177".equals(request_status_code) || "178".equals(request_status_code)){
                Payments payments = callbackRequest.getPayments().get(0);
                String order_id = payments.getPayer_transaction_id();
                if(ToolUtil.isNotEmpty(out_trade_no)){
                    String[] split = out_trade_no.split("_");
                    Integer id = Integer.valueOf(split[0]);
                    Integer type = Integer.valueOf(split[1]);
                    Integer type = Integer.valueOf(out_trade_no.substring(17, 18));
                    Integer id = Integer.valueOf(out_trade_no.substring(18));
                    switch (type){
                        case 1:
                            orderPrivateCarService.payCancelOrderPrivateCar(id, order_id, 1);
@@ -1206,12 +1242,23 @@
                            orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1);
                            break;
                    }
                    callbackResponse.setCheckout_request_id(order_id);
                    callbackResponse.setMerchant_transaction_id(out_trade_no);
                    callbackResponse.setStatus_code("183");
                    callbackResponse.setStatus_description("Payment processed successfully");
                    callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16));
                }
                response.getOutputStream().print("success");
            }else{
                callbackResponse.setCheckout_request_id(UUIDUtil.getRandomCode(16));
                callbackResponse.setMerchant_transaction_id(out_trade_no);
                callbackResponse.setStatus_code("180");
                callbackResponse.setStatus_description("means payment rejected.");
                callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16));
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return callbackResponse;
    }
@@ -1256,23 +1303,35 @@
    /**
     * 完成订单微信支付回调
     * @param request
     * @param
     */
    @ResponseBody
    @PostMapping("/base/wxPayOrderTaxi")
    public void wxPayOrderTaxi(HttpServletRequest request, HttpServletResponse response){
    public CallbackResponse wxPayOrderTaxi(@RequestBody CallbackRequest callbackRequest){
        CallbackResponse callbackResponse = new CallbackResponse();
        try {
            Map<String, String> map = payMoneyUtil.weixinpayCallback(request);//icbcPayUtil.payCallback(request);
            if(null != map){
                String out_trade_no = map.get("out_trade_no");
                String order_id = map.get("transaction_id");
            /**
             * 指示服务是否成功或付费的总体请求代码。。
             * 177-部分付费请求
             * 178-表明请求已全额支付
             * 179-表示请求已部分支付但已过期。
             * 129-请求已过期,未付款。
             * 180.商户拒绝请求
             * 183-商户接受请求,我们可以结算资金
             * 188-商户收到请求。
             */
            String request_status_code = callbackRequest.getRequest_status_code();
            String out_trade_no = callbackRequest.getMerchant_transaction_id();
            if("177".equals(request_status_code) || "178".equals(request_status_code)){
                Payments payments = callbackRequest.getPayments().get(0);
                String order_id = payments.getPayer_transaction_id();
                if(ToolUtil.isNotEmpty(out_trade_no)){
                    String[] split = out_trade_no.split("_");
                    Integer id = Integer.valueOf(split[0]);
                    Integer type = Integer.valueOf(split[1]);
                    Integer type = Integer.valueOf(out_trade_no.substring(17, 18));
                    Integer language = Integer.valueOf(out_trade_no.substring(18, 19));
                    Integer id = Integer.valueOf(out_trade_no.substring(19));
                    switch (type){
                        case 1:
                            orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1);
                            orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 1, language);
                            break;
                        case 2:
                            orderTaxiService.payOrderTaxiCallback(id, order_id, 1);
@@ -1281,18 +1340,29 @@
                            orderCrossCityService.payOrderCrossCityCallback(id, order_id, 1);
                            break;
                        case 4:
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1);
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1, language);
                            break;
                        case 5:
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1);
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 1, language);
                            break;
                    }
                    response.getOutputStream().print("success");
                    callbackResponse.setCheckout_request_id(order_id);
                    callbackResponse.setMerchant_transaction_id(out_trade_no);
                    callbackResponse.setStatus_code("183");
                    callbackResponse.setStatus_description("Payment processed successfully");
                    callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16));
                }
            }else{
                callbackResponse.setCheckout_request_id(UUIDUtil.getRandomCode(16));
                callbackResponse.setMerchant_transaction_id(out_trade_no);
                callbackResponse.setStatus_code("180");
                callbackResponse.setStatus_description("means payment rejected.");
                callbackResponse.setReceipt_number(UUIDUtil.getRandomCode(16));
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return callbackResponse;
    }
@@ -1312,9 +1382,10 @@
                    String[] split = out_trade_no.split("_");
                    Integer id = Integer.valueOf(split[0]);
                    Integer type = Integer.valueOf(split[1]);
                    Integer language = Integer.valueOf(split[2]);
                    switch (type){
                        case 1:
                            orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2);
                            orderPrivateCarService.payOrderPrivateCarCallback(id, order_id, 2, language);
                            break;
                        case 2:
                            orderTaxiService.payOrderTaxiCallback(id, order_id, 2);
@@ -1323,10 +1394,10 @@
                            orderCrossCityService.payOrderCrossCityCallback(id, order_id, 2);
                            break;
                        case 4:
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2);
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2, language);
                            break;
                        case 5:
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2);
                            orderLogisticsService.payOrderLogisticsCallback(id, order_id, 2, language);
                            break;
                    }
                    response.setContentType("text/html;charset=UTF-8");
@@ -1401,4 +1472,27 @@
            e.printStackTrace();
        }
    }
    @ResponseBody
    @PostMapping("/base/IGO/tinggPayoutCallback")
    public PayoutCallbackResponse tinggPayoutCallback(@RequestBody PayoutCallbackRequest request){
        System.err.println("转账回调>>>>" + JSON.toJSONString(request));
        PayoutCallbackResponse payoutCallbackResponse = new PayoutCallbackResponse();
        AuthStatus authStatus = new AuthStatus();
        authStatus.setAuthStatusCode(131);
        authStatus.setAuthStatusDescription("Authentication was successful");
        payoutCallbackResponse.setAuthStatus(authStatus);
        Results results = new Results();
        PayoutPacket packet = request.getPayload().getPacket();
        String beepTransactionID = packet.getBeepTransactionID();
        String payerTransactionID = packet.getPayerTransactionID();
        results.setBeepTransactionID(beepTransactionID);
        results.setPayerTransactionID(payerTransactionID);
        results.setStatusCode("188");
        results.setStatusDescription("Response was received");
        payoutCallbackResponse.setResults(results);
        return payoutCallbackResponse;
    }
}