乐尚代驾六订单执行一
加载当前订单
需求
-
无论是司机端,还是乘客端,遇到页面切换,重新登录小程序等,只要回到首页面,查看当前是否有正在执行订单,如果有跳转到当前订单执行页面
-
之前这个接口已经开发,为了测试,临时跳过去,默认没有当前订单的
乘客端查找当前订单
@Operation(summary = "乘客端查找当前订单")
@GetMapping("/searchCustomerCurrentOrder/{customerId}")
public Result<CurrentOrderInfoVo> searchCustomerCurrentOrder(@PathVariable Long customerId) {return Result.ok(orderInfoService.searchCustomerCurrentOrder(customerId));
}//乘客端查找当前订单
@Override
public CurrentOrderInfoVo searchCustomerCurrentOrder(Long customerId) {//封装条件//乘客idLambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getCustomerId,customerId);//各种状态// 这些状态都表明该订单在执行中,所以要所有状态都查询Integer[] statusArray = {OrderStatus.ACCEPTED.getStatus(),OrderStatus.DRIVER_ARRIVED.getStatus(),OrderStatus.UPDATE_CART_INFO.getStatus(),OrderStatus.START_SERVICE.getStatus(),OrderStatus.END_SERVICE.getStatus(),OrderStatus.UNPAID.getStatus()};wrapper.in(OrderInfo::getStatus,statusArray);//获取最新一条记录wrapper.orderByDesc(OrderInfo::getId);wrapper.last(" limit 1");//调用方法OrderInfo orderInfo = orderInfoMapper.selectOne(wrapper);//封装到CurrentOrderInfoVoCurrentOrderInfoVo currentOrderInfoVo = new CurrentOrderInfoVo();if(orderInfo != null) {currentOrderInfoVo.setOrderId(orderInfo.getId());currentOrderInfoVo.setStatus(orderInfo.getStatus());currentOrderInfoVo.setIsHasCurrentOrder(true);} else {currentOrderInfoVo.setIsHasCurrentOrder(false);}return currentOrderInfoVo;
}/*** 乘客端查找当前订单* @param customerId* @return*/
@GetMapping("/order/info/searchCustomerCurrentOrder/{customerId}")
Result<CurrentOrderInfoVo> searchCustomerCurrentOrder(@PathVariable("customerId") Long customerId);@Operation(summary = "乘客端查找当前订单")
@GuiguLogin
@GetMapping("/searchCustomerCurrentOrder")
public Result<CurrentOrderInfoVo> searchCustomerCurrentOrder() {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.searchCustomerCurrentOrder(customerId));
}//乘客查找当前订单
@Override
public CurrentOrderInfoVo searchCustomerCurrentOrder(Long customerId) {return orderInfoFeignClient.searchCustomerCurrentOrder(customerId).getData();
}
司机端查找当前订单
@Operation(summary = "司机端查找当前订单")
@GetMapping("/searchDriverCurrentOrder/{driverId}")
public Result<CurrentOrderInfoVo> searchDriverCurrentOrder(@PathVariable Long driverId) {return Result.ok(orderInfoService.searchDriverCurrentOrder(driverId));
}//司机端查找当前订单
@Override
public CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId) {//封装条件LambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getDriverId,driverId);Integer[] statusArray = {OrderStatus.ACCEPTED.getStatus(),OrderStatus.DRIVER_ARRIVED.getStatus(),OrderStatus.UPDATE_CART_INFO.getStatus(),OrderStatus.START_SERVICE.getStatus(),OrderStatus.END_SERVICE.getStatus()};wrapper.in(OrderInfo::getStatus,statusArray);wrapper.orderByDesc(OrderInfo::getId);wrapper.last(" limit 1");OrderInfo orderInfo = orderInfoMapper.selectOne(wrapper);//封装到voCurrentOrderInfoVo currentOrderInfoVo = new CurrentOrderInfoVo();if(null != orderInfo) {currentOrderInfoVo.setStatus(orderInfo.getStatus());currentOrderInfoVo.setOrderId(orderInfo.getId());currentOrderInfoVo.setIsHasCurrentOrder(true);} else {currentOrderInfoVo.setIsHasCurrentOrder(false);}return currentOrderInfoVo;
}/*** 司机端查找当前订单* @param driverId* @return*/
@GetMapping("/order/info/searchDriverCurrentOrder/{driverId}")
Result<CurrentOrderInfoVo> searchDriverCurrentOrder(@PathVariable("driverId") Long driverId);@Operation(summary = "司机端查找当前订单")
@GuiguLogin
@GetMapping("/searchDriverCurrentOrder")
public Result<CurrentOrderInfoVo> searchDriverCurrentOrder() {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.searchDriverCurrentOrder(driverId));
}@Override
public CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId) {return orderInfoFeignClient.searchDriverCurrentOrder(driverId).getData();
}
获取订单信息
进入首页,在有执行中订单的情况下,我们需要获取订单信息,才能知道页面跳转到那里去,因此现在把这个接口给实现了。
- 订单的各个状态,获取的订单信息不一样,当前我们只是获取订单基本信息,后续完善
@Operation(summary = "根据订单id获取订单信息")
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfo> getOrderInfo(@PathVariable Long orderId) {return Result.ok(orderInfoService.getById(orderId));
}/*** 远程调用* 根据订单id获取订单信息* @param orderId* @return*/
@GetMapping("/order/info/getOrderInfo/{orderId}")
Result<OrderInfo> getOrderInfo(@PathVariable("orderId") Long orderId);// 乘客端web接口
@Operation(summary = "获取订单信息")
@GuiguLogin
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfoVo> getOrderInfo(@PathVariable Long orderId) {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.getOrderInfo(orderId, customerId));
}@Override
public OrderInfoVo getOrderInfo(Long orderId, Long customerId) {OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();//判断if(orderInfo.getCustomerId() != customerId) {throw new GuiguException(ResultCodeEnum.ILLEGAL_REQUEST);}OrderInfoVo orderInfoVo = new OrderInfoVo();orderInfoVo.setOrderId(orderId);BeanUtils.copyProperties(orderInfo,orderInfoVo);return orderInfoVo;
}// 司机端web接口
@Operation(summary = "获取订单账单详细信息")
@GuiguLogin
@GetMapping("/getOrderInfo/{orderId}")
public Result<OrderInfoVo> getOrderInfo(@PathVariable Long orderId) {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.getOrderInfo(orderId, driverId));
}@Override
public OrderInfoVo getOrderInfo(Long orderId, Long driverId) {OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();if(orderInfo.getDriverId() != driverId) {throw new GuiguException(ResultCodeEnum.ILLEGAL_REQUEST);}OrderInfoVo orderInfoVo = new OrderInfoVo();orderInfoVo.setOrderId(orderId);BeanUtils.copyProperties(orderInfo,orderInfoVo);return orderInfoVo;
}
司乘同显

