zhangchen vor 3 Wochen
Ursprung
Commit
d177295bac

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/vo/LawyerConsultationOrderVO.java

@@ -140,7 +140,7 @@ public class LawyerConsultationOrderVO implements Serializable {
     @ApiModelProperty(value = "个人简介(详细)")
     private String personalIntroduction;
 
-    @ApiModelProperty(value = "问题场景列表")
+    @ApiModelProperty(value = "法律场景列表")
     private List<String> lawyerLegalProblemScenarioList;
 
     @ApiModelProperty(value = "倒計時(秒),僅待支付訂單有效,30分鐘有效期")

+ 65 - 0
alien-entity/src/main/java/shop/alien/mapper/LawyerConsultationOrderMapper.java

@@ -229,6 +229,71 @@ public interface LawyerConsultationOrderMapper extends BaseMapper<LawyerConsulta
             "        left join lawyer_expertise_area lea on lea.id = lu.lawyer_expertise_area_id and lea.delete_flag = 0 " +
             "        left join life_user lur on lur.id = lco.client_user_id " +
             " ${ew.customSqlSegment}")
+    IPage<LawyerConsultationOrderVO> getLawyerConsultationOrderInfo(
+            IPage<LawyerConsultationOrderVO> page, @Param(Constants.WRAPPER) QueryWrapper<LawyerConsultationOrderVO> queryWrapper
+    );
+
+
+    /**
+     * 查询咨询订单(用户端)
+     *
+     * @param page 分页
+     * @param queryWrapper 查询对象
+     * @return 列表结果
+     */
+    @Select("        SELECT\n" +
+            "        lco.id,\n" +
+            "        lco.order_number,\n" +
+            "        lco.client_user_id,\n" +
+            "        lco.lawyer_user_id,\n" +
+            "        lco.problem_scenario_id,\n" +
+            "        lco.problem_description,\n" +
+            "        lco.order_amount,\n" +
+            "        lco.consultation_fee,\n" +
+            "        lco.start_time,\n" +
+            "        lco.end_time,\n" +
+            "        lco.order_status,\n" +
+            "        lco.payment_status,\n" +
+            "        lco.order_time,\n" +
+            "        lco.payment_time,\n" +
+            "        lco.validity_period,\n" +
+            "        lco.rating,\n" +
+            "        lco.comment,\n" +
+            "        lco.created_time,\n" +
+            "        lco.alipay_no,\n" +
+            "        lco.order_str,\n" +
+            "        lu.name AS lawyer_name,\n" +
+            "        lu.phone AS lawyer_phone,\n" +
+            "        lu.email AS lawyer_email,\n" +
+            "        lu.lawyer_certificate_no,\n" +
+            "        lu.law_firm,\n" +
+            "        lu.practice_years,\n" +
+            "        lu.specialty_fields,\n" +
+            "        lu.certification_status,\n" +
+            "        lu.service_score,\n" +
+            "        lu.service_count,\n" +
+            "        lu.consultation_fee AS lawyer_consultation_fee,\n" +
+            "        lu.province,\n" +
+            "        lu.city,\n" +
+            "        lu.district,\n" +
+            "        lu.address,\n" +
+            "        lu.head_img,\n" +
+            "        lu.nick_name,\n" +
+            "        lu.account_blurb,\n" +
+            "        lu.personal_introduction,\n" +
+            "        lf.platform_commission_ratio as commission_rate,\n" +
+            "        lf.firm_name,\n" +
+            "        CONCAT(TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(lf.platform_commission_ratio AS CHAR))), '%') AS commissionRateStr, \n" +
+            "        lea.expertise_area_info,\n" +
+            "        lur.user_name client_user_name,\n" +
+            "        lur.user_phone client_user_phone,\n" +
+            "        lco.order_amount - lco.consultation_fee as lawyerEarnings\n" +
+            "        FROM lawyer_consultation_order lco\n" +
+            "        LEFT JOIN lawyer_user lu ON lco.lawyer_user_id = lu.id AND lu.delete_flag = 0\n" +
+            "        LEFT JOIN law_firm lf on lf.id = lu.firm_id\n" +
+            "        left join lawyer_expertise_area lea on lea.id = lu.lawyer_expertise_area_id and lea.delete_flag = 0 " +
+            "        left join life_user lur on lur.id = lco.client_user_id " +
+            " ${ew.customSqlSegment}")
     IPage<LawyerConsultationOrderVO> getLawyerConsultationOrderList(
             IPage<LawyerConsultationOrderVO> page, @Param(Constants.WRAPPER) QueryWrapper<LawyerConsultationOrderVO> queryWrapper
     );

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

@@ -320,7 +320,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
                 lawyerId, clientUserName);
 
         // 查询订单列表
-        IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getLawyerConsultationOrderList(
+        IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getLawyerConsultationOrderInfo(
                 page, queryWrapper);
 
         // 填充律师问题场景信息

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

@@ -589,9 +589,9 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
         IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getLawyerConsultationOrderList(
                 page, queryWrapper);
 
-        // 填充律师问题场景信息
+        // 填充律场景信息
         if (voPage != null) {
-            fillLawyerServiceArea(voPage);
+            fillLegalSceneArea(voPage);
             // 为待支付订单计算倒计时(30分钟有效期)
             calculateCountdownForPendingOrders(voPage);
         }
@@ -768,11 +768,11 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
     }
 
     /**
-     * 填充律师服务领域信息到订单VO列表
+     * 填充律师法律场景到订单VO列表
      *
      * @param voPage 订单VO分页对象
      */
-    private void fillLawyerServiceArea(IPage<LawyerConsultationOrderVO> voPage) {
+    private void fillLegalSceneArea(IPage<LawyerConsultationOrderVO> voPage) {
         List<LawyerConsultationOrderVO> orderList = voPage.getRecords();
         if (CollectionUtils.isEmpty(orderList)) {
             return;
@@ -789,7 +789,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
             return;
         }
 
-        // 批量查询律师问题场景
+        // 批量查询律场景
         Map<String, List<String>> serviceAreaMap = getLawyerServiceArea(lawyerIdList);
         if (serviceAreaMap.isEmpty()) {
             return;
@@ -1017,7 +1017,7 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
 
         // 填充律师问题场景信息
         if (voPage != null) {
-            fillLawyerServiceArea(voPage);
+            fillLegalSceneArea(voPage);
             // 为待支付订单计算倒计时(30分钟有效期)
             calculateCountdownForPendingOrders(voPage);
         }