Browse Source

优化代码格式

LuTong 1 month ago
parent
commit
96dea4f1c9

+ 1 - 1
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerChatSessionServiceImpl.java

@@ -40,7 +40,7 @@ public class LawyerChatSessionServiceImpl extends ServiceImpl<LawyerChatSessionM
 
     @Override
     public R<IPage<LawyerChatSession>> getChatSessionList(int pageNum, int pageSize, Integer consultationOrderId,
-                                                     Integer clientUserId, Integer lawyerUserId, Integer status) {
+                                                          Integer clientUserId, Integer lawyerUserId, Integer status) {
         log.info("LawyerChatSessionServiceImpl.getChatSessionList?pageNum={},pageSize={},consultationOrderId={},clientUserId={},lawyerUserId={},status={}",
                 pageNum, pageSize, consultationOrderId, clientUserId, lawyerUserId, status);
         Page<LawyerChatSession> page = new Page<>(pageNum, pageSize);

+ 36 - 37
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerClientConsultationOrderServiceImpl.java

@@ -129,24 +129,24 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
         if (CollectionUtils.isEmpty(orderList)) {
             return;
         }
-        
+
         // 提取所有律师ID
         List<Integer> lawyerIdList = orderList.stream()
                 .map(LawyerConsultationOrderVO::getLawyerUserId)
                 .filter(Objects::nonNull)
                 .distinct()
                 .collect(Collectors.toList());
-        
+
         if (CollectionUtils.isEmpty(lawyerIdList)) {
             return;
         }
-        
+
         // 批量查询律师问题场景
         Map<String, List<String>> serviceAreaMap = getLawyerServiceArea(lawyerIdList);
         if (serviceAreaMap.isEmpty()) {
             return;
         }
-        
+
         // 填充问题场景
         orderList.forEach(order -> {
             Integer lawyerUserId = order.getLawyerUserId();
@@ -171,31 +171,31 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
         if (CollectionUtils.isEmpty(lawyerIdList)) {
             return serviceAreaMap;
         }
-        
+
         QueryWrapper<LawyerServiceArea> wrapper = new QueryWrapper<>();
         wrapper.in("lsa.lawyer_user_id", lawyerIdList)
-              .eq("lsa.delete_flag", 0)
-              .eq("lsa.status", 1);
-        
+                .eq("lsa.delete_flag", 0)
+                .eq("lsa.status", 1);
+
         List<Map<String, Object>> serviceAreaDataList = lawyerServiceAreaMapper.getLawyerLegalProblemScenarioList(wrapper);
         if (CollectionUtils.isEmpty(serviceAreaDataList)) {
             return serviceAreaMap;
         }
-        
+
         for (Map<String, Object> row : serviceAreaDataList) {
             Object lawyerUserIdObj = row.get("lawyer_user_id");
             if (lawyerUserIdObj == null) {
                 continue;
             }
-            
+
             String lawyerUserId = String.valueOf(lawyerUserIdObj);
             String scenarioName = (String) row.get("name");
             String scenarioNameValue = StringUtils.hasText(scenarioName) ? scenarioName : "";
-            
+
             serviceAreaMap.computeIfAbsent(lawyerUserId, k -> new ArrayList<>())
-                         .add(scenarioNameValue);
+                    .add(scenarioNameValue);
         }
-        
+
         return serviceAreaMap;
     }
 
@@ -208,23 +208,23 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
     @Override
     public LawyerConsultationOrderVO getConsultationOrderDetail(String lawyerOrderId) {
         log.info("LawyerConsultationOrderServiceImpl.getConsultationOrderDetail?lawyerOrderId={}", lawyerOrderId);
-        
+
         LawyerConsultationOrderVO orderVO = new LawyerConsultationOrderVO();
-        
+
         // 参数校验
         if (!StringUtils.hasText(lawyerOrderId)) {
             return orderVO;
         }
-        
+
         // 查询订单信息
         LawyerConsultationOrder order = consultationOrderMapper.selectById(lawyerOrderId);
         if (order == null) {
             return orderVO;
         }
-        
+
         // 复制订单基本信息
         BeanUtils.copyProperties(order, orderVO);
-        
+
         // 查询并填充律师信息
         Integer lawyerUserId = order.getLawyerUserId();
         if (lawyerUserId != null) {
@@ -234,7 +234,6 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
             }
 
 
-            
             // 查询律师问题场景
             List<Integer> lawyerIdList = Collections.singletonList(lawyerUserId);
             Map<String, List<String>> serviceAreaMap = getLawyerServiceArea(lawyerIdList);
@@ -243,7 +242,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
                 orderVO.setLawyerLegalProblemScenarioList(serviceAreaMap.get(lawyerUserIdStr));
             }
         }
-        
+
         return orderVO;
     }
 