- 司机抢单成功后要赶往上车点,我们要计算司机赶往上车点的最佳线路,司机端与乘客端都要显示司机乘同显,这样乘客就能实时看见司机的动向。
司机端司乘同显
- 司机所在地址司乘同显开始位置,代驾地址就是司乘同显终点
- 计算司机司乘同显最佳路线
@Operation(summary = "计算最佳驾驶线路")
@GuiguLogin
@PostMapping("/calculateDrivingLine")
public Result<DrivingLineVo> calculateDrivingLine(@RequestBody CalculateDrivingLineForm calculateDrivingLineForm) {return Result.ok(orderService.calculateDrivingLine(calculateDrivingLineForm));
}//计算最佳驾驶线路
@Override
public DrivingLineVo calculateDrivingLine(CalculateDrivingLineForm calculateDrivingLineForm) {return mapFeignClient.calculateDrivingLine(calculateDrivingLineForm).getData();
}
更新位置到Redis里面
- 司机要赶往代驾地址,实时更新司机当前最新位置(经纬度)到Redis里面
- 乘客看到司机的动向,司机端更新,乘客端获取
@Operation(summary = "司机赶往代驾起始点:更新订单地址到缓存")
@PostMapping("/updateOrderLocationToCache")
public Result<Boolean> updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm) {return Result.ok(locationService.updateOrderLocationToCache(updateOrderLocationForm));
}//司机赶往代驾起始点:更新订单地址到缓存
@Override
public Boolean updateOrderLocationToCache(UpdateOrderLocationForm updateOrderLocationForm) {OrderLocationVo orderLocationVo = new OrderLocationVo();orderLocationVo.setLongitude(updateOrderLocationForm.getLongitude());orderLocationVo.setLatitude(updateOrderLocationForm.getLatitude());String key = RedisConstant.UPDATE_ORDER_LOCATION + updateOrderLocationForm.getOrderId();redisTemplate.opsForValue().set(key,orderLocationVo);return true;
}/*** 司机赶往代驾起始点:更新订单地址到缓存* @param updateOrderLocationForm* @return*/
@PostMapping("/map/location/updateOrderLocationToCache")
Result<Boolean> updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm);@Operation(summary = "司机赶往代驾起始点:更新订单位置到Redis缓存")
@GuiguLogin
@PostMapping("/updateOrderLocationToCache")
public Result updateOrderLocationToCache(@RequestBody UpdateOrderLocationForm updateOrderLocationForm) {return Result.ok(locationService.updateOrderLocationToCache(updateOrderLocationForm));
}@Override
public Boolean updateOrderLocationToCache(UpdateOrderLocationForm updateOrderLocationForm) {return locationFeignClient.updateOrderLocationToCache(updateOrderLocationForm).getData();
}
获取司机基本信息
- 乘客进入司乘同显页面,需要加载司机基本信息,司机姓名,头像等信息
@Operation(summary = "获取司机基本信息")
@GetMapping("/getDriverInfo/{driverId}")
public Result<DriverInfoVo> getDriverInfoOrder(@PathVariable Long driverId) {return Result.ok(driverInfoService.getDriverInfoOrder(driverId));
}//获取司机基本信息
@Override
public DriverInfoVo getDriverInfoOrder(Long driverId) {//司机id获取基本信息DriverInfo driverInfo = driverInfoMapper.selectById(driverId);//封装DriverInfoVoDriverInfoVo driverInfoVo = new DriverInfoVo();BeanUtils.copyProperties(driverInfo,driverInfoVo);//计算驾龄//获取当前年int currentYear = new DateTime().getYear();//获取驾驶证初次领证日期//driver_license_issue_dateint firstYear = new DateTime(driverInfo.getDriverLicenseIssueDate()).getYear();int driverLicenseAge = currentYear - firstYear;driverInfoVo.setDriverLicenseAge(driverLicenseAge);return driverInfoVo;
}/*** 获取司机基本信息* @param driverId* @return*/
@GetMapping("/driver/info/getDriverInfo/{driverId}")
Result<DriverInfoVo> getDriverInfo(@PathVariable("driverId") Long driverId);@Operation(summary = "根据订单id获取司机基本信息")
@GuiguLogin
@GetMapping("/getDriverInfo/{orderId}")
public Result<DriverInfoVo> getDriverInfo(@PathVariable Long orderId) {Long customerId = AuthContextHolder.getUserId();return Result.ok(orderService.getDriverInfo(orderId, customerId));
}@Override
public DriverInfoVo getDriverInfo(Long orderId, Long customerId) {//根据订单id获取订单信息OrderInfo orderInfo = orderInfoFeignClient.getOrderInfo(orderId).getData();if(orderInfo.getCustomerId() != customerId) {throw new GuiguException(ResultCodeEnum.DATA_ERROR);}return driverInfoFeignClient.getDriverInfo(orderInfo.getDriverId()).getData();
}
乘客端获取司机经纬度位置
@Operation(summary = "司机赶往代驾起始点:获取订单经纬度位置")
@GetMapping("/getCacheOrderLocation/{orderId}")
public Result<OrderLocationVo> getCacheOrderLocation(@PathVariable Long orderId) {return Result.ok(locationService.getCacheOrderLocation(orderId));
}@Override
public OrderLocationVo getCacheOrderLocation(Long orderId) {String key = RedisConstant.UPDATE_ORDER_LOCATION + orderId;OrderLocationVo orderLocationVo = (OrderLocationVo)redisTemplate.opsForValue().get(key);return orderLocationVo;
}/*** 司机赶往代驾起始点:获取订单经纬度位置* @param orderId* @return*/
@GetMapping("/map/location/getCacheOrderLocation/{orderId}")
Result<OrderLocationVo> getCacheOrderLocation(@PathVariable("orderId") Long orderId);@Operation(summary = "司机赶往代驾起始点:获取订单经纬度位置")
@GetMapping("/getCacheOrderLocation/{orderId}")
public Result<OrderLocationVo> getCacheOrderLocation(@PathVariable Long orderId) {return Result.ok(locationService.getCacheOrderLocation(orderId));
}@Override
public OrderLocationVo getCacheOrderLocation(Long orderId) {return locationFeignClient.getCacheOrderLocation(orderId).getData();
}@Operation(summary = "计算最佳驾驶线路")
@GuiguLogin
@PostMapping("/calculateDrivingLine")
public Result<DrivingLineVo> calculateDrivingLine(@RequestBody CalculateDrivingLineForm calculateDrivingLineForm) {return Result.ok(orderService.calculateDrivingLine(calculateDrivingLineForm));
}@Override
public DrivingLineVo calculateDrivingLine(CalculateDrivingLineForm calculateDrivingLineForm) {return mapFeignClient.calculateDrivingLine(calculateDrivingLineForm).getData();
}
司机到达起始点

