liujie
2025-08-08 f604df04d1f9fe90ee543a1772a3a8cdb50d3d66
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/QianYunTong
13个文件已删除
50个文件已修改
3个文件已添加
2611 ■■■■ 已修改文件
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CarServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/OrderUtil.java 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GoodsInfo.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentInfoRequest.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradeOrderCreateData.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradePayOff1Data.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradePayOffData.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/resources/application-dev.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
EurekaQYTTravel/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/pom.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/config/web/WebConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/AddAdminLogUtil.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties1.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/resources/application-test.yml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ManagementQYTTravel/guns-admin/src/main/resources/logback.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyServer0.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MessagePushTravel/src/main/java/com/sinata/push/util/applets/WebSocketHandler.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServer.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MessagePushTravel/src/main/resources/application.yml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MessagePushTravel/src/main/resources/logback.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/controller/PayInfoController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/controller/rideCommentController.java 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/BrandMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/ParamMapper.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/BrandMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/OrderRideMapper.xml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/OrderTravelMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/ParamMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/model/Brand.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/model/Param.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/IBrandService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/IParamService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/impl/BrandServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/impl/ParamServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/task/base/AbstractJob.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserInfoMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/SpringContextsUtil.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EnterpriseUtil.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/OrderUtil.java 163 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/SMSUtil.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/UserUtil.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/CreateOrderRequest.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GetPaymentInfo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GoodsInfo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentInfoRequest.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentOrderRequest.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/UserInfoWarpper.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java 319 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZuulQYTTravel/src/main/resources/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CarServiceImpl.java
@@ -14,7 +14,6 @@
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
@@ -163,7 +162,7 @@
    @Override
    public boolean useState(Integer carId, Integer uid) {
        Car car = carMapper.selectById(carId);
        if(car.getUseDriverId()!=null || !car.getUseDriverId().equals(uid)){
        if(car.getUseDriverId()!=null && !car.getUseDriverId().equals(uid)){
            return false;
        }
        return true;
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushUtil.java
@@ -57,7 +57,7 @@
    
    private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器
    
    private final String socket_uri = "http://127.0.0.1:6000";
    private final String socket_uri = "http://192.168.110.111:6000";
    // qyt 改派重新推单
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java
@@ -241,11 +241,12 @@
        String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, contentMap);
        log.info("【创建账号-同步证联开户信息】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if (!"000000".equals(resCode)) {
            log.error("【创建账号-同步证联开户信息】请求失败:" + jsonObject.getString("resMsg"));
        String retCode = jsonObject.getString("retCode");
        if (!"0".equals(retCode)) {
            log.error("【创建账号-同步证联开户信息】请求失败:" + jsonObject.getString("retMsg"));
            return -1;
        }
        return jsonObject.getInteger("status");
        JSONObject object = jsonObject.getJSONObject("object");
        return object.getInteger("status");
    }
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/OrderUtil.java
@@ -10,6 +10,8 @@
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import lombok.extern.slf4j.Slf4j;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -26,19 +28,19 @@
//        CreateTravelItineraryRequest request = new CreateTravelItineraryRequest();
//        request.setScene("TRAFFIC");
//        request.setPartnerId("522700");
//        request.setOrderNo("01234567890");
//        request.setOrderNo("3456789012345678");
//        request.setCustomerId("11448156");
//        request.setDriverId("11448158");
//        request.setSupplierShopId("981100006005951");
//        request.setServiceType(1);
//        String travelItinerary = createTravelItinerary(request);
//        System.err.println(travelItinerary);//1950363840206753792
//        System.err.println(travelItinerary);//1951088602595872768
        
        //修改行程状态
//        ModifyTravelItineraryRequest request = new ModifyTravelItineraryRequest();
//        request.setScene("TRAFFIC");
//        request.setPartnerId("522700");
//        request.setOrderId("1950363840206753792");
//        request.setOrderId("1951088602595872768");
//        request.setStatus(7);
//        request.setDriverId("11448158");
//        request.setSupplierShopId("981100006005951");
@@ -53,11 +55,11 @@
//        tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"0\"}");
//        tradeOrderCreateData.setCharge(new BigDecimal("0.01"));
//        tradeOrderCreateData.setChannelSource("GRJYCXWXXCX");
//        tradeOrderCreateData.setOrderId("1950363840206753792");
//        tradeOrderCreateData.setOrderNo("01234567890");
//        tradeOrderCreateData.setOrderId("1951088602595872768");
//        tradeOrderCreateData.setOrderNo("3456789012345678");
//        tradeOrderCreateData.setCustomerId("11448156");
//        tradeOrderCreateData.setPayPartnerId("5400004");
//        tradeOrderCreateData.setPartnerPayId("1950363840206753792");
//        tradeOrderCreateData.setPartnerPayId("1951088602595872768");
//        tradeOrderCreateData.setCurrency("RMB");
//        tradeOrderCreateData.setTotalFee("1");
//        tradeOrderCreateData.setRetUrl("pages/advoad-city-search/advoad-message/electronic-wait-pay/electronic-wait-pay");
@@ -69,8 +71,8 @@
//        List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
//        GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
//        goodsInfoRequest.setId("981100006005901");
//        goodsInfoRequest.setSubAppId("wxcbad113185a243e1");
//        goodsInfoRequest.setSubOpenId("oVLur6yFtED8ruXBWUFKXjzXJ_BQ");
//        goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
//        goodsInfoRequest.setSubOpenId("oVLur61wBKJEO7QPR1dsmzS5TSfs");
//        goodsInfoRequest.setProfitSharing("1");
//        goodsInfoRequest.setAreaInfo("520100");
//        goodsInfoRequest.setPayType("0");
@@ -92,10 +94,10 @@
//        TradePayOff1Data tradePayOff1Data = new TradePayOff1Data();
//        tradePayOff1Data.setPartnerId("5400004");
//        tradePayOff1Data.setScene("TRAFFIC");
//        tradePayOff1Data.setPartnerPayId("1948685426689200128");
//        tradePayOff1Data.setPartnerPayId("1951088602595872768");
//        tradePayOff1Data.setCurrency("RMB");
//        tradePayOff1Data.setTotalFee("1");
//        tradePayOff1Data.setRetUrl("/home/");
//        tradePayOff1Data.setRetUrl("pages/advoad-city-search/advoad-message/electronic-wait-pay/electronic-wait-pay");
//        tradePayOff1Data.setClientIp("127.0.0.1");
//        tradePayOff1Data.setNeedLoginFlag("N");
//        tradePayOff1Data.setOrderDesc("出行订单支付");
@@ -103,8 +105,8 @@
//        List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
//        GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
//        goodsInfoRequest.setId("981100006005901");
//        goodsInfoRequest.setSubAppId("wxcbad113185a243e1");
//        goodsInfoRequest.setSubOpenId("oVLur6yFtED8ruXBWUFKXjzXJ_BQ");
//        goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
//        goodsInfoRequest.setSubOpenId("oVLur61wBKJEO7QPR1dsmzS5TSfs");
//        goodsInfoRequest.setProfitSharing("1");
//        goodsInfoRequest.setAreaInfo("520100");
//        goodsInfoRequest.setPayType("0");
@@ -178,6 +180,22 @@
     * @return
     */
    public static PayInfo tradePayOff1(TradePayOff1Data tradePayOff1Data) {
        tradePayOff1Data.setPartnerId("5400004");
        tradePayOff1Data.setTimeout("72H");
        tradePayOff1Data.setScene("TRAFFIC");
        tradePayOff1Data.setCurrency("RMB");
        tradePayOff1Data.setNeedLoginFlag("N");
        tradePayOff1Data.setAccessMode("APP");
        tradePayOff1Data.getGoodsInfo().forEach(goodsInfoRequest -> {
            goodsInfoRequest.setId("981100006005901");
            goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
            goodsInfoRequest.setAreaInfo("520100");
            goodsInfoRequest.setPayType("0");
            goodsInfoRequest.setBusinessType("10408");
        });
        TradeRequest request = new TradeRequest<TradePayOff1Data>();
        request.setSceneId("1911676727023968256");
        request.setAppId(QianYunTongProperties.appkey);
@@ -220,10 +238,11 @@
    
    /**
     * 创建行程单
     *
     * @param request
     * @return 行程单ID
     */
    public static String createTravelItinerary(CreateTravelItineraryRequest request){
    public static String createTravelItinerary(CreateTravelItineraryRequest request) {
        request.setScene("TRAFFIC");
        request.setPartnerId("522700");
        //请求路径
@@ -251,7 +270,7 @@
        log.info("【创建行程单】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if(!"000000".equals(resCode)){
        if (!"000000".equals(resCode)) {
            log.error("【创建行程单】失败:" + jsonObject.getString("resMsg"));
            throw new RuntimeException("【创建行程单】失败:" + jsonObject.getString("resMsg"));
        }
@@ -259,12 +278,12 @@
    }
    
    
    /**
     * 修改行程单
     *
     * @param request
     */
    public static Boolean modifyTravelItinerary(ModifyTravelItineraryRequest request){
    public static Boolean modifyTravelItinerary(ModifyTravelItineraryRequest request) {
        request.setScene("TRAFFIC");
        request.setPartnerId("522700");
        //请求路径
@@ -292,7 +311,7 @@
        log.info("【修改行程单】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if(!"000000".equals(resCode)){
        if (!"000000".equals(resCode)) {
            log.error("【修改行程单】失败:" + jsonObject.getString("resMsg"));
            throw new RuntimeException("【修改行程单】失败:" + jsonObject.getString("resMsg"));
        }
@@ -302,10 +321,14 @@
    
    /**
     * 行程单列表查询
     *
     * @param request
     * @return
     */
    public static ListPage<TravelItinerary> getTravelItineraryList(GetTravelItineraryListRequest request){
    public static ListPage<List<TravelItinerary>> getTravelItineraryList(GetTravelItineraryListRequest request) {
        request.setScene("TRAFFIC");
        request.setPartnerId("522700");
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getTravelItineraryList";
        //私钥文件
@@ -331,7 +354,7 @@
        log.info("【行程单列表查询】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if(!"000000".equals(resCode)){
        if (!"000000".equals(resCode)) {
            log.error("【行程单列表查询】失败:" + jsonObject.getString("resMsg"));
            throw new RuntimeException("【行程单列表查询】失败:" + jsonObject.getString("resMsg"));
        }
@@ -345,7 +368,7 @@
            TravelItinerary object = list.getObject(i, TravelItinerary.class);
            travelItineraryList.add(object);
        }
        ListPage listPage = new ListPage<TravelItinerary>();
        ListPage listPage = new ListPage<List<TravelItinerary>>();
        listPage.setTotal(total);
        listPage.setPageNum(pageNum);
        listPage.setPageSize(pageSize);
@@ -360,6 +383,24 @@
     * @return
     */
    public static TradeOrderCreate tradeOrderCreate1(TradeOrderCreateData tradeOrderCreateData) {
        tradeOrderCreateData.setScene("TRAFFIC");
        tradeOrderCreateData.setPartnerId("522700");
        tradeOrderCreateData.setTimeout("72H");
        tradeOrderCreateData.setOrderAppId("52270015");
        tradeOrderCreateData.setChannelSource("GRJYCXWXXCX");
        tradeOrderCreateData.setPayPartnerId("5400004");
        tradeOrderCreateData.setCurrency("RMB");
        tradeOrderCreateData.setNeedLoginFlag("N");
        tradeOrderCreateData.setAccessMode("APP");
        tradeOrderCreateData.getGoodsInfo().forEach(goodsInfoRequest -> {
            goodsInfoRequest.setId("981100006005901");
            goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
            goodsInfoRequest.setAreaInfo("520100");
            goodsInfoRequest.setPayType("0");
            goodsInfoRequest.setBusinessType("10408");
        });
        TradeRequest request = new TradeRequest<TradeOrderCreateData>();
        request.setSceneId("1945688132719169536");
        request.setAppId(QianYunTongProperties.appkey);
@@ -407,6 +448,11 @@
     * @return
     */
    public static OrderInfo tradeOrderCreate(CreateOrderRequest createOrderRequest) {
        createOrderRequest.setOrderAppId("52270015");
        createOrderRequest.setScene("TRAFFIC");
        createOrderRequest.setPartnerId("522700");
        createOrderRequest.setChannelSource("GRJYCXWXXCX");
        TradeRequest request = new TradeRequest<CreateOrderRequest>();
        request.setSceneId(QianYunTongProperties.sceneId);
        request.setAppId(QianYunTongProperties.appkey);
@@ -454,10 +500,45 @@
     * @return
     */
    public static PayInfo tradePayOff(TradePayOffData tradePayOffData) {
        tradePayOffData.setPartnerId("5400005");
        tradePayOffData.setTimeout("72H");
        tradePayOffData.setScene("TRAFFIC");
        tradePayOffData.setCurrency("RMB");
        tradePayOffData.setRetUrl("");
        InetAddress inetAddress = null;
        try {
            inetAddress = InetAddress.getLocalHost();
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
        String ip = inetAddress.getHostAddress();
        tradePayOffData.setClientIp(ip);
        tradePayOffData.setNeedLoginFlag("N");
        tradePayOffData.setAccessMode("APP");
        List<PaymentInfoRequest> paymentInfoRequests = new ArrayList<>();
        PaymentInfoRequest paymentInfoRequest = new PaymentInfoRequest();
        paymentInfoRequest.setPayModeId("501212");
        paymentInfoRequest.setRealFee(tradePayOffData.getTotalFee().toString());
        paymentInfoRequest.setTradeFee(tradePayOffData.getTotalFee().toString());
        paymentInfoRequest.setAccountTyp("501");
        paymentInfoRequests.add(paymentInfoRequest);
        tradePayOffData.setPaymentInfos(paymentInfoRequests);
        List<GoodsInfo> goodsInfo = new ArrayList<>();
        GoodsInfo goodsInfo1 = new GoodsInfo();
        goodsInfo1.setMerchantCode("B00000905");
        goodsInfo1.setCustId("CB0000004686");
        goodsInfo1.setCustName("证联消费平台交易客户");
        goodsInfo1.setBusinessType("10408");
        goodsInfo1.setAgreementNo("00000000468618354161754464398681");
        goodsInfo1.setProfitSharing("1");
        goodsInfo.add(goodsInfo1);
        tradePayOffData.setGoodsInfo(goodsInfo);
        TradeRequest request = new TradeRequest<TradePayOffData>();
        request.setSceneId("1774717104844095488");
        request.setAppId(QianYunTongProperties.appkey);
        request.setConfigVersion(1);
        request.setConfigVersion(2);
        request.setRequestId(UUIDUtil.getRandomCode());
        request.setData(tradePayOffData);
        //请求路径
@@ -497,10 +578,13 @@
    
    /**
     * 查询支付单信息
     *
     * @param getPaymentInfoDataRequest
     * @return
     */
    public static GetPaymentInfo paymentInfo(GetPaymentInfoDataRequest getPaymentInfoDataRequest){
    public static GetPaymentInfo paymentInfo(GetPaymentInfoDataRequest getPaymentInfoDataRequest) {
        getPaymentInfoDataRequest.setPartnerId("5400004");
        GetPaymentInfoRequest request = new GetPaymentInfoRequest();
        request.setRequstType("POST");
        request.setBusType(1);
@@ -531,13 +615,13 @@
        log.info("【查询支付单信息】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("retCode");
        if(!"0".equals(resCode)){
        if (!"0".equals(resCode)) {
            log.error("【查询支付单信息】失败:" + jsonObject.getString("retMsg"));
            throw new RuntimeException("【查询支付单信息】失败:" + jsonObject.getString("retMsg"));
        }
        JSONObject object = jsonObject.getJSONObject("object");
        String retCode = object.getString("retCode");
        if(!"000000".equals(retCode)){
        if (!"000000".equals(retCode)) {
            log.error("【查询支付单信息】失败:" + jsonObject.getString("retMsg"));
            throw new RuntimeException("【查询支付单信息】失败:" + jsonObject.getString("retMsg"));
        }
@@ -548,10 +632,16 @@
    
    /**
     * (补偿单)支付成功通知
     *
     * @param request
     * @return
     */
    public static OrderInfo paymentOrder(PaymentOrderRequest request){
    public static OrderInfo paymentOrder(PaymentOrderRequest request) {
        request.setScene("TRAFFIC");
        request.setMhltiCenterAppId("52270015");
        request.setPayType(4);
        request.setPayChannel(6);
        request.setIsCompensate(1);
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/paymentOrder";
        //私钥文件
@@ -577,19 +667,13 @@
        log.info("【(补偿单)支付成功通知】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if(!"0".equals(resCode)){
        if (!"000000".equals(resCode)) {
            log.error("【(补偿单)支付成功通知】失败:" + jsonObject.getString("resMsg"));
            throw new RuntimeException("【(补偿单)支付成功通知】失败:" + jsonObject.getString("resMsg"));
        }
        OrderInfo orderInfo = jsonObject.getObject("busiResp", OrderInfo.class);
        return orderInfo;
    }
    
    
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java
@@ -71,7 +71,7 @@
    public QianYunTongConfig getQianYunTongConfig() {
        if("dev".equals(activeProfile)){
            this.appkey = "10001104";
            this.privateKeyPath = "C:\\Users\\Admin\\Desktop\\private_key_test.pem";
            this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem";
            this.userName = "xiaofei";
            this.status = "1";
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java
@@ -16,8 +16,8 @@
    /**
     * 私钥地址
     */
    String privateKeyPath = "C:\\Users\\Admin\\Desktop\\qyt\\private_key_test.pem";
//    String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem";
//    String privateKeyPath = "C:\\Users\\Admin\\Desktop\\qyt\\private_key_test.pem";
    String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem";
    /**
     * 私钥地址
     */
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GoodsInfo.java
New file
@@ -0,0 +1,35 @@
package com.stylefeng.guns.modular.system.util.qianyuntong.model;
import lombok.Data;
/**
 * @author zhibing.pu
 * @Date 2025/7/24 10:35
 */
@Data
public class GoodsInfo {
    /**
     * 商户号
     */
    private String merchantCode;
    /**
     * 付款商户号
     */
    private String custId;
    /**
     * 付款方名称
     */
    private String custName;
    /**
     *交通场景固定值
     */
    private String businessType;
    /**
     * 免密支付协议号
     */
    private String agreementNo;
    /**
     * 分账标识。0:不分账,1:分账
     */
    private String profitSharing;
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentInfoRequest.java
@@ -12,4 +12,16 @@
     * 支付模式。此场景下默认传501212(测试和生产一致)
     */
    private String payModeId;
    /**
     * 支付金额
     */
    private String realFee;
    /**
     *
     */
    private String tradeFee;
    /**
     * 账户类型 501
     */
    private String accountTyp;
}
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradeOrderCreateData.java
@@ -28,6 +28,10 @@
     */
    private String partnerId;
    /**
     * 超时时间
     */
    private String timeout;
    /**
     * 结算信息json串。其中结算分账标识(profitSharing:0:不分账,1:分账)、是否推广单标识(isPromote:1、是、0、否)必传。例:{"profitSharing":"0",”isPromote”:”0”}
     */
    private String field1;
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradePayOff1Data.java
@@ -15,6 +15,10 @@
     */
    private String partnerId;
    /**
     * 超时时间
     */
    private String timeout;
    /**
     * 场景标识。交通场景传”TRAFFIC”
     */
    private String scene;
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/TradePayOffData.java
@@ -1,6 +1,5 @@
package com.stylefeng.guns.modular.system.util.qianyuntong.model;
import com.alipay.api.domain.GoodsInfo;
import lombok.Data;
import java.util.List;
@@ -16,6 +15,10 @@
     */
    private String partnerId;
    /**
     * 超时时间
     */
    private String timeout;
    /**
     * 场景标识。交通场景传”TRAFFIC”
     */
    private String scene;
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java
@@ -58,8 +58,8 @@
            this.merchNo = "B00000871";
            this.encrpNo = "1055490595";
            this.signNo = "1066348524";
            this.cer = "C:\\Users\\Admin\\Desktop\\qyt\\1055490595.cer";
            this.sm2 = "C:\\Users\\Admin\\Desktop\\qyt\\871_111111.sm2";
            this.cer = "C:\\Users\\39373\\Desktop\\黔云通\\UAT-demo-公用\\1055490595.cer";
            this.sm2 = "C:\\Users\\39373\\Desktop\\黔云通\\UAT-demo-公用\\871_111111.sm2";
            this.password = "111111";
        }
        if("test".equals(activeProfile)){
DriverQYTTravel/guns-admin/src/main/resources/application-dev.yml
@@ -49,7 +49,7 @@
eureka:
    client:
        service-url: #注册中心地址
            defaultZone: http://sinata:sinata@192.168.110.111:8000/eureka #启用身份验证的方式连接
            defaultZone: http://sinata:sinata@192.168.110.85:8000/eureka #启用身份验证的方式连接
        register-with-eureka: true #在注册中心进行注册
        fetch-registry: true #从Eureka中获取注册信息。
EurekaQYTTravel/src/main/resources/application.yml
@@ -16,7 +16,7 @@
eureka:
  instance:
    hostname: 192.168.110.106 #注册中心地址
    hostname: 192.168.110.85 #注册中心地址
  client:
    service-url: #客户端调用地址
      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
ManagementQYTTravel/guns-admin/pom.xml
@@ -256,23 +256,23 @@
    
    <build>
        <plugins>
<!--            <plugin>-->
<!--                <groupId>org.springframework.boot</groupId>-->
<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
<!--                <configuration>-->
<!--                    <fork>true</fork>&lt;!&ndash; 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart &ndash;&gt;-->
<!--                -->
<!--                </configuration>-->
<!--            -->
<!--            </plugin>-->
<!--            -->
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-surefire-plugin</artifactId>-->
<!--                <configuration>-->
<!--                    <skip>true</skip>-->
<!--                </configuration>-->
<!--            </plugin>-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork><!-- 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
        
        <!--打包war包引入本地jar的打包方式-->
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/config/web/WebConfig.java
@@ -224,7 +224,7 @@
            registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://testsso1.teamshub.com/login");
            registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://testsso1.teamshub.com/serviceValidate");
            registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://testsso1.teamshub.com/sso-session/login");
            registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "https://traffic.qytzt.cn:443");
            registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "https://test-qncx.sitechcloud.com:443");
        }
        if("prod".equals(activeProfile)){
            registrationBean.setFilter(onconMDCasFilter);
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/AddAdminLogUtil.java
File was deleted
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java
@@ -1,7 +1,7 @@
package com.stylefeng.guns.modular.system.util;
public class PushURL {
    public static String zull_user_url = "https://traffic.qytzt.cn";
    public static String zull_user_url = "https://test-qncx.sitechcloud.com";
    public static String order_push_url = zull_user_url + "/driver/base/order/pushOrderState";
    public static String driver_auth_url = zull_user_url + "/driver/base/driver/sendsms";
    public static String withdraw_auth_url = zull_user_url + "/driver/base/withdrawal/withdrawalAudit";
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java
@@ -174,7 +174,7 @@
        }
        if("test".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/root/server/app/key/private_key_test.pem");
            this.setPrivateKeyPath("/etraffic/server/private_key_test.pem");
            this.setUserName("xiaofei");
            this.setStatus("1");
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties1.java
File was deleted
ManagementQYTTravel/guns-admin/src/main/resources/application-test.yml
@@ -29,13 +29,13 @@
      max-request-size: 500MB
      max-file-size: 500MB
  redis:
    host: 172.21.35.151
    port: 6514
    password: Test_cache@20#25
    host: 10.88.154.24
    port: 7560
    password: Idcs_B_2025rd141
    database: 0
    timeout: 1000
    cluster:
      nodes: 172.21.35.151:6514,172.21.35.152:6514,172.21.35.153:6514,172.21.35.151:6515,172.21.35.152:6515,172.21.35.153:6515
      nodes: 10.88.154.24:7560,10.88.154.34:7560,10.88.154.59:7560,10.88.154.98:7560,10.88.154.100:7560,10.88.154.109:7560
mybatis-plus:
  type-aliases-package: com.stylefeng.guns.modular.system.model
@@ -49,10 +49,10 @@
---
spring:
  datasource:
    url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
    username: traffic_testusr
    password: QYT_test@20#25
    db-name: traffic_scdb #用来搜集数据库的所有表
    url: jdbc:mysql://10.86.17.201:5740/hn_ridingdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
    username: hn_ridingdb
    password: hn_ridingdb123456$#@!
    db-name: hn_ridingdb #用来搜集数据库的所有表
    filters: wall,mergeStat
@@ -60,7 +60,11 @@
spring:
  data:
    mongodb:
      uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.197:27017/traveling_track
      host: 10.88.204.206,10.88.204.207,10.88.204.208
      port: 27009
      username: qn_riding_adm
      password: QN_riding@Prom2025
      database: qn_ridingdb
---
@@ -87,7 +91,7 @@
#支付回调地址
#正式环境
callbackPath: https://traffic.qytzt.cn
callbackPath: https://test-qncx.sitechcloud.com
#交通部推送数据功能开关
pushMinistryOfTransport: false
ManagementQYTTravel/guns-admin/src/main/resources/logback.xml
@@ -7,7 +7,7 @@
    <contextName>logback</contextName>
    
    <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
    <property name="log.path" value="/data/app/logs/management"/>
    <property name="log.path" value="/etraffic/server/logs/management"/>
    
    <!--0. 日志格式和颜色渲染 -->
    <!-- 彩色日志依赖的渲染类 -->
MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyServer0.java
@@ -64,7 +64,7 @@
                // ChildChannelHandler 对出入的数据进行的业务操作,其继承ChannelInitializer
                b.childHandler(new ChildChannelHandler());
                System.out.println("服务端开启等待客户端连接 ... ...");
                Channel ch = b.bind(8888).sync().channel();
                Channel ch = b.bind(8808).sync().channel();
                ch.closeFuture().sync();
            } catch (Exception e) {
                e.printStackTrace();
MessagePushTravel/src/main/java/com/sinata/push/util/applets/WebSocketHandler.java
@@ -23,7 +23,7 @@
    //用于websocket握手的处理类
    private WebSocketServerHandshaker handshaker;
    private static final String WEB_SOCKET_URL = "ws://localhost:8888/websocket";
    private static final String WEB_SOCKET_URL = "ws://localhost:8808/websocket";
MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServer.java
@@ -50,7 +50,7 @@
        /**
         * 获取即时通讯启动端口 
         */
        private Integer nettyPort = 9999;
        private Integer nettyPort = 9909;
        @Override
        public void run() {
            EventLoopGroup bossGroup = new NioEventLoopGroup();
MessagePushTravel/src/main/resources/application.yml
@@ -11,14 +11,14 @@
      max-request-size: 100MB
      max-file-size: 100MB
  redis:
    host: 192.168.110.80
    port: 6379
    password: 123456
#    host: 172.21.35.151
#    port: 6512
#    password: SC_cache@20#25
#    database: 0
#    timeout: 1000
#    cluster:
#      nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513
#    host: 192.168.110.80
#    port: 6379
#    password: 123456
    host: 10.88.154.24
    port: 7560
    password: Idcs_B_2025rd141
    database: 0
    timeout: 1000
    cluster:
      nodes: 10.88.154.24:7560,10.88.154.34:7560,10.88.154.59:7560,10.88.154.98:7560,10.88.154.100:7560,10.88.154.109:7560
MessagePushTravel/src/main/resources/logback.xml
@@ -7,7 +7,7 @@
    <contextName>logback</contextName>
    
    <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
    <property name="log.path" value="/root/server/app/logs"/>
    <property name="log.path" value="etraffic/server/logs"/>
    
    <!--0. 日志格式和颜色渲染 -->
    <!-- 彩色日志依赖的渲染类 -->
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
@@ -868,7 +868,7 @@
     * @return
     */
    @ResponseBody
    @GetMapping("/base/user/addAppUser")
    @PostMapping("/base/user/addAppUser")
    public String addAppUser(String phone, String code, String areaCode){
        try {
            return userInfoService.addAppUser(phone, code, areaCode);
@@ -900,4 +900,19 @@
            return false;
        }
    }
    /**
     * 代驾系统验根据用户id获取电话号码
     * @param id
     * @return
     */
    @ResponseBody
    @GetMapping("/base/user/getUserPhone/{id}")
    public String getUserPhone(@PathVariable("id") Integer id){
        UserInfo userInfo = userInfoService.selectById(id);
        if(null != userInfo){
            return userInfo.getPhone();
        }
        return null;
    }
}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java
@@ -2100,64 +2100,67 @@
    @Override
    public OrderServerWarpper queryOrderServer(Integer orderId, Integer uid) throws Exception {
        OrderCrossCity orderCrossCity = this.selectById(orderId);
        //计算预计距离和剩余时间
        String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderCrossCity.getDriverId()));
        if (null == value || "".equals(value)) {
            System.err.println("司机没有上传位置信息");
        if(null != orderCrossCity){
            //计算预计距离和剩余时间
            String value = (String) redisTemplate.opsForValue().get("DRIVER" + String.valueOf(orderCrossCity.getDriverId()));
            if (null == value || "".equals(value)) {
                System.err.println("司机没有上传位置信息");
                //调用获取轨迹中的数据
                List<Map<String, Object>> list = orderPositionService.queryTrack(orderId, 3);
                if (list.size() > 0) {
                    Map<String, Object> map = list.get(list.size() - 1);
                    value = map.get("lon") + "," + map.get("lat");
                }
            }
            
            //调用获取轨迹中的数据
            List<Map<String, Object>> list = orderPositionService.queryTrack(orderId, 3);
            if (list.size() > 0) {
                Map<String, Object> map = list.get(list.size() - 1);
                value = map.get("lon") + "," + map.get("lat");
            OrderServerWarpper orderServerWarpper = new OrderServerWarpper();
            orderServerWarpper.setOrderId(orderCrossCity.getId());
            orderServerWarpper.setOrderType(3);
            orderServerWarpper.setState(orderCrossCity.getState());
            orderServerWarpper.setLon(null != value ? value.split(",")[0] : "0.0");
            orderServerWarpper.setLat(null != value ? value.split(",")[1] : "0.0");
            orderServerWarpper.setReassignNotice(orderCrossCity.getReassignNotice());
            if (orderCrossCity.getState() == 2 || orderCrossCity.getState() == 3) {//前往预约地
                // TODO: 2023/11/4 无法修改
                Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderCrossCity.getStartLon() + "," + orderCrossCity.getStartLat(), 1);
                String d = "0";
                String t = "0";
                if (null == distance) {
                    System.err.println("查询距离出错了");
                } else {
                    d = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000), new MathContext(2, RoundingMode.HALF_EVEN)).toString();
                    t = new BigDecimal(distance.get("duration")).divide(new BigDecimal(60), new MathContext(2, RoundingMode.HALF_EVEN)).intValue() + "";
                }
                orderServerWarpper.setReservationMileage(d);
                orderServerWarpper.setReservationTime(t);
                orderServerWarpper.setServedMileage("0");
                orderServerWarpper.setServedTime("0");
                orderServerWarpper.setLaveMileage("0");
                orderServerWarpper.setLaveTime("0");
            }
        }
        OrderServerWarpper orderServerWarpper = new OrderServerWarpper();
        orderServerWarpper.setOrderId(orderCrossCity.getId());
        orderServerWarpper.setOrderType(3);
        orderServerWarpper.setState(orderCrossCity.getState());
        orderServerWarpper.setLon(null != value ? value.split(",")[0] : "0.0");
        orderServerWarpper.setLat(null != value ? value.split(",")[1] : "0.0");
        orderServerWarpper.setReassignNotice(orderCrossCity.getReassignNotice());
        if (orderCrossCity.getState() == 2 || orderCrossCity.getState() == 3) {//前往预约地
            // TODO: 2023/11/4 无法修改
            Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderCrossCity.getStartLon() + "," + orderCrossCity.getStartLat(), 1);
            String d = "0";
            String t = "0";
            if (null == distance) {
                System.err.println("查询距离出错了");
            } else {
                d = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000), new MathContext(2, RoundingMode.HALF_EVEN)).toString();
                t = new BigDecimal(distance.get("duration")).divide(new BigDecimal(60), new MathContext(2, RoundingMode.HALF_EVEN)).intValue() + "";
            if (orderCrossCity.getState() == 5 || orderCrossCity.getState() == 6) {//服务中
                // TODO: 2023/11/4 无法修改
                Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderCrossCity.getEndLon() + "," + orderCrossCity.getEndLat(), 1);
                String d = "0";
                String t = "0";
                if (null == distance) {
                    System.err.println("查询距离出错了");
                } else {
                    d = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000), new MathContext(2, RoundingMode.HALF_EVEN)).toString();
                    t = new BigDecimal(distance.get("duration")).divide(new BigDecimal(60), new MathContext(2, RoundingMode.HALF_EVEN)).intValue() + "";
                }
                orderServerWarpper.setReservationMileage("0");
                orderServerWarpper.setReservationTime("0");
                orderServerWarpper.setServedMileage(String.valueOf(orderCrossCity.getMileage() / 1000));
                orderServerWarpper.setServedTime(Long.valueOf((new Date().getTime() - orderCrossCity.getStartServiceTime().getTime()) / 60000).intValue() + "");
                orderServerWarpper.setLaveMileage(d);
                orderServerWarpper.setLaveTime(t);
            }
            orderServerWarpper.setReservationMileage(d);
            orderServerWarpper.setReservationTime(t);
            orderServerWarpper.setServedMileage("0");
            orderServerWarpper.setServedTime("0");
            orderServerWarpper.setLaveMileage("0");
            orderServerWarpper.setLaveTime("0");
            return orderServerWarpper;
        }
        if (orderCrossCity.getState() == 5 || orderCrossCity.getState() == 6) {//服务中
            // TODO: 2023/11/4 无法修改
            Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderCrossCity.getEndLon() + "," + orderCrossCity.getEndLat(), 1);
            String d = "0";
            String t = "0";
            if (null == distance) {
                System.err.println("查询距离出错了");
            } else {
                d = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000), new MathContext(2, RoundingMode.HALF_EVEN)).toString();
                t = new BigDecimal(distance.get("duration")).divide(new BigDecimal(60), new MathContext(2, RoundingMode.HALF_EVEN)).intValue() + "";
            }
            orderServerWarpper.setReservationMileage("0");
            orderServerWarpper.setReservationTime("0");
            orderServerWarpper.setServedMileage(String.valueOf(orderCrossCity.getMileage() / 1000));
            orderServerWarpper.setServedTime(Long.valueOf((new Date().getTime() - orderCrossCity.getStartServiceTime().getTime()) / 60000).intValue() + "");
            orderServerWarpper.setLaveMileage(d);
            orderServerWarpper.setLaveTime(t);
        }
        return orderServerWarpper;
        return new OrderServerWarpper();
    }
    
    
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/controller/PayInfoController.java
@@ -4,7 +4,6 @@
import com.stylefeng.guns.modular.shunfeng.model.OrderRide;
import com.stylefeng.guns.modular.shunfeng.model.vo.ApiJson;
import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService;
import com.stylefeng.guns.modular.shunfeng.service.IParamService;
import com.stylefeng.guns.modular.shunfeng.service.ITimeTaskService;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
@@ -32,8 +31,6 @@
public class PayInfoController {
    @Autowired
    private IParamService paramService;
    @Autowired
    private IOrderRideService orderRideService;
    @Autowired
    private ITimeTaskService timeTaskService;
@@ -53,6 +50,13 @@
     * @param couponId
     * @return
     */
    @ResponseBody
    @PostMapping("/payBalanceRide")
    @ApiOperation(value = "余额支付", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"),
            @ApiImplicitParam(name = "couponId", value = "优惠券id", dataType = "int"),
    })
    public Object payBalanceRide(Integer orderId,Integer couponId){
        try {
            OrderRide orderRide=orderRideService.selectById(orderId);
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/controller/rideCommentController.java
@@ -14,12 +14,15 @@
import com.stylefeng.guns.modular.shunfeng.util.SensitiveWordUtil;
import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper;
import com.stylefeng.guns.modular.system.model.SensitiveWords;
import com.stylefeng.guns.modular.system.model.TCarBrand;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
import com.stylefeng.guns.modular.system.service.ITCarBrandService;
import com.stylefeng.guns.modular.system.service.IUserInfoService;
import com.stylefeng.guns.modular.system.util.DateUtil;
import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil;
import com.stylefeng.guns.modular.system.util.PushUtil;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.UserUtil;
import io.swagger.annotations.*;
import net.sf.json.JSONObject;
@@ -50,9 +53,6 @@
        /*顺风车设置*/
        @Autowired
        private IParamRideService paramRideService;
        /*系统设置*/
        @Autowired
        private IParamService paramService;
        /*定时任务*/
        @Autowired
        private ITimeTaskService timeTaskService;
@@ -61,7 +61,7 @@
        private IDriverRideService driverRideService;
        /*顺风车品牌*/
        @Autowired
        private IBrandService brandService;
        private ITCarBrandService carBrandService;
        /*评价*/
        @Autowired
        private IEvaluateService evaluateService;
@@ -111,7 +111,7 @@
    public Object authentication(Integer userId,String name,String  identity,Integer type) {
        try {
            if (userId == null || userId == 0) {
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            /*发布顺风车行程实名认证*/
            UserApply apply=new UserApply();
@@ -129,6 +129,7 @@
                /*修改用户实名认证通过*/
                UserInfo userInfo=new UserInfo();
                userInfo.setId(userId);
                userInfo.setIsAuth(2);
                String sex = identity.substring(16, 17); //取指定位置的值(16位之后,17位结束;)
                int b = Integer.parseInt(sex);//强制类型转换
                if (b % 2 == 0) {
@@ -145,11 +146,11 @@
            applyService.insert(apply);
            Map<String,Object> reMap=new HashMap<>();
            reMap.put("auditState", aBoolean);
            return ApiJson.returnOK(reMap);
            return ResultUtil.success(reMap);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -164,7 +165,7 @@
    public Object authentication(Integer userId,String headImg) {
//        try {
//            if (userId == null || userId == 0) {
//                return ApiJson.returnNG("userId不能为空");
//                return ResultUtil.paranErr("userId不能为空");
//            }
//            /*查询实名认证信息*/
//            UserApply apply=applyService.selectOne(new EntityWrapper<UserApply>().eq("userId",userId)
@@ -202,7 +203,7 @@
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
        return ApiJson.returnNG("异常");
        return ResultUtil.paranErr("异常");
    }
    /**
@@ -214,12 +215,12 @@
    @ApiOperation(value = "获取车辆品牌列表", httpMethod = "GET")
    public Object getBrandList(){
        try {
            List<Brand> brands=brandService.selectList(null);
            return ApiJson.returnOK(brands);
            List<TCarBrand> tCarBrands = carBrandService.selectList(null);
            return ApiJson.returnOK(tCarBrands);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -238,10 +239,10 @@
    public Object homeOrderCount(Integer userId,Integer type){
        try {
            if(ToolUtil.isEmpty(userId)){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            Integer count=0;
@@ -260,7 +261,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("获取异常");
        return ResultUtil.error("获取异常");
    }
    /**
@@ -279,10 +280,10 @@
    public Object homeOrderList(Integer userId,Integer type,Integer current,Integer size){
        try {
            if(ToolUtil.isEmpty(userId)){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            List<OrderRideVo> rideVoList=new ArrayList<>();
            OrderRideVo orderRideVo=new OrderRideVo();
@@ -305,7 +306,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("获取异常");
        return ResultUtil.error("获取异常");
    }
    /**
@@ -366,7 +367,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("获取异常");
        return ResultUtil.error("获取异常");
    }
    /**
@@ -401,22 +402,22 @@
                           String endName,Double money,Integer isDai,String lxPhone){
        try {
            if(ToolUtil.isEmpty(userId)){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if(ToolUtil.isEmpty(startTime)){
                return ApiJson.returnNG("startTime不能为空");
                return ResultUtil.paranErr("startTime不能为空");
            }
            if(ToolUtil.isEmpty(num)){
                return ApiJson.returnNG("num不能为空");
                return ResultUtil.paranErr("num不能为空");
            }
            if(ToolUtil.isEmpty(startName)){
                return ApiJson.returnNG("startName不能为空");
                return ResultUtil.paranErr("startName不能为空");
            }
            if(ToolUtil.isEmpty(endName)){
                return ApiJson.returnNG("endName不能为空");
                return ResultUtil.paranErr("endName不能为空");
            }
            if(ToolUtil.isEmpty(money)){
                return ApiJson.returnNG("money不能为空");
                return ResultUtil.paranErr("money不能为空");
            }
            /*用户只能发布一个进行中的行程*/
            /*EntityWrapper<OrderRide> entityWrapper=new EntityWrapper();
@@ -424,7 +425,7 @@
            entityWrapper.in("state","1,2,3,4");
            Integer count=orderRideService.selectCount(entityWrapper);
            if(count>0){
                return ApiJson.returnNG("还有进行中的订单");
                return ResultUtil.paranErr("还有进行中的订单");
            }*/
            /*用户可以发布多个订单*/
            ParamRide paramRide=paramRideService.selectOne(new EntityWrapper<ParamRide>().eq("type",2));
@@ -455,15 +456,9 @@
            orderRide.setState(1);//未支付状态
            orderRideService.insert(orderRide);
            //todo 定时人数  自动取消订单
            Param param = paramService.selectOne(new EntityWrapper<Param>().eq("type", 21));//顺风车支付倒计时设置(分钟)
            Integer time =10;
            Map<String,Object> reMap=new HashMap<>();
            if(param != null){
                time=Integer.parseInt(param.getContext());
                reMap.put("djs",time);
            }else{
                reMap.put("djs",time);
            }
            reMap.put("djs",time);
            reMap.put("orderId",orderRide.getId());
            reMap.put("addTime",orderRide.getAddTime());
            // 添加定时任务信息
@@ -479,11 +474,11 @@
            maps.put("orderId",orderRide.getId());
            maps.put("timeTaskId",timeTask.getId());
            QuartzManager.addJob(CourseExamineRide.class,(CourseExamineRide.DSCE+orderRide.getId()).toUpperCase(), TimeJobType.UNLOCK, DateUtil.getDate_strYMdHms(System.currentTimeMillis() + 1000*60*time) , maps);
            return ApiJson.returnOK(orderRide.getId());
            return ResultUtil.success(orderRide.getId());
        } catch (Exception e) {
            e.printStackTrace();
        }
            return ApiJson.returnNG("异常");
            return ResultUtil.error("异常");
        }
    /**
@@ -512,19 +507,19 @@
    public Object driverAddTravel(Integer driverId,String startTime,Integer num,String startName,String endName,Double startLat,Double startLon,Double endLat,Double endLon){
        try {
            if(ToolUtil.isEmpty(driverId)){
                return ApiJson.returnNG("driverId不能为空");
                return ResultUtil.paranErr("driverId不能为空");
            }
            if(ToolUtil.isEmpty(startTime)){
                return ApiJson.returnNG("startTime不能为空");
                return ResultUtil.paranErr("startTime不能为空");
            }
            if(ToolUtil.isEmpty(num)){
                return ApiJson.returnNG("num不能为空");
                return ResultUtil.paranErr("num不能为空");
            }
            if(ToolUtil.isEmpty(startName)){
                return ApiJson.returnNG("startName不能为空");
                return ResultUtil.paranErr("startName不能为空");
            }
            if(ToolUtil.isEmpty(endName)){
                return ApiJson.returnNG("endName不能为空");
                return ResultUtil.paranErr("endName不能为空");
            }
            /*用户的资料过期了不可以发布行程*/
            DriverRide driverRide=driverRideService.selectById(driverId);
@@ -535,7 +530,7 @@
                            || DateUtil.getDate(driverRide.getDutyInsuranceTime(), "yyyy-MM-dd").getTime()-new Date().getTime()<0
                            || DateUtil.getDate(driverRide.getAnnualInspectionTime(), "yyyy-MM-dd").getTime()-new Date().getTime()<0
                            ){
                        return ApiJson.returnNG("您的证件已过期,请重新上传资料");
                        return ResultUtil.error("您的证件已过期,请重新上传资料");
                    }
                }
                /*1一个司机可以创建多个行程*/
@@ -560,7 +555,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
@@ -607,46 +602,46 @@
                              String businessInsuranceTime,String businessInsuranceImg,String dutyInsuranceTime,String dutyInsuranceImg,String annualInspectionTime,String annualInspectionImg){
        try {
            if(ToolUtil.isEmpty(userId)){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if(ToolUtil.isEmpty(carType)){
                return ApiJson.returnNG("carType不能为空");
                return ResultUtil.paranErr("carType不能为空");
            }
            if(ToolUtil.isEmpty(brandId)){
                return ApiJson.returnNG("brandId不能为空");
                return ResultUtil.paranErr("brandId不能为空");
            }
            if(ToolUtil.isEmpty(carNum)){
                return ApiJson.returnNG("carNum不能为空");
                return ResultUtil.paranErr("carNum不能为空");
            }
            if(ToolUtil.isEmpty(license)){
                return ApiJson.returnNG("license不能为空");
                return ResultUtil.paranErr("license不能为空");
            }
            if(ToolUtil.isEmpty(licenseImg)){
                return ApiJson.returnNG("licenseImg不能为空");
                return ResultUtil.paranErr("licenseImg不能为空");
            }
            if(ToolUtil.isEmpty(comInsuranceTime)){
                return ApiJson.returnNG("comInsuranceTime不能为空");
                return ResultUtil.paranErr("comInsuranceTime不能为空");
            }
            if(ToolUtil.isEmpty(comInsuranceImg)){
                return ApiJson.returnNG("comInsuranceImg不能为空");
                return ResultUtil.paranErr("comInsuranceImg不能为空");
            }
            if(ToolUtil.isEmpty(businessInsuranceTime)){
                return ApiJson.returnNG("businessInsuranceTime不能为空");
                return ResultUtil.paranErr("businessInsuranceTime不能为空");
            }
            if(ToolUtil.isEmpty(businessInsuranceImg)){
                return ApiJson.returnNG("businessInsuranceImg不能为空");
                return ResultUtil.paranErr("businessInsuranceImg不能为空");
            }
            if(ToolUtil.isEmpty(dutyInsuranceTime)){
                return ApiJson.returnNG("dutyInsuranceTime不能为空");
                return ResultUtil.paranErr("dutyInsuranceTime不能为空");
            }
            if(ToolUtil.isEmpty(dutyInsuranceImg)){
                return ApiJson.returnNG("dutyInsuranceImg不能为空");
                return ResultUtil.paranErr("dutyInsuranceImg不能为空");
            }
            if(ToolUtil.isEmpty(annualInspectionTime)){
                return ApiJson.returnNG("annualInspectionTime不能为空");
                return ResultUtil.paranErr("annualInspectionTime不能为空");
            }
            if(ToolUtil.isEmpty(annualInspectionImg)){
                return ApiJson.returnNG("annualInspectionImg不能为空");
                return ResultUtil.paranErr("annualInspectionImg不能为空");
            }
            DriverRide driverRide=new DriverRide();
            driverRide.setBrandId(brandId);
@@ -710,7 +705,7 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -724,19 +719,19 @@
    public Object driverInfo(Integer driverId){
        try {
            if(ToolUtil.isEmpty(driverId)){
                return ApiJson.returnNG("driverId不能为空");
                return ResultUtil.paranErr("driverId不能为空");
            }
            DriverRide driverRide=driverRideService.selectById(driverId);
            /*获取司机品牌id*/
            Brand b=brandService.selectById(driverRide.getBrandId());
            if(b!=null){
                driverRide.setCarType(b.getName());
            TCarBrand tCarBrand = carBrandService.selectById(driverRide.getBrandId());
            if(tCarBrand!=null){
                driverRide.setCarType(tCarBrand.getName());
            }
            return ApiJson.returnOK(driverRide);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -755,10 +750,10 @@
    public Object cancelServiceMoney(Integer orderId,Integer type){
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            Double serviceMoney=0d;
            if(type==1){//用户
@@ -800,11 +795,11 @@
                }
                orderTravelService.updateById(orderTravel);//更新取消服务费
            }
            return ApiJson.returnOK(serviceMoney);
            return ResultUtil.success(serviceMoney);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -819,14 +814,14 @@
    public Object userCancel(Integer orderId){
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            /*查看这个订单是否在进行中*/
            OrderRide orderRide=orderRideService.selectById(orderId);
            if(orderRide!=null){
                /*查询该订单是否已经取消*/
                if(orderRide.getState()==6){
                    return ApiJson.returnNG("该订单已取消");
                    return ResultUtil.error("该订单已取消");
                }
                //用户取消给司机推送
                if(orderRide.getDriverId()!=null) {
@@ -844,11 +839,11 @@
                    orderTravelService.updateById(orderTravel);
                }
            }
            return ApiJson.returnOK("");
            return ResultUtil.success("");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    //用户取消退款
    public void userCancelTuik(OrderRide orderRide){
@@ -905,12 +900,12 @@
    public Object driverCancel(Integer orderId){
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            OrderTravel orderTravel=orderTravelService.selectById(orderId);
            if(orderTravel!=null){
                if(orderTravel.getState()==6){
                    return ApiJson.returnNG("该订单已取消");
                    return ResultUtil.error("该订单已取消");
                }
                DriverRide driverRide=driverRideService.selectById(orderTravel.getDriverId());
                if(orderTravel.getServiceMoney()!=null && orderTravel.getServiceMoney()>0){
@@ -961,11 +956,11 @@
                }
            }
            return ApiJson.returnOK("");
            return ResultUtil.success("");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -986,10 +981,10 @@
    public Object driverOperation(Integer userOrderId,Integer type,Integer driverOrderId){
        try {
            if(ToolUtil.isEmpty(driverOrderId)){
                return ApiJson.returnNG("driverOrderId不能为空");
                return ResultUtil.paranErr("driverOrderId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            OrderTravel orderTravel=orderTravelService.selectById(driverOrderId);//司机行程
            /*用户的资料过期了不可以发布行程*/
@@ -1000,17 +995,17 @@
                        || DateUtil.getDate(driverRide.getDutyInsuranceTime(), "yyyy-MM-dd").getTime()-new Date().getTime()<0
                        || DateUtil.getDate(driverRide.getAnnualInspectionTime(), "yyyy-MM-dd").getTime()-new Date().getTime()<0
                        ){
                    return ApiJson.returnNG("您的证件已过期,请重新上传资料");
                    return ResultUtil.error("您的证件已过期,请重新上传资料");
                }
            }
            OrderRide orderRide=orderRideService.selectById(userOrderId);
            if(orderRide!=null && orderRide.getState()==6){
                return  ApiJson.returnNG("用户已取消该行程");
                return  ResultUtil.error("用户已取消该行程");
            }
            if(orderTravel!=null){
                if(type==1){//1确认同行 一个行程只能匹配一个订单
                    if(orderTravel.getState()==3){
                        return ApiJson.returnNG("该行程已经绑定了用户订单");
                        return ResultUtil.error("该行程已经绑定了用户订单");
                    }
                    orderTravel.setState(3);
                    //绑定司机行程、设置用户订单状态
@@ -1045,11 +1040,7 @@
                    if(ToolUtil.isNotEmpty(driverRide.getByInviteCode())){
                        /*计算推广用户的提成*/
                        UserInfo userInfo1=userInfoService.selectOne(new EntityWrapper<UserInfo>().eq("inviteCodeRide",driverRide.getByInviteCode()));
                        Param param=paramService.selectOne(new EntityWrapper<Param>().eq("type",22));
                        Double discount=100d;
                        if(param!=null){
                            discount=Double.valueOf(param.getContext());
                        }
                        Double money=orderRide.getMoney()*discount/100;//提成金额
                        userInfoService.updateById(userInfo1);
                        
@@ -1079,11 +1070,11 @@
                }
            }
            pushUtil.pushOrderState(1, orderRide.getUserId(), orderRide.getId(), 8, orderRide.getState(), null);
            return ApiJson.returnOK("");
            return ResultUtil.success("");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
     * 用户评价
@@ -1107,16 +1098,16 @@
    public Object evaluate(Integer orderId,Integer driverId,Integer userId,Integer score,String  content){
        try {
            if(userId == null || userId == 0){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if(driverId == null || driverId == 0){
                return ApiJson.returnNG("driverId不能为空");
                return ResultUtil.paranErr("driverId不能为空");
            }
            if(orderId == null || orderId == 0){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            if(score == null || score == 0){
                return ApiJson.returnNG("score不能为空");
                return ResultUtil.paranErr("score不能为空");
            }
            Evaluate evaluate=new Evaluate();
            evaluate.setAddTime(new Date());
@@ -1134,7 +1125,7 @@
                SensitiveWordUtil.init(sensitiveWordSet);
                boolean result = SensitiveWordUtil.contains(content);
                if(result){
                    return ApiJson.returnNG("评价内容包含敏感词");
                    return ResultUtil.error("评价内容包含敏感词");
                }
            }
            evaluate.setContent(content);
@@ -1161,11 +1152,11 @@
            orderRideService.updateById(orderTaxi);
            evaluateService.insert(evaluate);
            /*需要反订单数据*/
            return ApiJson.returnOK(orderId);
            return ResultUtil.success(orderId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("");
        return ResultUtil.error("");
    }
    /**
@@ -1191,13 +1182,13 @@
    public Object complaints(Integer driverId,Integer userId,String  content,String reMark,Integer type,Integer orderId) {
        try {
            if (userId == null || userId == 0) {
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            if (driverId == null || driverId == 0) {
                return ApiJson.returnNG("driverId不能为空");
                return ResultUtil.paranErr("driverId不能为空");
            }
            if (orderId == null || orderId == 0) {
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            Complaints complaints=new Complaints();
            complaints.setAddTime(new Date());
@@ -1212,7 +1203,7 @@
            SensitiveWordUtil.init(sensitiveWordSet);
            boolean result = SensitiveWordUtil.contains(content);
            if(result){
                return ApiJson.returnNG("投诉内容包含敏感词");
                return ResultUtil.error("投诉内容包含敏感词");
            }
            complaints.setContent(content);
            complaints.setReMark(reMark);
@@ -1240,11 +1231,11 @@
                orderTravel.setIsComplaint(2);
                orderTravelService.updateById(orderTravel);
            }
            return ApiJson.returnOK("投诉成功");
            return ResultUtil.success("投诉成功");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("");
        return ResultUtil.error("");
    }
    /**
     *  用户邀请司机接单(需要发送消息)
@@ -1262,10 +1253,10 @@
    public Object myOrders(Integer orderId,Integer userId){
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            if(ToolUtil.isEmpty(userId)){
                return ApiJson.returnNG("userId不能为空");
                return ResultUtil.paranErr("userId不能为空");
            }
            OrderTravel orderTravel=orderTravelService.selectById(orderId);
            UserInfo userInfo_=userInfoService.selectOne(new EntityWrapper<UserInfo>().eq("driverId",orderTravel.getDriverId()));//司机用户
@@ -1280,11 +1271,11 @@
                    throw new RuntimeException(e);
                }
            }
            return ApiJson.returnOK("邀请成功");
            return ResultUtil.success("邀请成功");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
     * 用户订单匹配列表页面,用户订单去匹配司机的行程
@@ -1299,23 +1290,15 @@
    @ApiOperation(value = "用户订单匹配列表页面,用户订单去匹配司机的行程", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"),
            @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int"),
            @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"),
            @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"),
            @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int")
    })
    public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){
    public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
            }
            if(ToolUtil.isEmpty(lon)){
                return ApiJson.returnNG("lon不能为空");
            }
            if(ToolUtil.isEmpty(lat)){
                return ApiJson.returnNG("lat不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            OrderRide orderRide=orderRideService.selectById(orderId);
            current=current==null?1:current;
@@ -1325,16 +1308,16 @@
            OrderRideVo orderRideVo=new OrderRideVo();
            orderRideVo.setCurrent(current);
            orderRideVo.setSize(size);
            orderRideVo.setLon(lon);
            orderRideVo.setLat(lat);
            orderRideVo.setLon(orderRide.getStartLon());
            orderRideVo.setLat(orderRide.getStartLat());
            orderRideVo.setNum(orderRide.getNum());
            orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近
            List<OrderRideVo> orderRides=orderTravelService.getOrderTravel(orderRideVo);
            return ApiJson.returnOK(orderRides);
            return ResultUtil.success(orderRides);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -1352,24 +1335,16 @@
    @ApiOperation(value = "司机订单匹配列表页面(司机的订单去匹配乘客订单)", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"),
            @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int"),
            @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"),
            @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"),
            @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int")
    })
    public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){
    public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){
        try {
            try {
                if(ToolUtil.isEmpty(orderId)){
                    return ApiJson.returnNG("orderId不能为空");
                    return ResultUtil.paranErr("orderId不能为空");
                }
                if(ToolUtil.isEmpty(type)){
                    return ApiJson.returnNG("type不能为空");
                }
                if(ToolUtil.isEmpty(lon)){
                    return ApiJson.returnNG("lon不能为空");
                }
                if(ToolUtil.isEmpty(lat)){
                    return ApiJson.returnNG("lat不能为空");
                    return ResultUtil.paranErr("type不能为空");
                }
                OrderTravel orderTravel=orderTravelService.selectById(orderId);
                current=current==null?1:current;
@@ -1380,18 +1355,18 @@
                orderRideVo.setCurrent(current);
                orderRideVo.setSize(size);
                orderRideVo.setNum(orderTravel.getNum());
                orderRideVo.setLon(lon);
                orderRideVo.setLat(lat);
                orderRideVo.setLon(orderTravel.getStartLon());
                orderRideVo.setLat(orderTravel.getStartLat());
                orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低
                List<OrderRideVo> orderRides=orderRideService.getOrderRide(orderRideVo);
                return ApiJson.returnOK(orderRides);
                return ResultUtil.success(orderRides);
            } catch (Exception e) {
                e.printStackTrace();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -1412,10 +1387,10 @@
    public Object orderInfo(Integer orderId,Integer type,Double lon,Double lat) {
        try {
            if(ToolUtil.isEmpty(orderId)){
                return ApiJson.returnNG("orderId不能为空");
                return ResultUtil.paranErr("orderId不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            //取司机的经纬度
            OrderRideInfoVo orderRideInfoVo=new OrderRideInfoVo();
@@ -1429,19 +1404,13 @@
                orderRideInfoVo=orderTravelService.getOrderInfo(orderRideInfoVo);
            }
            /*获取顺风车订单支付倒计时*/
            Param param = paramService.selectOne(new EntityWrapper<Param>().eq("type", 21));//顺风车支付倒计时设置(分钟)
            Integer time =10;
            if(param != null){
                time=Integer.parseInt(param.getContext());
                orderRideInfoVo.setDjs(time);
            }else{
                orderRideInfoVo.setDjs(time);
            }
            return ApiJson.returnOK(orderRideInfoVo);
            orderRideInfoVo.setDjs(time);
            return ResultUtil.success(orderRideInfoVo);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return ApiJson.returnNG("异常");
            return ResultUtil.error("异常");
        }
    /**
@@ -1456,10 +1425,10 @@
    public Object orderInfo(String inviteCode,Integer type) {
        try {
            if(ToolUtil.isEmpty(inviteCode)){
                return ApiJson.returnNG("inviteCode不能为空");
                return ResultUtil.paranErr("inviteCode不能为空");
            }
            if(ToolUtil.isEmpty(type)){
                return ApiJson.returnNG("type不能为空");
                return ResultUtil.paranErr("type不能为空");
            }
            Integer count=0;
            if(type==1){
@@ -1467,11 +1436,11 @@
            }else {
                count=userInfoService.selectCount(new EntityWrapper<UserInfo>().eq("inviteCodeRide",inviteCode));
            }
            return ApiJson.returnOK(count);
            return ResultUtil.success(count);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
    /**
@@ -1486,7 +1455,7 @@
    public Object orderInfo(Integer driverId) {
        try {
            if(ToolUtil.isEmpty(driverId)){
                return ApiJson.returnNG("driverId不能为空");
                return ResultUtil.paranErr("driverId不能为空");
            }
            DriverRide driverRide=driverRideService.selectById(driverId);
            Integer count=0;
@@ -1499,11 +1468,11 @@
                    count=1;
                }
            }
            return ApiJson.returnOK(count);
            return ResultUtil.success(count);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ApiJson.returnNG("异常");
        return ResultUtil.error("异常");
    }
}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/BrandMapper.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/ParamMapper.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/BrandMapper.xml
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/OrderRideMapper.xml
@@ -31,11 +31,12 @@
    </sql>
    <!--用户顺风车订单 type :1待处理的订单,2根据线路、时间,人数综合匹配排序 3按时间排序最早,4距离最近排序,5价格最高 and r.startTime>=now()-->
    <select id="getOrderRide" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo">
        select r.*,_fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat)  as distance,u.headImg,u.sex,u.totalOrders,u.nickName as name,
        r.id as userOrderId,t.id as  driverOrderId from app_order_ride r
        select r.*,calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,u.avatar as headImg,u.sex,u.totalOrders,u.nickName as name,
        r.id as userOrderId,t.id as  driverOrderId, r.startLon as lon, r.startLat as lat
        from app_order_ride r
        left join app_order_travel t on r.travelId=t.id
        left join app_user_info u on r.userId=u.id
        left join app_user_info u1 on r.driverId=u1.driverId
        left join t_user u on r.userId=u.id
        left join t_user u1 on r.driverId=u1.driverId
        <where>
            <if test="userId!=null">
                and r.userId = #{userId}
@@ -51,13 +52,13 @@
            order by r.startTime desc
        </if>
        <if test="type==2">
            order by _fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat) asc,r.startTime desc,(r.num-#{num}) asc
            order by calculate_distance(#{lat},#{lon},r.startLat, r.startLon) asc,r.startTime desc,(r.num-#{num}) asc
        </if>
        <if test="type==3">
            order by r.startTime asc
        </if>
        <if test="type==4">
            order by _fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat) asc
            order by calculate_distance(#{lat},#{lon},r.startLat, r.startLon) asc
        </if>
        <if test="type==5">
            order by r.money desc
@@ -67,10 +68,10 @@
    <!--获取用户身份和司机身份的订单 只需要按照时间排序-->
    <select id="getOrderRideAndTravel" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo">
       select * from (
         select r.addTime,r.startTime,1 as type,r.state,r.startName,r.endName,r.userId,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,r.money from app_order_ride r
         select r.addTime,r.startTime,1 as type,r.state,r.startName,r.endName,r.userId,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,r.money, r.startLon as lon, r.startLat as lat from app_order_ride r
                left join app_order_travel t on r.travelId=t.id where r.userId=#{userId}
        UNION
        select t.addTime,t.startTime,2 as type,t.state,t.startName,t.endName,0,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,0 as money  from app_order_travel t
        select t.addTime,t.startTime,2 as type,t.state,t.startName,t.endName,0,t.driverId,r.num,r.id as userOrderId,t.id as driverOrderId,0 as money, r.startLon as lon, r.startLat as lat  from app_order_travel t
                left join app_order_ride r on r.travelId=t.id where t.driverId=#{driverId}
        ) o
        order by o.addTime desc
@@ -79,12 +80,12 @@
    <!--获取订单详情-->
    <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo">
        select r.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isEvaluate,t.isComplaint,
        r.num,r.userId,r.driverId ,u.headImg,CASE  when r.isDai=1 then r.lxPhone else u.phone end as phone,u.sex,u.nickName as name,u.totalOrders,
        _fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat) as distance
        r.num,r.userId,r.driverId ,u.avatar as headImg,CASE  when r.isDai=1 then r.lxPhone else u.phone end as phone,u.sex,u.nickName as name,u.totalOrders,
        calculate_distance(#{lat},#{lon},r.startLat, r.startLon) as distance,r.startLat as lat, r.startLon as lon
        from (select * from app_order_ride where id=#{userOrderId}) r
        left join app_order_travel t on r.travelId=t.id
        left join app_driver_ride d on d.id=r.driverId
        left join app_user_info u on r.userId=u.id
        left join t_user u on r.userId=u.id
    </select>
    <select id="queryMyOrderList" resultType="java.util.Map">
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/OrderTravelMapper.xml
@@ -25,11 +25,11 @@
    </sql>
    <!--顺风车司机订单行程 type :1待处理的订单,2根据线路、时间,人数综合匹配排序 3按时间排序,4距离最近排序 and r.startTime>=now()-->
    <select id="getOrderTravel" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideVo">
        select r.*,_fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat)  as distance,d.totalOrders,u.sex,u.headImg,u.realName as name,
        r.id as driverOrderId,i.id as userOrderId
        select r.*,calculate_distance(#{lat},#{lon},r.startLat, r.startLon)  as distance,d.totalOrders,u.sex,u.avatar as headImg,u.nickName as name,
        r.id as driverOrderId,i.id as userOrderId, r.startLon as lon, r.startLat as lat
        from app_order_travel r
        left join app_order_ride i on i.travelId=r.id
        left join app_user_info u on u.driverId = r.driverId
        left join t_user u on u.driverId = r.driverId
        left join app_driver_ride d on d.id=r.driverId
        <where>
            <if test="driverId!=null">
@@ -46,24 +46,24 @@
          order by r.startTime desc
        </if>
        <if test="type==2">
            order by  _fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat)  asc,r.startTime desc,(r.num-#{num}) asc
            order by calculate_distance(#{lat},#{lon}, r.startLat,r.startLon)  asc,r.startTime desc,(r.num-#{num}) asc
        </if>
        <if test="type==3">
            order by r.startTime asc
        </if>
        <if test="type==4">
            order by _fnGetDistance(#{lon},#{lat}, r.startLon, r.startLat)  asc
            order by calculate_distance(#{lat},#{lon}, r.startLat,r.startLon)  asc
        </if>
        LIMIT #{current},#{size}
    </select>
    <!--根据订单id获取订单详情-->
    <select id="getOrderInfo" resultType="com.stylefeng.guns.modular.shunfeng.model.vo.OrderRideInfoVo">
        select t.addTime,r.startTime,r.endName,r.startName,r.money,r.id as userOrderId,r.state,t.id as driverOrderId,r.isComplaint,r.num,
        r.userId,r.driverId,u.headImg,u.phone,u.sex,u.realName as name,d.carNum,d.carType,d.totalOrders,IFNULL(format(d.evaluateScore/d.evaluateNum,2),0)as evaluateScore,r.evaluateScoreUser,r.isEvaluate
        ,r.content
        r.userId,r.driverId,u.avatar as headImg,u.phone,u.sex,u.nickName as realName as name,d.carNum,d.carType,d.totalOrders,IFNULL(format(d.evaluateScore/d.evaluateNum,2),0)as evaluateScore,r.evaluateScoreUser,r.isEvaluate
        ,r.content,t.startLat as lat, t.startLon as lon
        from (select * from app_order_travel where id= #{driverOrderId}) t
        left join app_order_ride r on t.id=r.travelId
        left join app_driver_ride d on d.id=t.driverId
        left join app_user_info u on d.id=u.driverId
        left join t_user u on d.id=u.driverId
    </select>
</mapper>
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/dao/mapping/ParamMapper.xml
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/model/Brand.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/model/Param.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/IBrandService.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/IParamService.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/impl/BrandServiceImpl.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/service/impl/ParamServiceImpl.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/shunfeng/task/base/AbstractJob.java
@@ -3,7 +3,6 @@
import com.stylefeng.guns.core.util.SpringContextHolder;
import com.stylefeng.guns.modular.shunfeng.service.IOrderRideService;
import com.stylefeng.guns.modular.shunfeng.service.IParamService;
import com.stylefeng.guns.modular.shunfeng.service.ITimeTaskService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
@@ -22,14 +21,11 @@
    protected ITimeTaskService timeTaskService;
    protected IParamService paramService;
    protected IOrderRideService orderRideService;
    public AbstractJob(){
        this.timeTaskService = SpringContextHolder.getBean( ITimeTaskService.class);
        this.paramService = SpringContextHolder.getBean( IParamService.class);
        this.orderRideService = SpringContextHolder.getBean( IOrderRideService.class);
    }
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -2204,7 +2204,12 @@
                //调用中台创建订单及拉起支付接口
                TradeOrderCreateData tradeOrderCreateData = new TradeOrderCreateData();
                tradeOrderCreateData.setTreatShopId(driver.getEmpId().toString());
                tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderPrivateCar.getPromotion() == 2 ? 1 : 0) + "\"}");
                //追缴单不要分账
                if(0 == orderPrivateCar.getRecoveryOrder()){
                    tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderPrivateCar.getPromotion() == 2 ? 1 : 0) + "\"}");
                }else{
                    tradeOrderCreateData.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}");
                }
                tradeOrderCreateData.setCharge(new BigDecimal(orderMoney));
                tradeOrderCreateData.setOrderId(orderPrivateCar.getTravelId());
                tradeOrderCreateData.setOrderNo("PR" + orderPrivateCar.getId());
@@ -2218,6 +2223,11 @@
                List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
                GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
                goodsInfoRequest.setSubOpenId(userInfo.getAppletsOpenId());
                if(0 == orderPrivateCar.getRecoveryOrder()){
                    goodsInfoRequest.setProfitSharing("1");
                }else{
                    goodsInfoRequest.setProfitSharing("0");
                }
                goodsInfo.add(goodsInfoRequest);
                tradeOrderCreateData.setGoodsInfo(goodsInfo);
                TradeOrderCreate tradeOrderCreate = OrderUtil.tradeOrderCreate1(tradeOrderCreateData);
@@ -2238,6 +2248,11 @@
                List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
                GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
                goodsInfoRequest.setSubOpenId(userInfo.getAppletsOpenId());
                if(0 == orderPrivateCar.getRecoveryOrder()){
                    goodsInfoRequest.setProfitSharing("1");
                }else{
                    goodsInfoRequest.setProfitSharing("0");
                }
                goodsInfo.add(goodsInfoRequest);
                tradePayOff1Data.setGoodsInfo(goodsInfo);
                PayInfo payInfo = OrderUtil.tradePayOff1(tradePayOff1Data);
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserInfoMapper.xml
@@ -162,7 +162,9 @@
        a.emergencyContactNumber as emergencyContactNumber,
        a.balance as balance,
        if((select count(1) from t_user_taxi_card where userId = #{uid}) = 0, 0, 1) as payTaxiCar,
        if((select id from t_merchant where auditStatus = 2 and userType = 1 and userId = a.id and state = 1) is null, 0, 1) as merchant
        if((select id from t_merchant where auditStatus = 2 and userType = 1 and userId = a.id and state = 1) is null, 0, 1) as merchant,
        a.isDriverRide,
        a.driverId
        from t_user a where 1 = 1
        <if test="null != uid">
            and a.id = #{uid}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserInfoServiceImpl.java
@@ -257,6 +257,7 @@
    
        if (null == userInfo) {
            userInfo = new UserInfo();
            userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png");
            userInfo.setPhone(phone);
            userInfo.setPassWord(ShiroKit.md5("", salt));
            userInfo.setNickName(nickName);
@@ -337,6 +338,7 @@
        UserInfo userInfo = userInfoMapper.queryByPhone(phone);
        if (null == userInfo) {
            userInfo = new UserInfo();
            userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png");
            userInfo.setPhone(phone);
            userInfo.setPassWord(ShiroKit.md5("", salt));
            userInfo.setNickName(this.getDefaultName());
@@ -527,6 +529,7 @@
        }
        if (null == userInfo) {
            userInfo = new UserInfo();
            userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png");
            userInfo.setPassWord(ShiroKit.md5("", salt));
            userInfo.setRegistIp(registIp);
            userInfo.setSex(sex);
@@ -656,6 +659,7 @@
        int i =0;
        if(null == userInfo){
            userInfo = new UserInfo();
            userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png");
            if(ToolUtil.isEmpty(phone)){
                String phone2 = getPhone(sessionKey, encryptedData, iv);
                List<UserInfo> phone1 = userInfoMapper.selectList(new EntityWrapper<UserInfo>().eq("phone", phone2).eq("state",1).ne("flag",3));
@@ -1664,6 +1668,7 @@
    
        if (null == userInfo) {
            userInfo = new UserInfo();
            userInfo.setAvatar("https://traffic.qytzt.cn/v1/AUTH_d8bef0a04db511f0b79d01a3e2b7587e/qyt20250702/imgs/management/d081e7a9-13d4-4eec-afb6-afd10885a664.png");
            userInfo.setPhone(phone);
            userInfo.setPassWord(ShiroKit.md5("", salt));
            userInfo.setNickName(nickName);
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/SpringContextsUtil.java
New file
@@ -0,0 +1,37 @@
package com.stylefeng.guns.modular.system.util;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class SpringContextsUtil implements ApplicationContextAware{
    private static ApplicationContext applicationContext;
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        if (SpringContextsUtil.applicationContext == null) {
            SpringContextsUtil.applicationContext = applicationContext;
        }
    }
    // 获取applicationContext
    public static ApplicationContext getApplicationContext() {
        return applicationContext;
    }
    // 通过name获取 Bean.
    public static Object getBean(String name) {
        return getApplicationContext().getBean(name);
    }
    // 通过class获取Bean.
    public static <T> T getBean(Class<T> clazz) {
        return getApplicationContext().getBean(clazz);
    }
    // 通过name,以及Clazz返回指定的Bean
    public static <T> T getBean(String name, Class<T> clazz) {
        System.out.println(getApplicationContext().getBean(name, clazz));
        return getApplicationContext().getBean(name, clazz);
    }
}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java
@@ -1,6 +1,7 @@
package com.stylefeng.guns.modular.system.util;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.modular.account.controller.AppOrderController;
import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService;
@@ -84,7 +85,7 @@
            //修改过期的商家优惠券
            userMerchantCouponService.updateExpired();
            //处理超时未支付的订单
//            timoutNoPayment();
            timoutNoPayment();
        } catch (Exception e) {
            e.printStackTrace();
        }
@@ -142,9 +143,26 @@
     */
    public void timoutNoPayment() {
        List<OrderPrivateCar> orderPrivateCars = orderPrivateCarService.selectList(new EntityWrapper<OrderPrivateCar>().eq("state", 7)
                .eq("isDelete", 1).eq("recoveryOrder", 0).last(" and now() >= DATE_ADD(insertTime, INTERVAL 30 MINUTE)"));
                .eq("isDelete", 1).eq("recoveryOrder", 0).last(" and now() >= DATE_ADD(insertTime, INTERVAL 72 HOUR)"));
        for (OrderPrivateCar orderPrivateCar : orderPrivateCars) {
            try {
                Driver driver = driverService.selectById(orderPrivateCar.getDriverId());
                Company company = companyService.selectById(driver.getCompanyId());
                UserInfo userInfo = userInfoService.selectById(orderPrivateCar.getUserId());
                if(null == orderPrivateCar.getIsCreated()){
                    //先调中台创建订单
                    CreateOrderRequest createOrderRequest = new CreateOrderRequest();
                    createOrderRequest.setTreatShopId(driver.getEmpId().toString());
                    createOrderRequest.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderPrivateCar.getPromotion() == 2 ? 1 : 0) + "\"}");
                    createOrderRequest.setCharge(new BigDecimal(orderPrivateCar.getOrderMoney()));
                    createOrderRequest.setOrderNo("PR" + orderPrivateCar.getId());
                    createOrderRequest.setOrderId(orderPrivateCar.getTravelId());
                    createOrderRequest.setCustomerId(userInfo.getOnconUUID());
                    OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
                    orderPrivateCar.setIsCreated(1);
                    orderPrivateCar.setTravelId(orderInfo.getOrderId());
                    orderPrivateCarService.updateById(orderPrivateCar);
                }
                //使用备付金进行支付订单
                TradePayOffData tradePayOffData = new TradePayOffData();
                tradePayOffData.setPartnerPayId(orderPrivateCar.getTravelId());
@@ -154,44 +172,40 @@
                String retCode = payInfo.getRetCode();
                if (!"000000".equals(retCode)) {
                    log.error("备付金支付失败:{}", payInfo.getRetMsg());
                    continue;
                    return;
                }
                PayInfoData data = payInfo.getData();
                String status = data.getStatus();
                if ("3".equals(status)) {
                    log.error("备付金支付失败:{}", payInfo.getRetMsg());
                    continue;
                    return;
                }
                if("0".equals(status)){
                    //查询支付信息
                    GetPaymentInfoDataRequest getPaymentInfoDataRequest = new GetPaymentInfoDataRequest();
                    getPaymentInfoDataRequest.setPartnerPayId(orderPrivateCar.getTravelId());
                    GetPaymentInfo getPaymentInfo = OrderUtil.paymentInfo(getPaymentInfoDataRequest);
                    status = getPaymentInfo.getStatus();
                }
                PayInfoData payInfoData = payInfo.getData();
                PaymentInfo paymentInfo = payInfoData.getPaymentInfos().get(0);
                //支付成功,通知三方
                PaymentOrderRequest paymentOrderRequest = new PaymentOrderRequest();
                paymentOrderRequest.setPayItemId(paymentInfo.getPayItemId());
                paymentOrderRequest.setPaymentInfo(payInfoData.getPaymentInfos());
                paymentOrderRequest.setOrderId("PR" + orderPrivateCar.getId());
                paymentOrderRequest.setCharge(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()));
                paymentOrderRequest.setPayTime(data.getPayTime());
                paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId());
                OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest);
                //查询三方订单状态
                Driver driver1 = driverService.selectById(orderPrivateCar.getDriverId());
                Company company = companyService.selectById(driver1.getCompanyId());
                UserInfo userInfo1 = userInfoService.selectById(orderPrivateCar.getUserId());
                GetTravelItineraryListRequest request = new GetTravelItineraryListRequest();
                request.setCustomerId(userInfo1.getOnconUUID());
                request.setOrderNo("PR" + orderPrivateCar.getId());
                request.setDriverId(driver1.getEmpId().toString());
                ListPage<List<TravelItinerary>> travelItineraryList = OrderUtil.getTravelItineraryList(request);
                Integer status1 = travelItineraryList.getList().get(0).getStatus();
                if(9 != status1){
                if(!"0".equals(status)){
                    //支付成功,通知三方
                    PaymentOrderRequest paymentOrderRequest = new PaymentOrderRequest();
                    paymentOrderRequest.setPayItemId(paymentInfo.getPayItemId());
                    paymentOrderRequest.setPaymentInfo(JSON.toJSONString(payInfoData.getPaymentInfos()));
                    paymentOrderRequest.setOrderId(orderPrivateCar.getTravelId());
                    paymentOrderRequest.setCharge(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()));
                    paymentOrderRequest.setPayTime(data.getPayTime());
                    paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId());
                    OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest);
                    //中台修改订单状态
                    ModifyTravelItineraryRequest request1 = new ModifyTravelItineraryRequest();
                    request1.setOrderId(orderPrivateCar.getTravelId());
                    request1.setStatus(9);
                    if (null != orderPrivateCar.getDriverId()) {
                        request1.setDriverId(driver1.getEmpId().toString());
                        request1.setDriverId(driver.getEmpId().toString());
                        request1.setSupplierShopId(company.getEnterCode());
                    }
                    if (2 == orderPrivateCar.getPromotion()) {
@@ -199,38 +213,55 @@
                        request1.setPromoterId(driver2.getEmpId().toString());
                    }
                    OrderUtil.modifyTravelItinerary(request1);
                    String payId = payInfo.getData().getPayId();
                    //copy原始订单后生成追缴单
                    OrderPrivateCar orderPrivateCar1 = new OrderPrivateCar();
                    BeanUtils.copyProperties(orderPrivateCar, orderPrivateCar1);
                    orderPrivateCar1.setId(null);
                    orderPrivateCar1.setRecoveryOrder(1);
                    //修改原始订单为支付状态
                    orderPrivateCar.setState(9);
                    orderPrivateCar.setPayType(5);
                    orderPrivateCar.setPayMoney(orderPrivateCar.getOrderMoney());
                    orderPrivateCarService.updateById(orderPrivateCar);
                    //保存追缴单
                    orderPrivateCarService.insert(orderPrivateCar1);
                    //添加三方支付记录
                    try {
                        paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderPrivateCar.getId(), 1, 3, orderPrivateCar.getOrderMoney(), payId, 2);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                    Driver driver1 = driverService.selectById(orderPrivateCar1.getDriverId());
                    UserInfo userInfo1 = userInfoService.selectById(orderPrivateCar1.getUserId());
                    Company company1 = companyService.selectById(driver1.getCompanyId());
                    //调三方订单中心创建行程单
                    CreateTravelItineraryRequest request = new CreateTravelItineraryRequest();
                    request.setOrderNo("PR" + orderPrivateCar1.getId());
                    request.setCustomerId(userInfo1.getOnconUUID());
                    request.setDriverId(driver1.getEmpId().toString());
                    request.setSupplierShopId(company1.getEnterCode());
                    request.setServiceType(2);
                    String travelItinerary = OrderUtil.createTravelItinerary(request);
                    orderPrivateCar1.setTravelId(travelItinerary);
                    orderPrivateCar1.setIsCreated(0);
                    orderPrivateCarService.updateById(orderPrivateCar1);
                    //修改订单状态为待支付
                    ModifyTravelItineraryRequest modifyTravelItineraryRequest = new ModifyTravelItineraryRequest();
                    modifyTravelItineraryRequest.setOrderId(orderPrivateCar1.getTravelId());
                    modifyTravelItineraryRequest.setStatus(orderPrivateCar1.getState());
                    modifyTravelItineraryRequest.setDriverId(driver1.getEmpId().toString());
                    modifyTravelItineraryRequest.setSupplierShopId(company1.getEnterCode());
                    if (2 == orderPrivateCar1.getPromotion()) {
                        Driver driver2 = driverService.selectById(orderPrivateCar1.getPromotionDriverId());
                        modifyTravelItineraryRequest.setPromoterId(driver2.getEmpId().toString());
                    }
                    OrderUtil.modifyTravelItinerary(modifyTravelItineraryRequest);
                }
                String payId = payInfo.getData().getPayId();
                //copy原始订单后生成追缴单
                OrderPrivateCar orderPrivateCar1 = new OrderPrivateCar();
                BeanUtils.copyProperties(orderPrivateCar, orderPrivateCar1);
                orderPrivateCar1.setId(null);
                orderPrivateCar1.setRecoveryOrder(1);
                //修改原始订单为支付状态
                orderPrivateCar.setState(8);
                orderPrivateCar.setPayType(5);
                orderPrivateCar.setPayMoney(orderPrivateCar.getOrderMoney());
                orderPrivateCarService.updateById(orderPrivateCar);
                //添加三方支付记录
                paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderPrivateCar.getId(), 1, 3, orderPrivateCar.getOrderMoney(), payId, 2);
                Driver driver = driverService.selectById(orderPrivateCar1.getDriverId());
                UserInfo userInfo = userInfoService.selectById(orderPrivateCar1.getUserId());
                //调用三方创建订单
                CreateOrderRequest createOrderRequest = new CreateOrderRequest();
                createOrderRequest.setTreatShopId(driver.getEmpId().toString());
                createOrderRequest.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}");
                createOrderRequest.setCharge(new BigDecimal(orderPrivateCar1.getOrderMoney()));
                createOrderRequest.setOrderNo("PR" + orderPrivateCar1.getId());
                createOrderRequest.setCustomerId(userInfo.getOnconUUID());
                OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
                orderPrivateCar1.setTravelId(orderInfo.getOrderId());
                orderPrivateCar1.setIsCreated(1);
                //保存追缴单
                orderPrivateCarService.insert(orderPrivateCar1);
            } catch (Exception e) {
                e.printStackTrace();
            }
@@ -241,6 +272,23 @@
                .eq("isDelete", 1).eq("recoveryOrder", 0).last(" and now() >= DATE_ADD(insertTime, INTERVAL 24 HOUR)"));
        for (OrderTaxi orderTaxi : orderTaxis) {
            try {
                Driver driver = driverService.selectById(orderTaxi.getDriverId());
                Company company = companyService.selectById(driver.getCompanyId());
                UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId());
                if(null == orderTaxi.getIsCreated()){
                    //先调中台创建订单
                    CreateOrderRequest createOrderRequest = new CreateOrderRequest();
                    createOrderRequest.setTreatShopId(driver.getEmpId().toString());
                    createOrderRequest.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderTaxi.getPromotion() == 2 ? 1 : 0) + "\"}");
                    createOrderRequest.setCharge(new BigDecimal(orderTaxi.getOrderMoney()));
                    createOrderRequest.setOrderNo("TA" + orderTaxi.getId());
                    createOrderRequest.setOrderId(orderTaxi.getTravelId());
                    createOrderRequest.setCustomerId(userInfo.getOnconUUID());
                    OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
                    orderTaxi.setIsCreated(1);
                    orderTaxi.setTravelId(orderInfo.getOrderId());
                    orderTaxiService.updateById(orderTaxi);
                }
                //使用备付金进行支付订单
                TradePayOffData tradePayOffData = new TradePayOffData();
                tradePayOffData.setPartnerPayId(orderTaxi.getTravelId());
@@ -250,31 +298,40 @@
                String retCode = payInfo.getRetCode();
                if (!"000000".equals(retCode)) {
                    log.error("备付金支付失败:{}", payInfo.getRetMsg());
                    continue;
                    return;
                }
                PayInfoData data = payInfo.getData();
                String status = data.getStatus();
                if ("3".equals(status)) {
                    log.error("备付金支付失败:{}", payInfo.getRetMsg());
                    continue;
                    return;
                }
                //查询三方订单状态
                Driver driver1 = driverService.selectById(orderTaxi.getDriverId());
                Company company = companyService.selectById(driver1.getCompanyId());
                UserInfo userInfo1 = userInfoService.selectById(orderTaxi.getUserId());
                GetTravelItineraryListRequest request = new GetTravelItineraryListRequest();
                request.setCustomerId(userInfo1.getOnconUUID());
                request.setOrderNo("TA" + orderTaxi.getId());
                request.setDriverId(driver1.getEmpId().toString());
                ListPage<List<TravelItinerary>> travelItineraryList = OrderUtil.getTravelItineraryList(request);
                Integer status1 = travelItineraryList.getList().get(0).getStatus();
                if(8 != status1){
                if("0".equals(status)){
                    //查询支付信息
                    GetPaymentInfoDataRequest getPaymentInfoDataRequest = new GetPaymentInfoDataRequest();
                    getPaymentInfoDataRequest.setPartnerPayId(orderTaxi.getTravelId());
                    GetPaymentInfo getPaymentInfo = OrderUtil.paymentInfo(getPaymentInfoDataRequest);
                    status = getPaymentInfo.getStatus();
                }
                PayInfoData payInfoData = payInfo.getData();
                PaymentInfo paymentInfo = payInfoData.getPaymentInfos().get(0);
                if(!"0".equals(status)){
                    //支付成功,通知三方
                    PaymentOrderRequest paymentOrderRequest = new PaymentOrderRequest();
                    paymentOrderRequest.setPayItemId(paymentInfo.getPayItemId());
                    paymentOrderRequest.setPaymentInfo(JSON.toJSONString(payInfoData.getPaymentInfos()));
                    paymentOrderRequest.setOrderId(orderTaxi.getTravelId());
                    paymentOrderRequest.setCharge(BigDecimal.valueOf(orderTaxi.getOrderMoney()));
                    paymentOrderRequest.setPayTime(data.getPayTime());
                    paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId());
                    OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest);
                    //中台修改订单状态
                    ModifyTravelItineraryRequest request1 = new ModifyTravelItineraryRequest();
                    request1.setOrderId(orderTaxi.getTravelId());
                    request1.setStatus(8);
                    request1.setStatus(9);
                    if (null != orderTaxi.getDriverId()) {
                        request1.setDriverId(driver1.getEmpId().toString());
                        request1.setDriverId(driver.getEmpId().toString());
                        request1.setSupplierShopId(company.getEnterCode());
                    }
                    if (2 == orderTaxi.getPromotion()) {
@@ -282,37 +339,55 @@
                        request1.setPromoterId(driver2.getEmpId().toString());
                    }
                    OrderUtil.modifyTravelItinerary(request1);
                    String payId = payInfo.getData().getPayId();
                    //copy原始订单后生成追缴单
                    OrderTaxi orderTaxi1 = new OrderTaxi();
                    BeanUtils.copyProperties(orderTaxi, orderTaxi1);
                    orderTaxi1.setId(null);
                    orderTaxi1.setRecoveryOrder(1);
                    //修改原始订单为支付状态
                    orderTaxi.setState(9);
                    orderTaxi.setPayType(5);
                    orderTaxi.setPayMoney(orderTaxi.getOrderMoney());
                    orderTaxiService.updateById(orderTaxi);
                    //保存追缴单
                    orderTaxiService.insert(orderTaxi1);
                    //添加三方支付记录
                    try {
                        paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderTaxi.getId(), 2, 3, orderTaxi.getOrderMoney(), payId, 2);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                    Driver driver1 = driverService.selectById(orderTaxi1.getDriverId());
                    UserInfo userInfo1 = userInfoService.selectById(orderTaxi1.getUserId());
                    Company company1 = companyService.selectById(driver1.getCompanyId());
                    //调三方订单中心创建行程单
                    CreateTravelItineraryRequest request = new CreateTravelItineraryRequest();
                    request.setOrderNo("TA" + orderTaxi1.getId());
                    request.setCustomerId(userInfo1.getOnconUUID());
                    request.setDriverId(driver1.getEmpId().toString());
                    request.setSupplierShopId(company1.getEnterCode());
                    request.setServiceType(1);
                    String travelItinerary = OrderUtil.createTravelItinerary(request);
                    orderTaxi1.setTravelId(travelItinerary);
                    orderTaxi1.setIsCreated(0);
                    orderTaxiService.updateById(orderTaxi1);
                    //修改订单状态为待支付
                    ModifyTravelItineraryRequest modifyTravelItineraryRequest = new ModifyTravelItineraryRequest();
                    modifyTravelItineraryRequest.setOrderId(orderTaxi1.getTravelId());
                    modifyTravelItineraryRequest.setStatus(orderTaxi1.getState());
                    modifyTravelItineraryRequest.setDriverId(driver1.getEmpId().toString());
                    modifyTravelItineraryRequest.setSupplierShopId(company1.getEnterCode());
                    if (2 == orderTaxi1.getPromotion()) {
                        Driver driver2 = driverService.selectById(orderTaxi1.getPromotionDriverId());
                        modifyTravelItineraryRequest.setPromoterId(driver2.getEmpId().toString());
                    }
                    OrderUtil.modifyTravelItinerary(modifyTravelItineraryRequest);
                }
                String payId = payInfo.getData().getPayId();
                //copy原始订单后生成追缴单
                OrderTaxi orderTaxi1 = new OrderTaxi();
                BeanUtils.copyProperties(orderTaxi, orderTaxi1);
                orderTaxi1.setId(null);
                orderTaxi1.setRecoveryOrder(1);
                //修改原始订单为支付状态
                orderTaxi.setState(8);
                orderTaxi.setPayType(5);
                orderTaxi.setPayMoney(orderTaxi.getOrderMoney());
                orderTaxiService.updateById(orderTaxi);
                //添加三方支付记录
                paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderTaxi.getId(), 2, 3, orderTaxi.getOrderMoney(), payId, 2);
                Driver driver = driverService.selectById(orderTaxi1.getDriverId());
                UserInfo userInfo = userInfoService.selectById(orderTaxi1.getUserId());
                //调用三方创建订单
                CreateOrderRequest createOrderRequest = new CreateOrderRequest();
                createOrderRequest.setTreatShopId(driver.getEmpId().toString());
                createOrderRequest.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}");
                createOrderRequest.setCharge(new BigDecimal(orderTaxi1.getOrderMoney()));
                createOrderRequest.setOrderNo("TA" + orderTaxi1.getId());
                createOrderRequest.setCustomerId(userInfo.getOnconUUID());
                OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
                orderTaxi1.setTravelId(orderInfo.getOrderId());
                orderTaxi1.setIsCreated(1);
                //保存追缴单
                orderTaxiService.insert(orderTaxi1);
            } catch (Exception e) {
                e.printStackTrace();
            }
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EmployeeUtil.java
@@ -6,6 +6,7 @@
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.util.SpringContextsUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import lombok.extern.slf4j.Slf4j;
@@ -23,6 +24,8 @@
 */
@Slf4j
public class EmployeeUtil {
    private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig();
    
    public static void main(String[] args) {
        SaveStaffNodeRequest request = new SaveStaffNodeRequest();
@@ -51,11 +54,11 @@
     */
    public static ResultUtil<SaveStaffNode> saveStaffNode(SaveStaffNodeRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/saveStaffNode";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/saveStaffNode";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -66,8 +69,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业增加员工】请求地址:" + url);
        log.info("【企业增加员工】请求参数:" + JSON.toJSONString(contentMap));
@@ -100,11 +103,11 @@
     */
    public static Boolean editStaffNode(EditStaffNodeRequest request){
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/editStaffNode";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/editStaffNode";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -115,8 +118,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业修改员工信息】请求地址:" + url);
        log.info("【企业修改员工信息】请求参数:" + JSON.toJSONString(contentMap));
@@ -145,11 +148,11 @@
     */
    public static Boolean ecrmDeleteStafNode(DeleteStafNodeRequest request){
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/ecrmDeleteStafNode";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/ecrmDeleteStafNode";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        String content = "";//业务参数
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
@@ -161,8 +164,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【企业删除人员】请求地址:" + url);
        log.info("【企业删除人员】请求参数:" + JSON.toJSONString(contentMap));
@@ -191,11 +194,11 @@
     */
    public static StaffNodeInfo getStaffNode(GetStaffNodeRequest request){
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getStaffNode";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getStaffNode";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -206,8 +209,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【根据员工ID获取人员信息】请求地址:" + url);
        log.info("【根据员工ID获取人员信息】请求参数:" + JSON.toJSONString(contentMap));
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/EnterpriseUtil.java
@@ -5,6 +5,7 @@
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.SpringContextsUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import lombok.extern.slf4j.Slf4j;
@@ -22,6 +23,8 @@
 */
@Slf4j
public class EnterpriseUtil {
    private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig();
    
    
    public static void main(String[] args) {
@@ -46,11 +49,11 @@
     */
    public static CheckEnterExist checkEnterExistByEnterIdCardNo(String uscc) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/check_enter_exist_by_enterIdCardNo";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/check_enter_exist_by_enterIdCardNo";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<>();
@@ -61,8 +64,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", "{\"uscc\":\"" + uscc + "\"}");
        log.info("【根据社会信用代码判断企业是否已存在】请求地址:" + url);
        log.info("【根据社会信用代码判断企业是否已存在】请求参数:" + JSON.toJSONString(map));
@@ -92,11 +95,11 @@
     */
    public static CheckEnterExist checkEnterNameExist(String enterName) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/checkEnterNameExist";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/checkEnterNameExist";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<>();
@@ -107,8 +110,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", "{\"enterName\":\"" + enterName + "\"}");
        log.info("【根据企业名称判断企业是否已存在】请求地址:" + url);
        log.info("【根据企业名称判断企业是否已存在】请求参数:" + JSON.toJSONString(map));
@@ -138,11 +141,11 @@
     */
    public static EnterpriseInfo getEnterpriseDetail(String enter_code) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getEnterpriseDetail";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getEnterpriseDetail";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<>();
@@ -153,8 +156,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", "{\"enter_code\":\"" + enter_code + "\"}");
        log.info("【查询企业详情】请求地址:" + url);
        log.info("【查询企业详情】请求参数:" + JSON.toJSONString(map));
@@ -185,11 +188,11 @@
     */
    public static Boolean modifyEnterpriseInfo(ModifyEnterpriseInfoRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyEnterpriseInfo";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyEnterpriseInfo";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<>();
@@ -200,8 +203,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", new Gson().toJson(request));
        log.info("【修改企业基本信息】请求地址:" + url);
        log.info("【修改企业基本信息】请求参数:" + JSON.toJSONString(map));
@@ -225,11 +228,11 @@
     */
    public static CreateEnterprise createEnterprise(CreateEnterpriseRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/createEnterprise";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/createEnterprise";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<String, Object>();
@@ -240,8 +243,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", new Gson().toJson(request));
        
        log.info("【创建企业】请求地址:" + url);
@@ -273,11 +276,11 @@
     */
    public static boolean delEnterprise(String enterNum, String operator) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/delCompany";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/delCompany";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> map = new HashMap<String, Object>();
@@ -288,8 +291,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        map.put(SystemParameterNames.getAppKey(), appKey);
        map.put(SystemParameterNames.getMessage_id(), messageId);
        map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        map.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        map.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        map.put("content", "{\"enterNum\":\"" + enterNum + "\",\"operator\":\"" + operator + "\"}");
        
        log.info("【删除企业信息】请求地址:" + url);
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/OrderUtil.java
@@ -6,6 +6,7 @@
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.SpringContextsUtil;
import com.stylefeng.guns.modular.system.util.UUIDUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import lombok.extern.slf4j.Slf4j;
@@ -22,6 +23,8 @@
 */
@Slf4j
public class OrderUtil {
    private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig();
    
    
    public static void main(String[] args) {
@@ -92,30 +95,30 @@
//        System.err.println(getPaymentInfo);
        
        //拉起支付
        TradePayOff1Data tradePayOff1Data = new TradePayOff1Data();
        tradePayOff1Data.setPartnerId("5400004");
        tradePayOff1Data.setScene("TRAFFIC");
        tradePayOff1Data.setPartnerPayId("1951088602595872768");
        tradePayOff1Data.setCurrency("RMB");
        tradePayOff1Data.setTotalFee("1");
        tradePayOff1Data.setRetUrl("pages/advoad-city-search/advoad-message/electronic-wait-pay/electronic-wait-pay");
        tradePayOff1Data.setClientIp("127.0.0.1");
        tradePayOff1Data.setNeedLoginFlag("N");
        tradePayOff1Data.setOrderDesc("出行订单支付");
        tradePayOff1Data.setAccessMode("APP");
        List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
        GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
        goodsInfoRequest.setId("981100006005901");
        goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
        goodsInfoRequest.setSubOpenId("oVLur61wBKJEO7QPR1dsmzS5TSfs");
        goodsInfoRequest.setProfitSharing("1");
        goodsInfoRequest.setAreaInfo("520100");
        goodsInfoRequest.setPayType("0");
        goodsInfoRequest.setBusinessType("10408");
        goodsInfo.add(goodsInfoRequest);
        tradePayOff1Data.setGoodsInfo(goodsInfo);
        PayInfo payInfo = tradePayOff1(tradePayOff1Data);
        System.err.println(payInfo);
//        TradePayOff1Data tradePayOff1Data = new TradePayOff1Data();
//        tradePayOff1Data.setPartnerId("5400004");
//        tradePayOff1Data.setScene("TRAFFIC");
//        tradePayOff1Data.setPartnerPayId("1951088602595872768");
//        tradePayOff1Data.setCurrency("RMB");
//        tradePayOff1Data.setTotalFee("1");
//        tradePayOff1Data.setRetUrl("pages/advoad-city-search/advoad-message/electronic-wait-pay/electronic-wait-pay");
//        tradePayOff1Data.setClientIp("127.0.0.1");
//        tradePayOff1Data.setNeedLoginFlag("N");
//        tradePayOff1Data.setOrderDesc("出行订单支付");
//        tradePayOff1Data.setAccessMode("APP");
//        List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
//        GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
//        goodsInfoRequest.setId("981100006005901");
//        goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
//        goodsInfoRequest.setSubOpenId("oVLur61wBKJEO7QPR1dsmzS5TSfs");
//        goodsInfoRequest.setProfitSharing("1");
//        goodsInfoRequest.setAreaInfo("520100");
//        goodsInfoRequest.setPayType("0");
//        goodsInfoRequest.setBusinessType("10408");
//        goodsInfo.add(goodsInfoRequest);
//        tradePayOff1Data.setGoodsInfo(goodsInfo);
//        PayInfo payInfo = tradePayOff1(tradePayOff1Data);
//        System.err.println(payInfo);
        //PayInfo(retCode=000000, retMsg=success, success=true, data=PayInfoData(redirectUrl=https://qhsctest.qytzt.cn/gray/mobile/index.html?f=allCashDesk&accessToken=5nUBXayFpfZz%2FXUZiMu9LzeRXmqmlqaCS%2BHfu5udIt4%3D, payId=540000420250725000135549, status=null, payTime=null, payFee=null, paymentInfos=null), sign=8154ba2728280900b122c56352c1c7fe)
        
        
@@ -190,7 +193,7 @@
        tradePayOff1Data.getGoodsInfo().forEach(goodsInfoRequest -> {
            goodsInfoRequest.setId("981100006005901");
            goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
            goodsInfoRequest.setProfitSharing("1");
            goodsInfoRequest.setAreaInfo("520100");
            goodsInfoRequest.setPayType("0");
            goodsInfoRequest.setBusinessType("10408");
@@ -199,16 +202,16 @@
        
        TradeRequest request = new TradeRequest<TradePayOff1Data>();
        request.setSceneId("1911676727023968256");
        request.setAppId(QianYunTongProperties.appkey);
        request.setAppId(qianYunTongConfig.getAppkey());
        request.setConfigVersion(1);
        request.setRequestId(UUIDUtil.getRandomCode());
        request.setData(tradePayOff1Data);
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradePayOff";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradePayOff";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -219,8 +222,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【拉起支付】请求地址:" + url);
        log.info("【拉起支付】请求参数:" + JSON.toJSONString(contentMap));
@@ -247,11 +250,11 @@
        request.setScene("TRAFFIC");
        request.setPartnerId("522700");
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/createTravelItinerary";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/createTravelItinerary";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -262,8 +265,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【创建行程单】请求地址:" + url);
        log.info("【创建行程单】请求参数:" + JSON.toJSONString(contentMap));
@@ -288,11 +291,11 @@
        request.setScene("TRAFFIC");
        request.setPartnerId("522700");
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyTravelItinerary";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyTravelItinerary";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -303,8 +306,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【修改行程单】请求地址:" + url);
        log.info("【修改行程单】请求参数:" + JSON.toJSONString(contentMap));
@@ -331,11 +334,11 @@
        request.setPartnerId("522700");
        
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getTravelItineraryList";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getTravelItineraryList";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -346,8 +349,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【行程单列表查询】请求地址:" + url);
        log.info("【行程单列表查询】请求参数:" + JSON.toJSONString(contentMap));
@@ -396,7 +399,6 @@
        tradeOrderCreateData.getGoodsInfo().forEach(goodsInfoRequest -> {
            goodsInfoRequest.setId("981100006005901");
            goodsInfoRequest.setSubAppId("wxcc3c9058e2b294db");
            goodsInfoRequest.setProfitSharing("1");
            goodsInfoRequest.setAreaInfo("520100");
            goodsInfoRequest.setPayType("0");
            goodsInfoRequest.setBusinessType("10408");
@@ -405,17 +407,17 @@
        
        TradeRequest request = new TradeRequest<TradeOrderCreateData>();
        request.setSceneId("1945688132719169536");
        request.setAppId(QianYunTongProperties.appkey);
        request.setAppId(qianYunTongConfig.getAppkey());
        request.setConfigVersion(1);
        request.setRequestId(UUIDUtil.getRandomCode());
        request.setData(tradeOrderCreateData);
        
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradeOrderCreate";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradeOrderCreate";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -426,8 +428,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【订单创建及拉起支付】请求地址:" + url);
        log.info("【订单创建及拉起支付】请求参数:" + JSON.toJSONString(contentMap));
@@ -456,17 +458,17 @@
        createOrderRequest.setChannelSource("GRJYCXWXXCX");
        
        TradeRequest request = new TradeRequest<CreateOrderRequest>();
        request.setSceneId(QianYunTongProperties.sceneId);
        request.setAppId(QianYunTongProperties.appkey);
        request.setSceneId("1948289607125864448");
        request.setAppId(qianYunTongConfig.getAppkey());
        request.setConfigVersion(1);
        request.setRequestId(UUIDUtil.getRandomCode());
        request.setData(createOrderRequest);
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradeOrderCreate";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradeOrderCreate";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -477,8 +479,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【订单创建】请求地址:" + url);
        log.info("【订单创建】请求参数:" + JSON.toJSONString(contentMap));
@@ -520,13 +522,18 @@
        List<PaymentInfoRequest> paymentInfoRequests = new ArrayList<>();
        PaymentInfoRequest paymentInfoRequest = new PaymentInfoRequest();
        paymentInfoRequest.setPayModeId("501212");
        paymentInfoRequest.setRealFee(tradePayOffData.getTotalFee().toString());
        paymentInfoRequest.setTradeFee(tradePayOffData.getTotalFee().toString());
        paymentInfoRequest.setAccountTyp("501");
        paymentInfoRequests.add(paymentInfoRequest);
        tradePayOffData.setPaymentInfos(paymentInfoRequests);
        List<GoodsInfo> goodsInfo = new ArrayList<>();
        GoodsInfo goodsInfo1 = new GoodsInfo();
        goodsInfo1.setMerchantCode("B00000872");
        goodsInfo1.setMerchantCode("B00000905");
        goodsInfo1.setCustId("CB0000004686");
        goodsInfo1.setCustName("证联消费平台交易客户");
        goodsInfo1.setBusinessType("10408");
        goodsInfo1.setAgreementNo("00000000468618354161754464398681");
        goodsInfo1.setProfitSharing("1");
        goodsInfo.add(goodsInfo1);
        tradePayOffData.setGoodsInfo(goodsInfo);
@@ -534,16 +541,16 @@
        
        TradeRequest request = new TradeRequest<TradePayOffData>();
        request.setSceneId("1774717104844095488");
        request.setAppId(QianYunTongProperties.appkey);
        request.setAppId(qianYunTongConfig.getAppkey());
        request.setConfigVersion(2);
        request.setRequestId(UUIDUtil.getRandomCode());
        request.setData(tradePayOffData);
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/tradePayOff";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/tradePayOff";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -554,8 +561,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【(补偿单)拉起支付】请求地址:" + url);
        log.info("【(补偿单)拉起支付】请求参数:" + JSON.toJSONString(contentMap));
@@ -588,11 +595,11 @@
        request.setData(getPaymentInfoDataRequest);
        
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/paymentInfo";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/paymentInfo";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -603,8 +610,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【查询支付单信息】请求地址:" + url);
        log.info("【查询支付单信息】请求参数:" + JSON.toJSONString(contentMap));
@@ -640,11 +647,11 @@
        request.setPayChannel(6);
        request.setIsCompensate(1);
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/paymentOrder";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/paymentOrder";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -655,8 +662,8 @@
        String messageId = UUIDUtil.getRandomCode();
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【(补偿单)支付成功通知】请求地址:" + url);
        log.info("【(补偿单)支付成功通知】请求参数:" + JSON.toJSONString(contentMap));
@@ -664,7 +671,7 @@
        log.info("【(补偿单)支付成功通知】请求结果:" + result);
        JSONObject jsonObject = JSON.parseObject(result);
        String resCode = jsonObject.getString("resCode");
        if (!"0".equals(resCode)) {
        if (!"000000".equals(resCode)) {
            log.error("【(补偿单)支付成功通知】失败:" + jsonObject.getString("resMsg"));
            throw new RuntimeException("【(补偿单)支付成功通知】失败:" + jsonObject.getString("resMsg"));
        }
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongConfig.java
New file
@@ -0,0 +1,203 @@
package com.stylefeng.guns.modular.system.util.qianyuntong;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
 * @author zhibing.pu
 * @Date 2025/7/8 11:31
 */
@Component
public class QianYunTongConfig {
    @Value("${spring.profiles.active}")
    private String activeProfile;
    /**
     * appkey
     */
    private String appkey;
    /**
     * 私钥地址
     */
    private String privateKeyPath;
    /**
     * 消费者账号
     */
    private String userName;
    /**
     * 状态
     * 1:生产环境
     * 2:测试环境
     */
    private String status;
    /**
     * API地址
     */
    private String apiUrl;
    /**
     * 桶名
     */
    private String bucketName;
    /**
     * 小程序appId
     */
    private String appId;
    /**
     * HOS的基础路径(公共前缀)
     */
    private String endPoint;
    /**
     * 账户的ID
     */
    private String account;
    /**
     * 向UAAS服务请求到的access_key
     */
    private String accessKey;
    /**
     * 向UAAS服务请求到的secret_key
     */
    private String secretKey;
    public String getActiveProfile() {
        return activeProfile;
    }
    public void setActiveProfile(String activeProfile) {
        this.activeProfile = activeProfile;
    }
    public String getAppkey() {
        return appkey;
    }
    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }
    public String getPrivateKeyPath() {
        return privateKeyPath;
    }
    public void setPrivateKeyPath(String privateKeyPath) {
        this.privateKeyPath = privateKeyPath;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    public String getApiUrl() {
        return apiUrl;
    }
    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }
    public String getBucketName() {
        return bucketName;
    }
    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }
    public String getAppId() {
        return appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getEndPoint() {
        return endPoint;
    }
    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }
    public String getAccount() {
        return account;
    }
    public void setAccount(String account) {
        this.account = account;
    }
    public String getAccessKey() {
        return accessKey;
    }
    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }
    public String getSecretKey() {
        return secretKey;
    }
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }
    public QianYunTongConfig getQianYunTongConfig() {
        if("dev".equals(activeProfile)){
            this.appkey = "10001104";
            this.privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem";
            this.userName = "xiaofei";
            this.status = "1";
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
            this.setBucketName("bucuTest0625");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
        }
        if("test".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/etraffic/server/private_key_test.pem");
            this.setUserName("xiaofei");
            this.setStatus("1");
            this.setApiUrl("https://test-zhongtai.stqcloud.com:10070");
            this.setBucketName("bucuTest0625");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
        }
        if("prod".equals(activeProfile)){
            this.setAppkey("10001104");
            this.setPrivateKeyPath("/root/server/app/key/private_key.pem");
            this.setUserName("xiwang");
            this.setStatus("1");
            this.setApiUrl("http://jjzhongtai.stqcloud.com:10010");
            this.setBucketName("qyt20250702");
            this.setAppId("wxcc3c9058e2b294db");
            this.setEndPoint("http://119.4.112.68:27741/v1");
            this.setAccount("d8bef0a04db511f0b79d01a3e2b7587e");
            this.setAccessKey("TYMFTFD5SIIT15DCCUD7");
            this.setSecretKey("AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z");
        }
        return this;
    }
}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/QianYunTongProperties.java
File was deleted
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/SMSUtil.java
@@ -5,6 +5,7 @@
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.SpringContextsUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.SendSmsRequest;
import lombok.extern.slf4j.Slf4j;
@@ -22,6 +23,8 @@
@Slf4j
public class SMSUtil {
    
    private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig();
    
    /**
     * 获取易信验证码
@@ -30,11 +33,11 @@
     */
    public static String sendVerifyCode(String mobile) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/sendVerifyCode";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/sendVerifyCode";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -45,8 +48,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", "{\"mobile\":\"" + mobile + "\"}");
        log.info("【获取易信验证码】请求地址:" + url);
        log.info("【获取易信验证码】请求参数:" + JSON.toJSONString(contentMap));
@@ -87,11 +90,11 @@
     */
    public static Boolean sendSms(SendSmsRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/sendSmsByTpl";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/sendSmsByTpl";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -102,8 +105,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【根据模板发送短信】请求地址:" + url);
        log.info("【根据模板发送短信】请求参数:" + JSON.toJSONString(contentMap));
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/UserUtil.java
@@ -6,6 +6,7 @@
import com.google.gson.Gson;
import com.open.common.util.OpenApiClient;
import com.open.common.util.SystemParameterNames;
import com.stylefeng.guns.modular.system.util.SpringContextsUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import lombok.extern.slf4j.Slf4j;
@@ -21,6 +22,8 @@
@Slf4j
public class UserUtil {
    
    private static QianYunTongConfig qianYunTongConfig = SpringContextsUtil.getBean(QianYunTongConfig.class).getQianYunTongConfig();
    
    public static void main(String[] args) {
//        List<QYTUserInfo> userInfoByPhone = getUserInfoByPhone("15828353127");
@@ -35,11 +38,11 @@
     */
    public static List<QYTUserInfo> getUserInfoByPhone(String mobile) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/2.0/queryUserinfoByMobilev2";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/2.0/queryUserinfoByMobilev2";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -50,8 +53,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", "{\"list\":[{\"mobile\":\"" + mobile + "\"}]}");
        log.info("【根据手机号码获取人员信息】请求地址:" + url);
        log.info("【根据手机号码获取人员信息】请求参数:" + JSON.toJSONString(contentMap));
@@ -86,11 +89,11 @@
     */
    public static List<QYTUserInfo> getUserInfoByPhone(String mobile, String enterNum) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/getUserInfoByPhone";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/getUserInfoByPhone";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -101,8 +104,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        Map<String, String> map = new HashMap<>();
        map.put("mobile", mobile);
        if (null != enterNum) {
@@ -144,11 +147,11 @@
     */
    public static RegisterViaMobile registerViaMobile(RegisterViaMobileRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/m1_register_via_mobile";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/m1_register_via_mobile";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -159,8 +162,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【根据手机号注册用户】请求地址:" + url);
        log.info("【根据手机号注册用户】请求参数:" + JSON.toJSONString(contentMap));
@@ -190,11 +193,11 @@
     */
    public static Boolean modifyPwd(ModifyPwdRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/modifyPwd";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/modifyPwd";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -205,8 +208,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【易信用户修改密码】请求地址:" + url);
        log.info("【易信用户修改密码】请求参数:" + JSON.toJSONString(contentMap));
@@ -236,11 +239,11 @@
     */
    public static Boolean resetPwd(ResetPwdRequest request) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/resetPwd";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/resetPwd";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -251,8 +254,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        contentMap.put("content", new Gson().toJson(request));
        log.info("【易信重置密码】请求地址:" + url);
        log.info("【易信重置密码】请求参数:" + JSON.toJSONString(contentMap));
@@ -283,11 +286,11 @@
     */
    public static Boolean idCardAuth(String realName, String cardNo) {
        //请求路径
        String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/idCardAuth";
        String url = qianYunTongConfig.getApiUrl() + "/openapi/rest/1.0/idCardAuth";
        //私钥文件
        String skprivateKeyFile = QianYunTongProperties.privateKeyPath;
        String skprivateKeyFile = qianYunTongConfig.getPrivateKeyPath();
        //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密
        String appKey = QianYunTongProperties.appkey;//appkey
        String appKey = qianYunTongConfig.getAppkey();//appkey
        Map<String, String> headers = new HashMap<>();
        headers.put("Content-Type", "application/json");
        Map<String, Object> contentMap = new HashMap<String, Object>();
@@ -298,8 +301,8 @@
        String messageId = UUID.randomUUID().toString().replaceAll("-", "");
        contentMap.put(SystemParameterNames.getAppKey(), appKey);
        contentMap.put(SystemParameterNames.getMessage_id(), messageId);
        contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName);
        contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status);
        contentMap.put(SystemParameterNames.getUserName(), qianYunTongConfig.getUserName());
        contentMap.put(SystemParameterNames.getStatus(), qianYunTongConfig.getStatus());
        Map<String, String> map = new HashMap<>();
        map.put("realName", realName);
        map.put("cardNo", cardNo);
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/CreateOrderRequest.java
@@ -39,6 +39,10 @@
     */
    private String channelSource;
    /**
     * 行程单ID
     */
    private String orderId;
    /**
     * 业务侧订单号
     */
    private String orderNo;
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GetPaymentInfo.java
@@ -39,6 +39,14 @@
     */
    private String totalFee;
    /**
     * 支付工单状态
     * 0    待支付
     * 1    部分支付成功
     * 2    支付成功
     * 3    支付失败
     */
    private String status;
    /**
     * 商品信息
     */
    private List<GoodsInfoRequest> goodsInfo;
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/GoodsInfo.java
@@ -21,6 +21,14 @@
     */
    private String custName;
    /**
     *交通场景固定值
     */
    private String businessType;
    /**
     * 免密支付协议号
     */
    private String agreementNo;
    /**
     * 分账标识。0:不分账,1:分账
     */
    private String profitSharing;
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentInfoRequest.java
@@ -12,4 +12,16 @@
     * 支付模式。此场景下默认传501212(测试和生产一致)
     */
    private String payModeId;
    /**
     * 支付金额
     */
    private String realFee;
    /**
     *
     */
    private String tradeFee;
    /**
     * 账户类型 501
     */
    private String accountTyp;
}
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/qianyuntong/model/PaymentOrderRequest.java
@@ -26,7 +26,7 @@
    /**
     * 支付明细json串
     */
    private List<PaymentInfo> paymentInfo;
    private String paymentInfo;
    /**
     * 订单ID
     */
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/UserInfoWarpper.java
@@ -49,6 +49,10 @@
    private Integer merchant;
    @ApiModelProperty("是否进件(0=否,1=是)")
    private Integer isCould;
    @ApiModelProperty("是否为顺风车司机(0否,1是)")
    private Integer isDriverRide;
    @ApiModelProperty("顺风车司机id")
    private Integer driverId;
    public Integer getIsCould() {
        return isCould;
@@ -177,7 +181,23 @@
    public void setMerchant(Integer merchant) {
        this.merchant = merchant;
    }
    public Integer getIsDriverRide() {
        return isDriverRide;
    }
    public void setIsDriverRide(Integer isDriverRide) {
        this.isDriverRide = isDriverRide;
    }
    public Integer getDriverId() {
        return driverId;
    }
    public void setDriverId(Integer driverId) {
        this.driverId = driverId;
    }
    @Override
    public String toString() {
        return "UserInfoWarpper{" +
@@ -218,6 +238,8 @@
            userInfoWarpper.setPayTaxiCar(null != map.get("payTaxiCar") ? Integer.valueOf(String.valueOf(map.get("payTaxiCar"))) : 0);
            userInfoWarpper.setMerchant(null != map.get("merchant") ? Integer.valueOf(String.valueOf(map.get("merchant"))) : 0);
            userInfoWarpper.setIsCould(Integer.valueOf(String.valueOf(map.get("isCloud"))));
            userInfoWarpper.setIsDriverRide(null != map.get("isDriverRide") ? Integer.valueOf(String.valueOf(map.get("isDriverRide"))) : 0);
            userInfoWarpper.setDriverId(null != map.get("driverId") ? Integer.valueOf(String.valueOf(map.get("driverId"))) : 0);
        }
        return userInfoWarpper;
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
@@ -1615,7 +1615,12 @@
                //调用中台创建订单及拉起支付接口
                TradeOrderCreateData tradeOrderCreateData = new TradeOrderCreateData();
                tradeOrderCreateData.setTreatShopId(driver.getEmpId().toString());
                tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderTaxi.getPromotion() == 2 ? 1 : 0) + "\"}");
                //追缴单不要分账
                if(0 == orderTaxi.getRecoveryOrder()){
                    tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderTaxi.getPromotion() == 2 ? 1 : 0) + "\"}");
                }else{
                    tradeOrderCreateData.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}");
                }
                tradeOrderCreateData.setCharge(new BigDecimal(orderMoney));
                tradeOrderCreateData.setOrderId(orderTaxi.getTravelId());
                tradeOrderCreateData.setOrderNo("TA" + orderTaxi.getId());
@@ -1629,6 +1634,11 @@
                List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
                GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
                goodsInfoRequest.setSubOpenId(userInfo.getAppletsOpenId());
                if(0 == orderTaxi.getRecoveryOrder()){
                    goodsInfoRequest.setProfitSharing("1");
                }else{
                    goodsInfoRequest.setProfitSharing("0");
                }
                goodsInfo.add(goodsInfoRequest);
                tradeOrderCreateData.setGoodsInfo(goodsInfo);
                TradeOrderCreate tradeOrderCreate = OrderUtil.tradeOrderCreate1(tradeOrderCreateData);
@@ -1649,6 +1659,11 @@
                List<GoodsInfoRequest> goodsInfo = new ArrayList<>();
                GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest();
                goodsInfoRequest.setSubOpenId(userInfo.getAppletsOpenId());
                if(0 == orderTaxi.getRecoveryOrder()){
                    goodsInfoRequest.setProfitSharing("1");
                }else{
                    goodsInfoRequest.setProfitSharing("0");
                }
                goodsInfo.add(goodsInfoRequest);
                tradePayOff1Data.setGoodsInfo(goodsInfo);
                PayInfo payInfo = OrderUtil.tradePayOff1(tradePayOff1Data);
UserQYTTravel/guns-admin/src/main/resources/application.yml
@@ -53,7 +53,7 @@
eureka:
  client:
    service-url: #注册中心地址
      defaultZone: http://sinata:sinata@192.168.110.111:8000/eureka #启用身份验证的方式连接
      defaultZone: http://sinata:sinata@192.168.110.85:8000/eureka #启用身份验证的方式连接
    register-with-eureka: true #在注册中心进行注册
    fetch-registry: true #从Eureka中获取注册信息。
UserQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java
@@ -1,146 +1,173 @@
package com.stylefeng.guns;
import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar;
import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService;
import com.stylefeng.guns.modular.system.model.Company;
import com.stylefeng.guns.modular.system.model.Driver;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.service.ICompanyService;
import com.stylefeng.guns.modular.system.service.IDriverService;
import com.stylefeng.guns.modular.system.service.IUserInfoService;
import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil;
import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.math.BigDecimal;
import java.util.List;
/**
 * SpringBoot方式启动类
 *
 * @author stylefeng
 * @Date 2017/5/21 12:06
 */
@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class GunsApplicationTest {
    @Autowired
    private IOrderPrivateCarService orderPrivateCarService;
    @Autowired
    private IUserInfoService userInfoService;
    @Autowired
    private IDriverService driverService;
    @Autowired
    private ICompanyService companyService;
    @Autowired
    private IPaymentRecordService paymentRecordService;
    @Test
    public void test(){
        OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(211);
        //使用备付金进行支付订单
        TradePayOffData tradePayOffData = new TradePayOffData();
        tradePayOffData.setPartnerPayId(orderPrivateCar.getTravelId());
        tradePayOffData.setTotalFee(Double.valueOf(orderPrivateCar.getOrderMoney() * 100).intValue() + "");
        tradePayOffData.setOrderDesc("完成订单");
        PayInfo payInfo = OrderUtil.tradePayOff(tradePayOffData);
        String retCode = payInfo.getRetCode();
        if (!"000000".equals(retCode)) {
            log.error("备付金支付失败:{}", payInfo.getRetMsg());
            return;
        }
        PayInfoData data = payInfo.getData();
        String status = data.getStatus();
        if ("3".equals(status)) {
            log.error("备付金支付失败:{}", payInfo.getRetMsg());
            return;
        }
        PayInfoData payInfoData = payInfo.getData();
        PaymentInfo paymentInfo = payInfoData.getPaymentInfos().get(0);
        //支付成功,通知三方
        PaymentOrderRequest paymentOrderRequest = new PaymentOrderRequest();
        paymentOrderRequest.setPayItemId(paymentInfo.getPayItemId());
        paymentOrderRequest.setPaymentInfo(payInfoData.getPaymentInfos());
        paymentOrderRequest.setOrderId("PR" + orderPrivateCar.getId());
        paymentOrderRequest.setCharge(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()));
        paymentOrderRequest.setPayTime(data.getPayTime());
        paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId());
        OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest);
        //查询三方订单状态
        Driver driver1 = driverService.selectById(orderPrivateCar.getDriverId());
        Company company = companyService.selectById(driver1.getCompanyId());
        UserInfo userInfo1 = userInfoService.selectById(orderPrivateCar.getUserId());
        GetTravelItineraryListRequest request = new GetTravelItineraryListRequest();
        request.setCustomerId(userInfo1.getOnconUUID());
        request.setOrderNo("PR" + orderPrivateCar.getId());
        request.setDriverId(driver1.getEmpId().toString());
        ListPage<List<TravelItinerary>> travelItineraryList = OrderUtil.getTravelItineraryList(request);
        Integer status1 = travelItineraryList.getList().get(0).getStatus();
        if(9 != status1){
            //中台修改订单状态
            ModifyTravelItineraryRequest request1 = new ModifyTravelItineraryRequest();
            request1.setOrderId(orderPrivateCar.getTravelId());
            request1.setStatus(9);
            if (null != orderPrivateCar.getDriverId()) {
                request1.setDriverId(driver1.getEmpId().toString());
                request1.setSupplierShopId(company.getEnterCode());
            }
            if (2 == orderPrivateCar.getPromotion()) {
                Driver driver2 = driverService.selectById(orderPrivateCar.getPromotionDriverId());
                request1.setPromoterId(driver2.getEmpId().toString());
            }
            OrderUtil.modifyTravelItinerary(request1);
        }
        String payId = payInfo.getData().getPayId();
        //copy原始订单后生成追缴单
        OrderPrivateCar orderPrivateCar1 = new OrderPrivateCar();
        BeanUtils.copyProperties(orderPrivateCar, orderPrivateCar1);
        orderPrivateCar1.setId(null);
        orderPrivateCar1.setRecoveryOrder(1);
        //修改原始订单为支付状态
        orderPrivateCar.setState(8);
        orderPrivateCar.setPayType(5);
        orderPrivateCar.setPayMoney(orderPrivateCar.getOrderMoney());
        orderPrivateCarService.updateById(orderPrivateCar);
        //添加三方支付记录
        try {
            paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderPrivateCar.getId(), 1, 3, orderPrivateCar.getOrderMoney(), payId, 2);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        Driver driver = driverService.selectById(orderPrivateCar1.getDriverId());
        UserInfo userInfo = userInfoService.selectById(orderPrivateCar1.getUserId());
        //调用三方创建订单
        CreateOrderRequest createOrderRequest = new CreateOrderRequest();
        createOrderRequest.setTreatShopId(driver.getEmpId().toString());
        createOrderRequest.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}");
        createOrderRequest.setCharge(new BigDecimal(orderPrivateCar1.getOrderMoney()));
        createOrderRequest.setOrderNo("PR" + orderPrivateCar1.getId());
        createOrderRequest.setCustomerId(userInfo.getOnconUUID());
        OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
        orderPrivateCar1.setTravelId(orderInfo.getOrderId());
        orderPrivateCar1.setIsCreated(1);
        //保存追缴单
        orderPrivateCarService.insert(orderPrivateCar1);
    }
}
//package com.stylefeng.guns;
//
//import com.alibaba.fastjson.JSON;
//import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar;
//import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService;
//import com.stylefeng.guns.modular.system.model.Company;
//import com.stylefeng.guns.modular.system.model.Driver;
//import com.stylefeng.guns.modular.system.model.UserInfo;
//import com.stylefeng.guns.modular.system.service.ICompanyService;
//import com.stylefeng.guns.modular.system.service.IDriverService;
//import com.stylefeng.guns.modular.system.service.IUserInfoService;
//import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil;
//import com.stylefeng.guns.modular.system.util.qianyuntong.model.*;
//import com.stylefeng.guns.modular.taxi.service.IPaymentRecordService;
//import lombok.extern.slf4j.Slf4j;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.BeanUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.test.context.junit4.SpringRunner;
//
//import java.math.BigDecimal;
//import java.util.List;
//
///**
// * SpringBoot方式启动类
// *
// * @author stylefeng
// * @Date 2017/5/21 12:06
// */
//@Slf4j
//@RunWith(SpringRunner.class)
//@SpringBootTest
//public class GunsApplicationTest {
//
//    @Autowired
//    private IOrderPrivateCarService orderPrivateCarService;
//
//    @Autowired
//    private IUserInfoService userInfoService;
//
//    @Autowired
//    private IDriverService driverService;
//    @Autowired
//    private ICompanyService companyService;
//    @Autowired
//    private IPaymentRecordService paymentRecordService;
//
//
//
//
//    @Test
//    public void test(){
//        OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(228);
//        Driver driver = driverService.selectById(orderPrivateCar.getDriverId());
//        Company company = companyService.selectById(driver.getCompanyId());
//        UserInfo userInfo = userInfoService.selectById(orderPrivateCar.getUserId());
//        if(null == orderPrivateCar.getIsCreated()){
//            //先调中台创建订单
//            CreateOrderRequest createOrderRequest = new CreateOrderRequest();
//            createOrderRequest.setTreatShopId(driver.getEmpId().toString());
//            createOrderRequest.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"" + (orderPrivateCar.getPromotion() == 2 ? 1 : 0) + "\"}");
//            createOrderRequest.setCharge(new BigDecimal(orderPrivateCar.getOrderMoney()));
//            createOrderRequest.setOrderNo("PR" + orderPrivateCar.getId());
//            createOrderRequest.setOrderId(orderPrivateCar.getTravelId());
//            createOrderRequest.setCustomerId(userInfo.getOnconUUID());
//            OrderInfo orderInfo = OrderUtil.tradeOrderCreate(createOrderRequest);
//            orderPrivateCar.setIsCreated(1);
//            orderPrivateCar.setTravelId(orderInfo.getOrderId());
//            orderPrivateCarService.updateById(orderPrivateCar);
//        }
//        //使用备付金进行支付订单
//        TradePayOffData tradePayOffData = new TradePayOffData();
//        tradePayOffData.setPartnerPayId(orderPrivateCar.getTravelId());
//        tradePayOffData.setTotalFee(Double.valueOf(orderPrivateCar.getOrderMoney() * 100).intValue() + "");
//        tradePayOffData.setOrderDesc("完成订单");
//        PayInfo payInfo = OrderUtil.tradePayOff(tradePayOffData);
//        String retCode = payInfo.getRetCode();
//        if (!"000000".equals(retCode)) {
//            log.error("备付金支付失败:{}", payInfo.getRetMsg());
//            return;
//        }
//        PayInfoData data = payInfo.getData();
//        String status = data.getStatus();
//        if ("3".equals(status)) {
//            log.error("备付金支付失败:{}", payInfo.getRetMsg());
//            return;
//        }
//        if("0".equals(status)){
//            //查询支付信息
//            GetPaymentInfoDataRequest getPaymentInfoDataRequest = new GetPaymentInfoDataRequest();
//            getPaymentInfoDataRequest.setPartnerPayId(orderPrivateCar.getTravelId());
//            GetPaymentInfo getPaymentInfo = OrderUtil.paymentInfo(getPaymentInfoDataRequest);
//            status = getPaymentInfo.getStatus();
//        }
//        PayInfoData payInfoData = payInfo.getData();
//        PaymentInfo paymentInfo = payInfoData.getPaymentInfos().get(0);
//        if(!"0".equals(status)){
//            //支付成功,通知三方
//            PaymentOrderRequest paymentOrderRequest = new PaymentOrderRequest();
//            paymentOrderRequest.setPayItemId(paymentInfo.getPayItemId());
//            paymentOrderRequest.setPaymentInfo(JSON.toJSONString(payInfoData.getPaymentInfos()));
//            paymentOrderRequest.setOrderId(orderPrivateCar.getTravelId());
//            paymentOrderRequest.setCharge(BigDecimal.valueOf(orderPrivateCar.getOrderMoney()));
//            paymentOrderRequest.setPayTime(data.getPayTime());
//            paymentOrderRequest.setPaymentSerialNumber(payInfoData.getPayId());
//            OrderInfo orderInfo1 = OrderUtil.paymentOrder(paymentOrderRequest);
//
//            //中台修改订单状态
//            ModifyTravelItineraryRequest request1 = new ModifyTravelItineraryRequest();
//            request1.setOrderId(orderPrivateCar.getTravelId());
//            request1.setStatus(9);
//            if (null != orderPrivateCar.getDriverId()) {
//                request1.setDriverId(driver.getEmpId().toString());
//                request1.setSupplierShopId(company.getEnterCode());
//            }
//            if (2 == orderPrivateCar.getPromotion()) {
//                Driver driver2 = driverService.selectById(orderPrivateCar.getPromotionDriverId());
//                request1.setPromoterId(driver2.getEmpId().toString());
//            }
//            OrderUtil.modifyTravelItinerary(request1);
//
//            String payId = payInfo.getData().getPayId();
//            //copy原始订单后生成追缴单
//            OrderPrivateCar orderPrivateCar1 = new OrderPrivateCar();
//            BeanUtils.copyProperties(orderPrivateCar, orderPrivateCar1);
//            orderPrivateCar1.setId(null);
//            orderPrivateCar1.setRecoveryOrder(1);
//
//            //修改原始订单为支付状态
//            orderPrivateCar.setState(8);
//            orderPrivateCar.setPayType(5);
//            orderPrivateCar.setPayMoney(orderPrivateCar.getOrderMoney());
//            orderPrivateCarService.updateById(orderPrivateCar);
//            //保存追缴单
//            orderPrivateCarService.insert(orderPrivateCar1);
//            //添加三方支付记录
//            try {
//                paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderPrivateCar.getId(), 1, 3, orderPrivateCar.getOrderMoney(), payId, 2);
//            } catch (Exception e) {
//                throw new RuntimeException(e);
//            }
//
//
//            Driver driver1 = driverService.selectById(orderPrivateCar1.getDriverId());
//            UserInfo userInfo1 = userInfoService.selectById(orderPrivateCar1.getUserId());
//            Company company1 = companyService.selectById(driver1.getCompanyId());
//            //调三方订单中心创建行程单
//            CreateTravelItineraryRequest request = new CreateTravelItineraryRequest();
//            request.setOrderNo("PR" + orderPrivateCar1.getId());
//            request.setCustomerId(userInfo1.getOnconUUID());
//            request.setDriverId(driver1.getEmpId().toString());
//            request.setSupplierShopId(company1.getEnterCode());
//            request.setServiceType(2);
//            String travelItinerary = OrderUtil.createTravelItinerary(request);
//            orderPrivateCar1.setTravelId(travelItinerary);
//            orderPrivateCar1.setIsCreated(0);
//            orderPrivateCarService.updateById(orderPrivateCar1);
//            //修改订单状态为待支付
//            ModifyTravelItineraryRequest modifyTravelItineraryRequest = new ModifyTravelItineraryRequest();
//            modifyTravelItineraryRequest.setOrderId(orderPrivateCar1.getTravelId());
//            modifyTravelItineraryRequest.setStatus(orderPrivateCar1.getState());
//            modifyTravelItineraryRequest.setDriverId(driver1.getEmpId().toString());
//            modifyTravelItineraryRequest.setSupplierShopId(company1.getEnterCode());
//            if (2 == orderPrivateCar1.getPromotion()) {
//                Driver driver2 = driverService.selectById(orderPrivateCar1.getPromotionDriverId());
//                modifyTravelItineraryRequest.setPromoterId(driver2.getEmpId().toString());
//            }
//            OrderUtil.modifyTravelItinerary(modifyTravelItineraryRequest);
//        }
//    }
//}
ZuulQYTTravel/src/main/resources/application.yml
@@ -3,7 +3,8 @@
spring:
  profiles:
    active: prod
    active: dev
  #    active: prod
  application:
    name: zuul-gateway #服务名称