@@ -251,19 +250,19 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
     /**
      * 查询咨询订单信息(律师端)
      *
-     * @param pageNum       页码
-     * @param pageSize      页容量
-     * @param startDate     开始时间
-     * @param endDate       结束时间
+     * @param pageNum        页码
+     * @param pageSize       页容量
+     * @param startDate      开始时间
+     * @param endDate        结束时间
      * @param clientUserName 客户端用户名
-     * @param orderStatus   订单状态
-     * @param lawyerId      律师ID
+     * @param orderStatus    订单状态
+     * @param lawyerId       律师ID
      * @return 订单信息Map,包含订单列表、总数、进行中数量、已完成数量
      */
     @Override
     public Map<String, Object> getLawyerConsultationOrderInfo(int pageNum, int pageSize, String startDate,
-                                                               String endDate, String clientUserName,
-                                                               String orderStatus, String lawyerId) {
+                                                              String endDate, String clientUserName,
+                                                              String orderStatus, String lawyerId) {
         log.info("查询咨询订单信息(律师端)- pageNum={}, pageSize={}, startDate={}, endDate={}, "
                         + "clientUserName={}, orderStatus={}, lawyerId={}",
                 pageNum, pageSize, startDate, endDate, clientUserName, orderStatus, lawyerId);
@@ -347,16 +346,16 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
     /**
      * 构建订单查询条件
      *
-     * @param lawyerId      律师ID
-     * @param orderStatus   订单状态
+     * @param lawyerId       律师ID
+     * @param orderStatus    订单状态
      * @param clientUserName 客户端用户名
-     * @param startDate     开始时间
-     * @param endDate       结束时间
+     * @param startDate      开始时间
+     * @param endDate        结束时间
      * @return 查询条件包装器
      */
     private QueryWrapper<LawyerConsultationOrderVO> buildOrderQueryWrapper(String lawyerId, String orderStatus,
-                                                                            String clientUserName, String startDate,
-                                                                            String endDate) {
+                                                                           String clientUserName, String startDate,
+                                                                           String endDate) {
         QueryWrapper<LawyerConsultationOrderVO> queryWrapper = new QueryWrapper<>();
 
         // 订单状态条件
@@ -397,12 +396,12 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
     /**
      * 构建统计查询条件
      *
-     * @param lawyerId      律师ID
+     * @param lawyerId       律师ID
      * @param clientUserName 客户端用户名
      * @return 统计查询条件包装器
      */
     private QueryWrapper<LawyerConsultationOrderVO> buildStatisticsQueryWrapper(String lawyerId,
-                                                                                 String clientUserName) {
+                                                                                String clientUserName) {
         QueryWrapper<LawyerConsultationOrderVO> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("lco.lawyer_user_id", lawyerId);
         queryWrapper.eq("lco.delete_flag", 0);
@@ -478,7 +477,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
     /**
      * 填充律师信息到订单VO
      *
-     * @param orderVO 订单VO对象
+     * @param orderVO    订单VO对象
      * @param lawyerUser 律师用户对象
      */
     private void fillLawyerInfo(LawyerConsultationOrderVO orderVO, LawyerUser lawyerUser) {

+ 4 - 4
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerCommonQuestionServiceImpl.java

@@ -32,7 +32,7 @@ public class LawyerCommonQuestionServiceImpl extends ServiceImpl<LawyerCommonQue
 
     @Override
     public R<IPage<LawyerCommonQuestion>> getCommonQuestionList(int pageNum, int pageSize, String questionText,
-                                                           Integer categoryType, Integer problemScenarioId, Integer status) {
+                                                                Integer categoryType, Integer problemScenarioId, Integer status) {
         log.info("LawyerCommonQuestionServiceImpl.getCommonQuestionList?pageNum={},pageSize={},questionText={},categoryType={},problemScenarioId={},status={}",
                 pageNum, pageSize, questionText, categoryType, problemScenarioId, status);
         Page<LawyerCommonQuestion> page = new Page<>(pageNum, pageSize);
@@ -99,17 +99,17 @@ public class LawyerCommonQuestionServiceImpl extends ServiceImpl<LawyerCommonQue
     @Override
     public R<List<LawyerCommonQuestion>> getCommonQuestionListByNum(Integer num) {
         log.info("LawyerCommonQuestionServiceImpl.getCommonQuestionListByNum?num={}", num);
-        
+
         // 参数校验:如果 num 小于等于0,返回空列表
         if (num == null || num <= 0) {
             return R.data(new java.util.ArrayList<>());
         }
-        
+
         // 构建查询条件:只查询未删除的记录,随机排序
         LambdaQueryWrapper<LawyerCommonQuestion> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(LawyerCommonQuestion::getDeleteFlag, 0)
                 .last("ORDER BY RAND() LIMIT " + num);
-        
+
         List<LawyerCommonQuestion> list = this.list(queryWrapper);
         return R.data(list);
     }

+ 75 - 79
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerConsultationOrderServiceImpl.java

@@ -58,13 +58,13 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
 
     @Override
     public R<IPage<LawyerConsultationOrderVO>> getConsultationOrderList(int pageNum, int pageSize, String orderNumber,
-                                                                 Integer clientUserId, Integer lawyerUserId, String lawyerName, Integer orderStatus) {
+                                                                        Integer clientUserId, Integer lawyerUserId, String lawyerName, Integer orderStatus) {
         log.info("LawyerConsultationOrderServiceImpl.getConsultationOrderList?pageNum={},pageSize={},orderNumber={},clientUserId={},lawyerUserId={},lawyerName={},orderStatus={}",
                 pageNum, pageSize, orderNumber, clientUserId, lawyerUserId, lawyerName, orderStatus);
-        
+
         // 創建分頁對象
         Page<LawyerConsultationOrderVO> page = new Page<>(pageNum, pageSize);
-        
+
         // 如果按律師姓名搜索,先查詢匹配的律師ID列表
         List<Integer> lawyerUserIds = null;
         if (StringUtils.hasText(lawyerName)) {
@@ -84,7 +84,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
                 return R.data(emptyPage);
             }
         }
-        
+
         // 使用JOIN查詢,直接聯查律師信息
         IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getConsultationOrderListWithLawyer(
                 page, orderNumber, clientUserId, lawyerUserId, lawyerName, orderStatus, lawyerUserIds);
@@ -93,7 +93,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         if (voPage != null && voPage.getRecords() != null) {
             Date now = new Date();
             long validitySeconds = 30 * 60; // 30分鐘 = 1800秒
-            
+
             for (LawyerConsultationOrderVO vo : voPage.getRecords()) {
                 // 僅對待支付訂單(orderStatus=0)計算倒計時
                 if (vo.getOrderStatus() != null && vo.getOrderStatus() == 0) {
@@ -214,85 +214,85 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     public R<LawyerConsultationOrder> editConsultationOrder(LawyerConsultationOrder consultationOrder) {
         Integer orderId = consultationOrder.getId();
         log.info("开始编辑咨询订单,订单ID={}", orderId);
-        
+
         // 参数校验:订单ID不能为空
         if (orderId == null) {
             log.warn("编辑咨询订单失败:订单ID为空");
             return R.fail("订单ID不能为空");
         }
-        
+
         // 查询订单信息,验证订单是否存在
         LawyerConsultationOrder existingOrder = consultationOrderMapper.selectById(orderId);
         if (existingOrder == null) {
             log.warn("编辑咨询订单失败:订单不存在,订单ID={}", orderId);
             return R.fail("订单不存在");
         }
-        
+
         // 记录修改前的订单状态
         Integer oldOrderStatus = existingOrder.getOrderStatus();
         Integer oldPaymentStatus = existingOrder.getPaymentStatus();
         Integer newOrderStatus = consultationOrder.getOrderStatus();
         Integer newPaymentStatus = consultationOrder.getPaymentStatus();
-        
-        log.info("编辑咨询订单,订单ID={}, 订单编号={}, 原订单状态={}, 新订单状态={}, 原支付状态={}, 新支付状态={}", 
-                orderId, existingOrder.getOrderNumber(), oldOrderStatus, newOrderStatus, 
+
+        log.info("编辑咨询订单,订单ID={}, 订单编号={}, 原订单状态={}, 新订单状态={}, 原支付状态={}, 新支付状态={}",
+                orderId, existingOrder.getOrderNumber(), oldOrderStatus, newOrderStatus,
                 oldPaymentStatus, newPaymentStatus);
-        
+
         // 订单状态校验:已完成的订单不允许修改关键信息(订单状态、支付状态、订单金额等)
         Integer completedStatus = LawyerStatusEnum.COMPLETE.getStatus(); // 3:已完成
         if (completedStatus.equals(oldOrderStatus)) {
             // 如果订单已完成,只允许修改评价相关字段(rating, comment)
             if (newOrderStatus != null && !newOrderStatus.equals(oldOrderStatus)) {
-                log.warn("编辑咨询订单失败:订单已完成,不允许修改订单状态,订单ID={}, 订单编号={}", 
+                log.warn("编辑咨询订单失败:订单已完成,不允许修改订单状态,订单ID={}, 订单编号={}",
                         orderId, existingOrder.getOrderNumber());
                 return R.fail("订单已完成,不允许修改订单状态");
             }
             if (newPaymentStatus != null && !newPaymentStatus.equals(oldPaymentStatus)) {
-                log.warn("编辑咨询订单失败:订单已完成,不允许修改支付状态,订单ID={}, 订单编号={}", 
+                log.warn("编辑咨询订单失败:订单已完成,不允许修改支付状态,订单ID={}, 订单编号={}",
                         orderId, existingOrder.getOrderNumber());
                 return R.fail("订单已完成,不允许修改支付状态");
             }
-            if (consultationOrder.getOrderAmount() != null && 
-                !consultationOrder.getOrderAmount().equals(existingOrder.getOrderAmount())) {
-                log.warn("编辑咨询订单失败:订单已完成,不允许修改订单金额,订单ID={}, 订单编号={}", 
+            if (consultationOrder.getOrderAmount() != null &&
+                    !consultationOrder.getOrderAmount().equals(existingOrder.getOrderAmount())) {
+                log.warn("编辑咨询订单失败:订单已完成,不允许修改订单金额,订单ID={}, 订单编号={}",
                         orderId, existingOrder.getOrderNumber());
                 return R.fail("订单已完成,不允许修改订单金额");
             }
         }
-        
+
         // 已取消的订单不允许修改为其他状态(除非是管理员操作,这里暂不限制)
         Integer cancelStatus = LawyerStatusEnum.CANCEL.getStatus(); // 4:已取消
-        if (cancelStatus.equals(oldOrderStatus) && newOrderStatus != null && 
-            !cancelStatus.equals(newOrderStatus)) {
-            log.warn("编辑咨询订单警告:订单已取消,尝试修改订单状态,订单ID={}, 订单编号={}, 原状态={}, 新状态={}", 
+        if (cancelStatus.equals(oldOrderStatus) && newOrderStatus != null &&
+                !cancelStatus.equals(newOrderStatus)) {
+            log.warn("编辑咨询订单警告:订单已取消,尝试修改订单状态,订单ID={}, 订单编号={}, 原状态={}, 新状态={}",
                     orderId, existingOrder.getOrderNumber(), oldOrderStatus, newOrderStatus);
             // 这里可以根据业务需求决定是否允许,暂时允许修改
         }
-        
+
         // 如果订单状态从待支付变为已支付,需要更新支付时间
         Integer waitPayStatus = LawyerStatusEnum.WAIT_PAY.getStatus(); // 0:待支付
-        if (waitPayStatus.equals(oldOrderStatus) && newOrderStatus != null && 
-            !waitPayStatus.equals(newOrderStatus) && newPaymentStatus != null && newPaymentStatus == 1) {
+        if (waitPayStatus.equals(oldOrderStatus) && newOrderStatus != null &&
+                !waitPayStatus.equals(newOrderStatus) && newPaymentStatus != null && newPaymentStatus == 1) {
             if (consultationOrder.getPaymentTime() == null) {
                 consultationOrder.setPaymentTime(new Date());
-                log.info("订单状态从待支付变为已支付,自动设置支付时间,订单ID={}, 订单编号={}", 
+                log.info("订单状态从待支付变为已支付,自动设置支付时间,订单ID={}, 订单编号={}",
                         orderId, existingOrder.getOrderNumber());
             }
         }
-        
+
         // 设置更新时间
         consultationOrder.setUpdatedTime(new Date());
-        
+
         // 执行更新操作
         boolean result = this.updateById(consultationOrder);
         if (result) {
-            log.info("编辑咨询订单成功,订单ID={}, 订单编号={}, 原订单状态={}, 新订单状态={}", 
+            log.info("编辑咨询订单成功,订单ID={}, 订单编号={}, 原订单状态={}, 新订单状态={}",
                     orderId, existingOrder.getOrderNumber(), oldOrderStatus, newOrderStatus);
             // 重新查询更新后的订单信息
             LawyerConsultationOrder updatedOrder = consultationOrderMapper.selectById(orderId);
             return R.data(updatedOrder != null ? updatedOrder : consultationOrder);
         } else {
-            log.error("编辑咨询订单失败:数据库更新失败,订单ID={}, 订单编号={}", 
+            log.error("编辑咨询订单失败:数据库更新失败,订单ID={}, 订单编号={}",
                     orderId, existingOrder.getOrderNumber());
             return R.fail("修改失败");
         }
@@ -315,29 +315,29 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     @Transactional(rollbackFor = Exception.class)
     public R<Boolean> deleteConsultationOrder(Integer id) {
         log.info("开始删除咨询订单,订单ID={}", id);
-        
+
         // 参数校验
         if (id == null) {
             log.warn("删除咨询订单失败:订单ID为空");
             return R.fail("订单ID不能为空");
         }
-        
+
         // 查询订单信息
         LawyerConsultationOrder order = consultationOrderMapper.selectById(id);
         if (order == null) {
             log.warn("删除咨询订单失败:订单不存在,订单ID={}", id);
             return R.fail("订单不存在");
         }
-        
+
         // 检查订单状态:进行中的订单不允许删除
         Integer orderStatus = order.getOrderStatus();
         Integer inProgressStatus = LawyerStatusEnum.INPROGRESS.getStatus(); // 2:进行中
         if (inProgressStatus.equals(orderStatus)) {
-            log.warn("删除咨询订单失败:订单进行中,不允许删除,订单ID={}, 订单编号={}", 
+            log.warn("删除咨询订单失败:订单进行中,不允许删除,订单ID={}, 订单编号={}",
                     id, order.getOrderNumber());
             return R.fail("订单进行中,不允许删除");
         }
-        
+
         // 如果订单是待支付状态,取消Redis中的订单支付超时计时
         Integer waitPayStatus = LawyerStatusEnum.WAIT_PAY.getStatus(); // 0:待支付
         if (waitPayStatus.equals(orderStatus) && order.getOrderNumber() != null) {
@@ -349,7 +349,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
                 // 继续执行删除操作,不因取消计时器失败而中断
             }
         }
-        
+
         // 执行删除操作
         boolean result = this.removeById(id);
         if (result) {
@@ -426,7 +426,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
 //            return R.data(order);
 //        }
 //        return R.fail("新增失败");
-        if (num >0){
+        if (num > 0) {
             return R.data(order);
         }
         return R.fail("新增失败");
@@ -456,7 +456,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
 //        boolean result = this.updateById(order);
         Integer result = consultationOrderMapper.updateOrder(order);
 
-        if (result>0) {
+        if (result > 0) {
             return R.data(order);
         }
         return R.fail("失败");
@@ -465,19 +465,19 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     /**
      * 根据用户ID查询订单列表(包含律师信息)
      *
-     * @param pageNum    页码
-     * @param pageSize   页容量
-     * @param userId     用户ID
+     * @param pageNum     页码
+     * @param pageSize    页容量
+     * @param userId      用户ID
      * @param orderStatus 订单状态
-     * @param lawyerName 律师姓名(支持模糊查询)
+     * @param lawyerName  律师姓名(支持模糊查询)
      * @return 分页订单列表
      */
     @Override
-    public R<IPage<LawyerConsultationOrderVO>> getConsultationOrderListById(int pageNum, int pageSize, 
-                                                                              String userId, String orderStatus, 
-                                                                              String lawyerName) {
+    public R<IPage<LawyerConsultationOrderVO>> getConsultationOrderListById(int pageNum, int pageSize,
+                                                                            String userId, String orderStatus,
+                                                                            String lawyerName) {
         Page<LawyerConsultationOrderVO> page = new Page<>(pageNum, pageSize);
-        
+
         // 如果按律师姓名搜索,先查询匹配的律师ID列表
         List<Integer> lawyerUserIds = null;
         if (StringUtils.hasText(lawyerName)) {
@@ -494,7 +494,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         // 查询订单列表
         IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getConsultationOrderListById(
                 page, userId, orderStatus, lawyerUserIds);
-        
+
         // 填充律师问题场景信息
         fillLawyerServiceArea(voPage);
 
@@ -521,7 +521,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
                 }
             }
         }
-        
+
         return R.data(voPage);
     }
 
@@ -534,13 +534,13 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     private List<Integer> queryLawyerIdsByName(String lawyerName) {
         LambdaQueryWrapper<LawyerUser> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(LawyerUser::getDeleteFlag, 0)
-                  .like(LawyerUser::getName, lawyerName);
+                .like(LawyerUser::getName, lawyerName);
         List<LawyerUser> lawyerUsers = lawyerUserService.list(queryWrapper);
-        
+
         if (CollectionUtils.isEmpty(lawyerUsers)) {
             return Collections.emptyList();
         }
-        
+
         return lawyerUsers.stream()
                 .map(LawyerUser::getId)
                 .filter(Objects::nonNull)
@@ -557,24 +557,24 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         if (CollectionUtils.isEmpty(orderList)) {
             return;
         }
-        
+
         // 提取所有律师ID
         List<Integer> lawyerIdList = orderList.stream()
                 .map(LawyerConsultationOrderVO::getLawyerUserId)
                 .filter(Objects::nonNull)
                 .distinct()
                 .collect(Collectors.toList());
-        
+
         if (CollectionUtils.isEmpty(lawyerIdList)) {
             return;
         }
-        
+
         // 批量查询律师问题场景
         Map<String, List<String>> serviceAreaMap = getLawyerServiceArea(lawyerIdList);
         if (serviceAreaMap.isEmpty()) {
             return;
         }
-        
+
         // 填充问题场景
         orderList.forEach(order -> {
             Integer lawyerUserId = order.getLawyerUserId();
@@ -599,31 +599,31 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         if (CollectionUtils.isEmpty(lawyerIdList)) {
             return serviceAreaMap;
         }
-        
+
         QueryWrapper<LawyerServiceArea> wrapper = new QueryWrapper<>();
         wrapper.in("lsa.lawyer_user_id", lawyerIdList)
-              .eq("lsa.delete_flag", 0)
-              .eq("lsa.status", 1);
-        
+                .eq("lsa.delete_flag", 0)
+                .eq("lsa.status", 1);
+
         List<Map<String, Object>> serviceAreaDataList = lawyerServiceAreaMapper.getLawyerLegalProblemScenarioList(wrapper);
         if (CollectionUtils.isEmpty(serviceAreaDataList)) {
             return serviceAreaMap;
         }
-        
+
         for (Map<String, Object> row : serviceAreaDataList) {
             Object lawyerUserIdObj = row.get("lawyer_user_id");
             if (lawyerUserIdObj == null) {
                 continue;
             }
-            
+
             String lawyerUserId = String.valueOf(lawyerUserIdObj);
             String scenarioName = (String) row.get("name");
             String scenarioNameValue = StringUtils.hasText(scenarioName) ? scenarioName : "";
-            
+
             serviceAreaMap.computeIfAbsent(lawyerUserId, k -> new ArrayList<>())
-                         .add(scenarioNameValue);
+                    .add(scenarioNameValue);
         }
-        
+
         return serviceAreaMap;
     }
 
@@ -636,23 +636,23 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     @Override
     public LawyerConsultationOrderVO getConsultationOrderDetail(String lawyerOrderId) {
         log.info("LawyerConsultationOrderServiceImpl.getConsultationOrderDetail?lawyerOrderId={}", lawyerOrderId);
-        
+
         LawyerConsultationOrderVO orderVO = new LawyerConsultationOrderVO();
-        
+
         // 参数校验
         if (!StringUtils.hasText(lawyerOrderId)) {
             return orderVO;
         }
-        
+
         // 查询订单信息
         LawyerConsultationOrder order = consultationOrderMapper.selectById(lawyerOrderId);
         if (order == null) {
             return orderVO;
         }
-        
+
         // 复制订单基本信息
         BeanUtils.copyProperties(order, orderVO);
-        
+
         // 查询并填充律师信息
         Integer lawyerUserId = order.getLawyerUserId();
         if (lawyerUserId != null) {
@@ -662,7 +662,6 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
             }
 
 
-            
             // 查询律师问题场景
             List<Integer> lawyerIdList = Collections.singletonList(lawyerUserId);
             Map<String, List<String>> serviceAreaMap = getLawyerServiceArea(lawyerIdList);
@@ -671,7 +670,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
                 orderVO.setLawyerLegalProblemScenarioList(serviceAreaMap.get(lawyerUserIdStr));
             }
         }
-        
+
         return orderVO;
     }
 
@@ -774,14 +773,14 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         QueryWrapper<LawyerConsultationOrderVO> queryWrapper = new QueryWrapper<>();
         QueryWrapper<LawyerConsultationOrderVO> queryStatisticsWrapper = new QueryWrapper<>();
 
-        if(StringUtils.hasText(orderStatus)){
+        if (StringUtils.hasText(orderStatus)) {
             queryWrapper.in("lco.order_status", Collections.singletonList(orderStatus));
         } else {
             queryWrapper.in("lco.order_status", Arrays.asList("2", "3"));
         }
         queryWrapper.eq("lco.lawyer_user_id", lawyerId);
         queryStatisticsWrapper.eq("lco.lawyer_user_id", lawyerId);
-        if(StringUtils.hasText(clientUserName)){
+        if (StringUtils.hasText(clientUserName)) {
             queryWrapper.like("lur.user_name", clientUserName);
             queryStatisticsWrapper.like("lur.user_name", clientUserName);
         }
@@ -805,7 +804,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
 
         //获取统计信息
         queryStatisticsWrapper.groupBy("lco.order_status");
-        List<Map<String, Object>> statisticsInfo =  consultationOrderMapper.getLawyerStatisticsInfo(queryStatisticsWrapper);
+        List<Map<String, Object>> statisticsInfo = consultationOrderMapper.getLawyerStatisticsInfo(queryStatisticsWrapper);
 
         Map<Integer, Integer> statusCountMap = new HashMap<>();
         for (Map<String, Object> map : statisticsInfo) {
@@ -835,7 +834,6 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     }
 
 
-
     /**
      * 为待支付订单计算倒计时(30分钟有效期)
      *
@@ -871,7 +869,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     /**
      * 填充律师信息到订单VO
      *
-     * @param orderVO 订单VO对象
+     * @param orderVO    订单VO对象
      * @param lawyerUser 律师用户对象
      */
     private void fillLawyerInfo(LawyerConsultationOrderVO orderVO, LawyerUser lawyerUser) {
@@ -898,7 +896,6 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     /**
      * 查询律师订单列表
      *
-
      * @param clientUserId 用户id
      * @param lawyerUserId 律师ID
      * @return 订单列表
@@ -906,14 +903,13 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     @Override
     public R<Map<String, String>> checkOrder(Integer clientUserId, Integer lawyerUserId) {
         log.info("LawyerConsultationOrderController.checkOrder?clientUserId={},lawyerUserId{}", clientUserId, lawyerUserId);
-        List<LawyerConsultationOrder>  orderDto  =consultationOrderMapper.selectOrder(clientUserId, lawyerUserId);
-        if (CollectionUtils.isNotEmpty(orderDto)){
+        List<LawyerConsultationOrder> orderDto = consultationOrderMapper.selectOrder(clientUserId, lawyerUserId);
+        if (CollectionUtils.isNotEmpty(orderDto)) {
             return R.fail("您已存在咨询该律师的订单");
         }
         return R.success("可以咨询该律师");
     }
 
 
-
 }
 

+ 1 - 1
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerConsultationReviewServiceImpl.java

@@ -31,7 +31,7 @@ public class LawyerConsultationReviewServiceImpl extends ServiceImpl<LawyerConsu
 
     @Override
     public R<IPage<LawyerConsultationReview>> getConsultationReviewList(int pageNum, int pageSize, Integer consultationOrderId,
-                                                                  Integer lawyerUserId, Integer clientUserId) {
+                                                                        Integer lawyerUserId, Integer clientUserId) {
         log.info("LawyerConsultationReviewServiceImpl.getConsultationReviewList?pageNum={},pageSize={},consultationOrderId={},lawyerUserId={},clientUserId={}",
                 pageNum, pageSize, consultationOrderId, lawyerUserId, clientUserId);
         Page<LawyerConsultationReview> page = new Page<>(pageNum, pageSize);

+ 10 - 10
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerExpertiseAreaServiceImpl.java

@@ -50,13 +50,13 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
     @Override
     public R<LawyerExpertiseArea> addExpertiseArea(LawyerExpertiseArea expertiseArea) {
         log.info("LawyerExpertiseAreaServiceImpl.addExpertiseArea?expertiseArea={}", expertiseArea);
-        
+
         // 参数校验
         if (expertiseArea == null) {
             log.warn("新增领域信息失败:参数为空");
             return R.fail("参数不能为空");
         }
-        
+
         // 设置默认值
         if (expertiseArea.getDeleteFlag() == null) {
             expertiseArea.setDeleteFlag(0);
@@ -67,7 +67,7 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
         if (expertiseArea.getUpdatedTime() == null) {
             expertiseArea.setUpdatedTime(new Date());
         }
-        
+
         boolean result = this.save(expertiseArea);
         if (result) {
             log.info("新增领域信息成功,ID={}", expertiseArea.getId());
@@ -79,23 +79,23 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
     @Override
     public R<LawyerExpertiseArea> editExpertiseArea(LawyerExpertiseArea expertiseArea) {
         log.info("LawyerExpertiseAreaServiceImpl.editExpertiseArea?expertiseArea={}", expertiseArea);
-        
+
         // 参数校验
         if (expertiseArea == null || expertiseArea.getId() == null) {
             log.warn("编辑领域信息失败:ID为空");
             return R.fail("ID不能为空");
         }
-        
+
         // 查询记录是否存在
         LawyerExpertiseArea existingArea = expertiseAreaMapper.selectById(expertiseArea.getId());
         if (existingArea == null) {
             log.warn("编辑领域信息失败:记录不存在,ID={}", expertiseArea.getId());
             return R.fail("记录不存在");
         }
-        
+
         // 设置更新时间
         expertiseArea.setUpdatedTime(new Date());
-        
+
         boolean result = this.updateById(expertiseArea);
         if (result) {
             log.info("编辑领域信息成功,ID={}", expertiseArea.getId());
@@ -109,20 +109,20 @@ public class LawyerExpertiseAreaServiceImpl extends ServiceImpl<LawyerExpertiseA
     @Override
     public R<Boolean> deleteExpertiseArea(Integer id) {
         log.info("LawyerExpertiseAreaServiceImpl.deleteExpertiseArea?id={}", id);
-        
+
         // 参数校验
         if (id == null) {
             log.warn("删除领域信息失败:ID为空");
             return R.fail("ID不能为空");
         }
-        
+
         // 查询记录是否存在
         LawyerExpertiseArea existingArea = expertiseAreaMapper.selectById(id);
         if (existingArea == null) {
             log.warn("删除领域信息失败:记录不存在,ID={}", id);
             return R.fail("记录不存在");
         }
-        
+
         boolean result = this.removeById(id);
         if (result) {
             log.info("删除领域信息成功,ID={}", id);

+ 2 - 2
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerImgServiceImpl.java

@@ -109,8 +109,8 @@ public class LawyerImgServiceImpl extends ServiceImpl<LawyerImgMapper, LawyerImg
     /**
      * 通过businessId获取图片
      *
-     * @param lawyerId  律师ID
-     * @param imgType   图片类型
+     * @param lawyerId   律师ID
+     * @param imgType    图片类型
      * @param businessId 业务ID
      * @return list
      */

+ 1 - 1
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerPaymentTransactionServiceImpl.java

@@ -29,7 +29,7 @@ public class LawyerPaymentTransactionServiceImpl extends ServiceImpl<LawyerPayme
 
     @Override
     public R<IPage<LawyerPaymentTransaction>> getPaymentTransactionList(int pageNum, int pageSize, Integer consultationOrderId,
-                                                                   Integer clientUserId, Integer transactionStatus) {
+                                                                        Integer clientUserId, Integer transactionStatus) {
         log.info("LawyerPaymentTransactionServiceImpl.getPaymentTransactionList?pageNum={},pageSize={},consultationOrderId={},clientUserId={},transactionStatus={}",
                 pageNum, pageSize, consultationOrderId, clientUserId, transactionStatus);
         Page<LawyerPaymentTransaction> page = new Page<>(pageNum, pageSize);