From e1940dda45fa066d994cc5cf0e34c7f97d9e7b2d Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 02 四月 2025 09:42:45 +0800 Subject: [PATCH] 修改bug --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java index bb180e9..21a335c 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java @@ -55,6 +55,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; import static com.stylefeng.guns.modular.taxi.service.impl.OrderTaxiServiceImpl.orderIds; @@ -1197,9 +1198,10 @@ public ResultUtil addCancle(Integer id, String reason, String remark, Integer uid) throws Exception { if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ + remark = remark.toLowerCase(); List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); - for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + for(SensitiveWords s : sensitiveWords) { + remark = remark.replaceAll(s.getContent().toLowerCase(), "***"); } } } @@ -1580,7 +1582,7 @@ if(ToolUtil.isEmpty(userInfo.getPhone())){ return ResultUtil.error("请先绑定手机号码"); } - orderPrivateCar.setPassengers(userInfo.getFirstName() + "." + userInfo.getLastName()); + orderPrivateCar.setPassengers(ToolUtil.isNotEmpty(userInfo.getFirstName()) ? userInfo.getFirstName() + "." + userInfo.getLastName() : ""); orderPrivateCar.setPassengersPhone(userInfo.getPhone()); } orderPrivateCar.setState(1); -- Gitblit v1.7.1