From b8dd269fc4a0824db2dbf8ab1b6fffbcfc9ba199 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期二, 12 八月 2025 10:44:25 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/QianYunTong --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java | 16 +++++++++------- MessagePushTravel/src/main/java/com/sinata/push/controller/NettyController.java | 8 ++++---- MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java | 4 ++-- MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyWebSocketController.java | 2 +- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java | 4 ++-- MessagePushTravel/src/main/java/com/sinata/push/util/URLUtil.java | 4 ++-- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java index 57c6917..33a76f7 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ReassignServiceImpl.java @@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.stylefeng.guns.core.util.ToolUtil; import com.stylefeng.guns.modular.account.service.ITEnterpriseWithdrawalService; @@ -137,14 +138,13 @@ types=2; // return ResultUtil.error("您提交的申请正在处理中"); } - //获取支付金额 -// Double aDouble = orderService.queryReassignMoney(reassign.getOrderId(), reassign.getOrderType()); -// reassign.setMoney(aDouble); -// reassign.setOriginalDriverId(uid); -// reassign.setOriginalCarId(driver.getCarId()); -// reassign.setInsertTime(new Date()); -// this.insert(reassign); + Double aDouble = orderService.queryReassignMoney(reassign.getOrderId(), reassign.getOrderType()); + reassign.setMoney(aDouble); + reassign.setOriginalDriverId(uid); + reassign.setOriginalCarId(driver.getCarId()); + reassign.setInsertTime(new Date()); + this.insert(reassign); // systemNoticeService.addSystemNotice(2, "您的改派申请已成功提交,我们会尽快为你处理!", uid, 1); //开始支付 @@ -284,6 +284,7 @@ Driver driver = driverService.selectById(uid); //修改改派通知状态 switch (reassign.getOrderType()) { + case 1: OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(reassign.getOrderId()); orderPrivateCar.setState(orderPrivateCar.getOldState()); @@ -322,6 +323,7 @@ OrderUtil.modifyTravelItinerary(request1); break; } + reassignMapper.delete(new EntityWrapper<Reassign>().eq("orderId",reassign.getOrderId()).eq("orderType",reassign.getOrderType())); return ResultUtil.success(); } diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java index 6100469..63c1232 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java +++ b/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\\39373\\Desktop\\黔云通\\UAT-demo-公用\\1055490595.cer"; - this.sm2 = "C:\\Users\\39373\\Desktop\\黔云通\\UAT-demo-公用\\871_111111.sm2"; + this.cer = "C:\\Users\\Admin\\Desktop\\qyt\\1055490595.cer"; + this.sm2 = "C:\\Users\\Admin\\Desktop\\qyt\\871_111111.sm2"; this.password = "111111"; } if("test".equals(activeProfile)){ diff --git a/MessagePushTravel/src/main/java/com/sinata/push/controller/NettyController.java b/MessagePushTravel/src/main/java/com/sinata/push/controller/NettyController.java index c39c8c9..f149d08 100644 --- a/MessagePushTravel/src/main/java/com/sinata/push/controller/NettyController.java +++ b/MessagePushTravel/src/main/java/com/sinata/push/controller/NettyController.java @@ -27,15 +27,15 @@ */ @ResponseBody @PostMapping("/sendMsgToClient") - public String sendMsgToClient(Integer id, Integer type, String msg){ + public String sendMsgToClient(Integer id, Integer type, String msg,String bussinessType){ System.out.println("推送参数:" + id + "---" + type + "---" + msg); if(type == 1){//用户端 - ChannelHandlerContext channel = NettyChannelMap.getData("Applets" + id);//小程序 + ChannelHandlerContext channel = NettyChannelMap.getData(bussinessType+":Applets" + id);//小程序 if(null != channel){ NettyWebSocketController.sendMsgToClient(channel, msg); return JSON.toJSONString(ResultUtil.success()); } - channel = NettyChannelMap.getData("USER" + id); + channel = NettyChannelMap.getData(bussinessType+":USER" + id); if(null != channel){ NettyServerController.sendMsgToClient(channel, msg); return JSON.toJSONString(ResultUtil.success()); @@ -46,7 +46,7 @@ if(type == 2){//司机端 System.out.println("长链接实例:" + JSON.toJSONString(NettyChannelMap.map)); - ChannelHandlerContext channel = NettyChannelMap.getData("DRIVER" + id); + ChannelHandlerContext channel = NettyChannelMap.getData(bussinessType+":DRIVER" + id); if(null != channel){ NettyServerController.sendMsgToClient(channel, msg); return JSON.toJSONString(ResultUtil.success()); diff --git a/MessagePushTravel/src/main/java/com/sinata/push/util/URLUtil.java b/MessagePushTravel/src/main/java/com/sinata/push/util/URLUtil.java index 4f87b8d..e4f305e 100644 --- a/MessagePushTravel/src/main/java/com/sinata/push/util/URLUtil.java +++ b/MessagePushTravel/src/main/java/com/sinata/push/util/URLUtil.java @@ -8,9 +8,9 @@ /** * 业务网关接口地址 */ - String zuul = "http://192.168.110.111:5000"; + String zuul = "http://192.168.110.85:5000"; /** * 业务网关接口地址 */ - String aj_zuul = "http://192.168.110.111:5000"; + String aj_zuul = "http://192.168.110.106:3002"; } diff --git a/MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyWebSocketController.java b/MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyWebSocketController.java index f46c696..0513409 100644 --- a/MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyWebSocketController.java +++ b/MessagePushTravel/src/main/java/com/sinata/push/util/applets/NettyWebSocketController.java @@ -79,7 +79,7 @@ String token = jsonCon.getString("token"); String userId1 = jsonCon.getString("userId"); String businessType = jsonCon.getString("businessType");//1:打车,2=代驾 - String business = "1".equals(businessType) ? "dache" : "daijia"; + String business = "2".equals(businessType) ? "daijia" : "dache"; if (StringUtil.isNotEmpty(userId1)) { //确保账号在单个设备上登录 if (StringUtil.isNotEmpty(token)) { diff --git a/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java b/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java index e8c1a5f..97bc8f0 100644 --- a/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java +++ b/MessagePushTravel/src/main/java/com/sinata/push/util/echo/NettyServerController.java @@ -96,7 +96,7 @@ String device = jsonCon.getString("device"); String version = jsonCon.getString("version"); String businessType = jsonCon.getString("businessType");//1:打车,2=代驾 - String business = "1".equals(businessType) ? "dache" : "daijia"; + String business = "2".equals(businessType) ? "daijia" : "dache"; if(StringUtil.isNotEmpty(userId1)){ //判断用户或者司机长连接 @@ -169,7 +169,7 @@ if(method.equals(Method.location)){ Integer driverId = jsonCon.getInteger("driverId"); String businessType = jsonCon.getString("businessType");//1:打车,2=代驾 - String business = "1".equals(businessType) ? "dache" : "daijia"; + String business = "2".equals(businessType) || null==businessType ? "daijia" : "dache"; String fluid_control = redisUtil.getValue(business + ":location_" + driverId); if(!StringUtils.hasLength(fluid_control)){ -- Gitblit v1.7.1