- 司机到达代驾起始点之后,更新当前代驾订单数据
- 更新订单状态:司机到达
- 更新订单到达时间
@Operation(summary = "司机到达起始点")
@GetMapping("/driverArriveStartLocation/{orderId}/{driverId}")
public Result<Boolean> driverArriveStartLocation(@PathVariable Long orderId, @PathVariable Long driverId) {return Result.ok(orderInfoService.driverArriveStartLocation(orderId, driverId));
}//司机到达起始点
@Override
public Boolean driverArriveStartLocation(Long orderId, Long driverId) {// 更新订单状态和到达时间,条件:orderId + driverIdLambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();wrapper.eq(OrderInfo::getId,orderId);wrapper.eq(OrderInfo::getDriverId,driverId);OrderInfo orderInfo = new OrderInfo();orderInfo.setStatus(OrderStatus.DRIVER_ARRIVED.getStatus());orderInfo.setArriveTime(new Date());int rows = orderInfoMapper.update(orderInfo, wrapper);if(rows == 1) {return true;} else {throw new GuiguException(ResultCodeEnum.UPDATE_ERROR);}
}/*** 司机到达起始点* @param orderId* @param driverId* @return*/
@GetMapping("/order/info/driverArriveStartLocation/{orderId}/{driverId}")
Result<Boolean> driverArriveStartLocation(@PathVariable("orderId") Long orderId, @PathVariable("driverId") Long driverId);@Operation(summary = "司机到达代驾起始地点")
@GuiguLogin
@GetMapping("/driverArriveStartLocation/{orderId}")
public Result<Boolean> driverArriveStartLocation(@PathVariable Long orderId) {Long driverId = AuthContextHolder.getUserId();return Result.ok(orderService.driverArriveStartLocation(orderId, driverId));
}//司机到达代驾起始地点
@Override
public Boolean driverArriveStartLocation(Long orderId, Long driverId) {return orderInfoFeignClient.driverArriveStartLocation(orderId,driverId).getData();
}
司机更新代驾车辆信息
司机到达代驾起始点,联系了乘客,见到了代驾车辆,要拍照与录入车辆信息

@Operation(summary = "更新代驾车辆信息")
@PostMapping("/updateOrderCart")
public Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm) {return Result.ok(orderInfoService.updateOrderCart(updateOrderCartForm));
}Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm);@Transactional(rollbackFor = Exception.class)
@Override
public Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm) {LambdaQueryWrapper<OrderInfo> queryWrapper = new LambdaQueryWrapper<>();queryWrapper.eq(OrderInfo::getId, updateOrderCartForm.getOrderId());queryWrapper.eq(OrderInfo::getDriverId, updateOrderCartForm.getDriverId());OrderInfo updateOrderInfo = new OrderInfo();BeanUtils.copyProperties(updateOrderCartForm, updateOrderInfo);updateOrderInfo.setStatus(OrderStatus.UPDATE_CART_INFO.getStatus());//只能更新自己的订单int row = orderInfoMapper.update(updateOrderInfo, queryWrapper);if(row == 1) {//记录日志this.log(updateOrderCartForm.getOrderId(), OrderStatus.UPDATE_CART_INFO.getStatus());} else {throw new GuiguException(ResultCodeEnum.UPDATE_ERROR);}return true;
}/*** 更新代驾车辆信息* @param updateOrderCartForm* @return*/
@PostMapping("/order/info//updateOrderCart")
Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm);@Operation(summary = "更新代驾车辆信息")
@GuiguLogin
@PostMapping("/updateOrderCart")
public Result<Boolean> updateOrderCart(@RequestBody UpdateOrderCartForm updateOrderCartForm) {Long driverId = AuthContextHolder.getUserId();updateOrderCartForm.setDriverId(driverId);return Result.ok(orderService.updateOrderCart(updateOrderCartForm));
}@Override
public Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm) {return orderInfoFeignClient.updateOrderCart(updateOrderCartForm).getData();
}
公司只有一个总的理想,员工不能要求公司去实现你的理想,你必须适应这个总的理想,参加主力部队作战,发挥你的作用。我们的主航道不会变化,你们与大学合作的面宽一点,到2012实验室的时候窄一点,到产品研发更是窄窄的,要有长期性的清晰指标。
https://baijiahao.baidu.com/s?id=1760664270073856317&wfr=spider&for=pc
擦亮花火、共创未来——任正非在“难题揭榜”花火奖座谈会上的讲话
任正非
相关文章:
乐尚代驾六订单执行一
加载当前订单 需求 无论是司机端,还是乘客端,遇到页面切换,重新登录小程序等,只要回到首页面,查看当前是否有正在执行订单,如果有跳转到当前订单执行页面 之前这个接口已经开发,为了测试&…...
SciPy 与 MATLAB 数组
SciPy 与 MATLAB 数组 SciPy 是一个开源的 Python 库,广泛用于科学和工程计算。它构建在 NumPy 数组的基础之上,提供了许多高级科学计算功能。MATLAB 是一个高性能的数值计算环境,它也使用数组作为其基础数据结构。在这篇文章中,我们将探讨 SciPy 和 MATLAB 在数组操作上的…...
基于vue-grid-layout插件(vue版本)实现增删改查/拖拽自动排序等功能(已验证、可正常运行)
前端时间有个需求,需要对33(不一定,也可能多行)的卡片布局,进行拖拽,拖拽过程中自动排序,以下代码是基于vue2,可直接运行,报错可评论滴我 部分代码优化来自于GPT4o和Clau…...
DBoW3相关优化脉络
1 DBow3 GitHub - rmsalinas/DBow3: Improved version of DBow2 2 优化后得到fbow GitHub - rmsalinas/fbow: FBOW (Fast Bag of Words) is an extremmely optimized version of the DBow2/DBow3 libraries. 其中fbow是ucoslam的一部分; ucoslam GitHub - la…...
qt 如何制作动态库插件
首先 首先第一点要确定我们的接口是固定的,也就是要确定 #ifndef RTSPPLUGIN_H #define RTSPPLUGIN_H #include "rtspplugin_global.h" typedef void (*func_callback)(uint8_t* data,int len,uint32_t ssrc,uint32_t ts,const char* ipfrom,uint16_t f…...
一种docker start放回Error response from daemon: task xxx错误的解决方式
1. 问题描述 执行systemctl daemon-reload与systemctl restart docker命令后,发现docker中有的应用无法启动,并显示出Exit(255)的错误提示。 重新执行docker start 容器id后发现返回,Error response from daemon: task xxx的错误。 2. 问题…...
规控面试常见问题
一、项目中遇到的困难或者挑战是什么? 二、A*算法原理(伪代码) 输入:代价地图、start 、 goal(Node结构,包含x、y、g、h、id、pid信息) 首先初始化:创建一个优先级队列openlist,它是一个最小堆,根据节点的f值排序 ( priority_queue<Node, std::vector<Node…...
代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙
代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙 文章目录 代码随想录算法训练营Day 63| 图论 part03 | 417.太平洋大西洋水流问题、827.最大人工岛、127. 单词接龙17.太平洋大西洋水流问题一、DFS二、BFS三、本题总结 82…...
【全网最全】CSDN博客的文字颜色、字体和字号设置
文章目录 一、字体颜色二、字体大小三、字体类型四、字体背景色 在这篇博客中,我们将深入探讨如何在Markdown编辑器中设置文字颜色、大小、字体与背景色。Markdown本身并不直接支持这些功能,但通过结合HTML标签和CSS样式,我们可以实现这些视觉…...
C#实现数据采集系统-Mqtt实现采集数据转发
在数据采集系统中,通过ModbusTcp采集到数据之后,再通过MQTT转发到其他应用 MQTT操作 安装MQTT mqtt介绍和环境安装 使用MQTT 在C#/Net中使用Mqtt MQTT类封装 MQTT配置类 public class MqttConfig{public string Ip {get; set;...
common-intellisense:助力TinyVue 组件书写体验更丝滑
本文由体验技术团队Kagol原创~ 前两天,common-intellisense 开源项目的作者 Simon-He95 在 VueConf 2024 群里发了一个重磅消息: common-intellisense 支持 TinyVue 组件库啦! common-intellisense 插件能够提供超级强大的智能提示功能&…...
图片在线压缩有效方法详解,分享7款最佳图片压缩工具免费(全新)
当您的系统中图片数量不断增加,却无法删除时,那么就需要通过图片压缩来解决您的问题。随着图片文件的增大,高分辨率图片占据了大量存储空间。而此时系统中的存储空间也开始变得不够用,无法跟上高质量图片的增长。因此,…...
electron安装及快速创建
electron安装及快速创建 electron是一个使用 JavaScript、HTML 和 CSS 构建桌面应用程序的框架。 详细内容见官网:https://www.electronjs.org/zh/docs/latest/。 今天来记录下练习中的安装过程和hello world的创建。 创建项目文件夹,并执行npm 初始化命…...
需要消化的知识点
需要消化 消灭清单 如何自定义一个Interceptor拦截器? 后端开发可以用上的前端技巧 10个堪称神器的 Java 学习网站. 【前端胖头鱼】11 chrome高级调试技巧,学会效率直接提升666% 【前端胖头鱼】10个我经常逛的“小网站” 【前端劝退师lv-6】Chrome D…...
2024年7月25日(Git gitlab以及分支管理 )
分布式版本控制系统 一、Git概述 Git 是一种分布式版本控制系统,用于跟踪和管理代码的变更。它是由Linus Torvalds创建的,最 初被设计用于Linux内核的开发。Git允许开发人员跟踪和管理代码的版本,并且可以在不同的开 发人员之间进行协作。 Github 用的就是Git系统来管理它们的…...
pdf格式过大怎么样变小 pdf文件过大如何缩小上传 超实用的简单方法
面对体积庞大的 PDF 文件,我们常常需要寻找有效的方法来缩减其大小。这不仅能够优化存储空间,还能提升文件的传输和打开速度。PDF文件以其稳定性和跨平台兼容性成为工作和学习中的重要文件格式。然而,当我们需要通过邮件发送或上传大文件时&a…...
前端文件下载word乱码问题
记录一次word下载乱码问题: 用的请求是axios库,然后用Blob去接收二进制文件 思路:现在的解决办法有以下几种,看看是对应哪种,可以尝试解决 1.将响应类型设为blob,这也是最重要的,如果没有解决…...
repo中的default.xml文件project name为什么一样?
文章目录 default.xml文件介绍为什么 name 是一样的,path 不一样?总结 default.xml文件介绍 在 repo 工具的 default.xml 文件中,定义了多个 project 元素,每个元素都代表一个 Git 仓库。 XML 定义了多个不同的 project 元素&…...
<section id=“nice“ data-tool=“mdnice编辑器“ data-webs
大模型日报 2024-07-24 大模型资讯 Meta发布最大Llama 3 AI模型,语言和数学能力提升 摘要: Meta公司发布了其迄今为止最大的Llama 3人工智能模型。该模型主要免费提供,具备多语言处理能力,并在语言和数学方面表现出显著提升。 Meta发布最强AI…...
作业7.26~28
全双工: 通信双方 既可以发送,也可以接收数据 1. 利用多线程 或者 多进程, 实现TCP服务器 和 客户端的全双工通信 思路: 服务器和客户端, 在建立通信以后,可以创建线程,在线程编写另一个功能代…...
vscode里如何用git
打开vs终端执行如下: 1 初始化 Git 仓库(如果尚未初始化) git init 2 添加文件到 Git 仓库 git add . 3 使用 git commit 命令来提交你的更改。确保在提交时加上一个有用的消息。 git commit -m "备注信息" 4 …...
Debian系统简介
目录 Debian系统介绍 Debian版本介绍 Debian软件源介绍 软件包管理工具dpkg dpkg核心指令详解 安装软件包 卸载软件包 查询软件包状态 验证软件包完整性 手动处理依赖关系 dpkg vs apt Debian系统介绍 Debian 和 Ubuntu 都是基于 Debian内核 的 Linux 发行版ÿ…...
vue3 字体颜色设置的多种方式
在Vue 3中设置字体颜色可以通过多种方式实现,这取决于你是想在组件内部直接设置,还是在CSS/SCSS/LESS等样式文件中定义。以下是几种常见的方法: 1. 内联样式 你可以直接在模板中使用style绑定来设置字体颜色。 <template><div :s…...
镜像里切换为普通用户
如果你登录远程虚拟机默认就是 root 用户,但你不希望用 root 权限运行 ns-3(这是对的,ns3 工具会拒绝 root),你可以按以下方法创建一个 非 root 用户账号 并切换到它运行 ns-3。 一次性解决方案:创建非 roo…...
Linux云原生安全:零信任架构与机密计算
Linux云原生安全:零信任架构与机密计算 构建坚不可摧的云原生防御体系 引言:云原生安全的范式革命 随着云原生技术的普及,安全边界正在从传统的网络边界向工作负载内部转移。Gartner预测,到2025年,零信任架构将成为超…...
[Java恶补day16] 238.除自身以外数组的乘积
给你一个整数数组 nums,返回 数组 answer ,其中 answer[i] 等于 nums 中除 nums[i] 之外其余各元素的乘积 。 题目数据 保证 数组 nums之中任意元素的全部前缀元素和后缀的乘积都在 32 位 整数范围内。 请 不要使用除法,且在 O(n) 时间复杂度…...
Angular微前端架构:Module Federation + ngx-build-plus (Webpack)
以下是一个完整的 Angular 微前端示例,其中使用的是 Module Federation 和 npx-build-plus 实现了主应用(Shell)与子应用(Remote)的集成。 🛠️ 项目结构 angular-mf/ ├── shell-app/ # 主应用&…...
浪潮交换机配置track检测实现高速公路收费网络主备切换NQA
浪潮交换机track配置 项目背景高速网络拓扑网络情况分析通信线路收费网络路由 收费汇聚交换机相应配置收费汇聚track配置 项目背景 在实施省内一条高速公路时遇到的需求,本次涉及的主要是收费汇聚交换机的配置,浪潮网络设备在高速项目很少,通…...
使用Spring AI和MCP协议构建图片搜索服务
目录 使用Spring AI和MCP协议构建图片搜索服务 引言 技术栈概览 项目架构设计 架构图 服务端开发 1. 创建Spring Boot项目 2. 实现图片搜索工具 3. 配置传输模式 Stdio模式(本地调用) SSE模式(远程调用) 4. 注册工具提…...
Linux 中如何提取压缩文件 ?
Linux 是一种流行的开源操作系统,它提供了许多工具来管理、压缩和解压缩文件。压缩文件有助于节省存储空间,使数据传输更快。本指南将向您展示如何在 Linux 中提取不同类型的压缩文件。 1. Unpacking ZIP Files ZIP 文件是非常常见的,要在 …...
