Kaynağa Gözat

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBaseServiceImpl.java
肖路 2 ay önce
ebeveyn
işleme
1d1adcfc52
86 değiştirilmiş dosya ile 3243 ekleme ve 315 silme
  1. 12 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerSalesService.java
  2. 1 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java
  3. 13 3
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/CustomerApiVo.java
  4. 69 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/vo/RemoteCustomerSalesVo.java
  5. 14 0
      ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/RemoteProductShoppingCartService.java
  6. 41 0
      ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/domain/RemoteProductShoppingCartVo.java
  7. 47 0
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/ComplaintsSuggestionsType.java
  8. 17 0
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderPayType.java
  9. 23 0
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderSourceEnum.java
  10. 3 1
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderStatus.java
  11. 2 2
      ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlatformDataScopeInterceptor.java
  12. 5 5
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementDetailController.java
  13. 17 5
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementInvoiceController.java
  14. 71 0
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementInvoiceDetailController.java
  15. 8 8
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementOrderController.java
  16. 6 6
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementProductController.java
  17. 4 0
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/domain/bo/StatementInvoiceBo.java
  18. 8 0
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/service/IStatementInvoiceService.java
  19. 91 24
      ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/service/impl/StatementInvoiceServiceImpl.java
  20. 106 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/ComplaintsSuggestionsController.java
  21. 1 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/CustomerInfoController.java
  22. 2 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/PurchaseHabitController.java
  23. 9 7
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcAddressController.java
  24. 99 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcComplaintsSuggestionsController.java
  25. 19 19
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcContactController.java
  26. 7 7
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcDeptController.java
  27. 5 5
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcEnterpriseController.java
  28. 28 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcEnterpriseScaleController.java
  29. 27 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcIndustryCategoryController.java
  30. 6 6
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcInvoiceController.java
  31. 62 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcPurchaseHabitController.java
  32. 121 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/ComplaintsSuggestions.java
  33. 8 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/CustomerInfo.java
  34. 6 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/PurchaseHabit.java
  35. 113 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/ComplaintsSuggestionsBo.java
  36. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/CustomerContactBo.java
  37. 8 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/CustomerInfoBo.java
  38. 5 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/PurchaseHabitBo.java
  39. 143 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/ComplaintsSuggestionsVo.java
  40. 2 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/CustomerContactVo.java
  41. 8 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/CustomerInfoVo.java
  42. 6 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/PurchaseHabitVo.java
  43. 50 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerSalesServiceImpl.java
  44. 1 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java
  45. 15 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/mapper/ComplaintsSuggestionsMapper.java
  46. 70 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/IComplaintsSuggestionsService.java
  47. 11 3
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ICustomerInfoService.java
  48. 1 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/IPurchaseHabitService.java
  49. 169 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/ComplaintsSuggestionsServiceImpl.java
  50. 5 4
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerContactServiceImpl.java
  51. 33 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerInfoServiceImpl.java
  52. 2 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/PurchaseHabitServiceImpl.java
  53. 7 0
      ruoyi-modules/ruoyi-customer/src/main/resources/mapper/customer/ComplaintsSuggestionsMapper.xml
  54. 4 0
      ruoyi-modules/ruoyi-order/pom.xml
  55. 106 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderEvaluationController.java
  56. 32 1
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderMainController.java
  57. 342 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderController.java
  58. 51 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderEvaluationController.java
  59. 4 3
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderReturnController.java
  60. 87 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/OrderEvaluation.java
  61. 81 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/bo/OrderEvaluationBo.java
  62. 51 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/bo/PcSubmitOrderBo.java
  63. 14 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/dto/OrderPayDto.java
  64. 27 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderEvaluationListVo.java
  65. 100 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderEvaluationVo.java
  66. 20 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderProductBriefVo.java
  67. 15 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderEvaluationMapper.java
  68. 10 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderMainMapper.java
  69. 5 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderProductMapper.java
  70. 0 171
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/pc/controller/PcOrderController.java
  71. 73 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderEvaluationService.java
  72. 12 1
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderMainService.java
  73. 194 0
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderEvaluationServiceImpl.java
  74. 245 19
      ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java
  75. 7 0
      ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderEvaluationMapper.xml
  76. 34 0
      ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMainMapper.xml
  77. 16 0
      ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderProductMapper.xml
  78. 19 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductShoppingCartServiceImpl.java
  79. 28 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/PcComBankController.java
  80. 29 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/PcComStaffController.java
  81. 2 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/ComStaffVo.java
  82. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/pc/controller/PcRoleController.java
  83. 19 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/ComStaffServiceImpl.java
  84. 2 1
      ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowCategory.java
  85. 2 1
      ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java
  86. 2 1
      ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java

+ 12 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerSalesService.java

@@ -0,0 +1,12 @@
+package org.dromara.customer.api;
+
+import org.dromara.customer.api.domain.vo.RemoteCustomerSalesVo;
+
+public interface RemoteCustomerSalesService {
+
+    /*根据客户id 查询客户的销售信息  一对一*/
+    RemoteCustomerSalesVo selectCustomerSalesInfoByCustomerId(Long customerId);
+
+    /*更新客户销售信息*/
+    Boolean updateCustomerSalesInfo(RemoteCustomerSalesVo vo);
+}

+ 1 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java

@@ -21,4 +21,5 @@ public interface RemoteCustomerService {
      * 根据userId查询客户id
      */
     Long selectCustomerIdByUserId(Long userId);
+
 }

+ 13 - 3
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/CustomerApiVo.java

@@ -14,12 +14,22 @@ public class CustomerApiVo implements Serializable {
     @Serial
     private static final long serialVersionUID = 1L;
 
-    /** 客户ID */
+    /**
+     * 客户ID
+     */
     private Long id;
 
-    /** 客户编号 */
+    private Long companyId;
+
+    /**
+     * 客户编号
+     */
     private String customerNo;
 
-    /** 客户名称 */
+    /**
+     * 客户名称
+     */
     private String customerName;
+
+
 }

+ 69 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/domain/vo/RemoteCustomerSalesVo.java

@@ -0,0 +1,69 @@
+package org.dromara.customer.api.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+@Data
+public class RemoteCustomerSalesVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 销售信息ID
+     */
+    private Long id;
+
+    /**
+     * 关联客户ID
+     */
+    private Long customerId;
+
+    /**
+     * 信用额度
+     */
+    private BigDecimal creditAmount;
+
+    /**
+     * 剩余额度
+     */
+    private BigDecimal remainingQuota;
+
+    /**
+     * 临时额度
+     */
+    private BigDecimal temporaryQuota;
+
+    /**
+     * 账期(如:30天)
+     */
+    private Integer accountPeriod;
+
+    /**
+     * 账单日(每月几号)
+     */
+    private Integer billDate;
+
+    /**
+     * 计费日(如:每月1日)
+     */
+    private Integer billingDay;
+
+    /**
+     * 订单审核方式
+     */
+    private String orderAudit;
+
+    /**
+     * 信用管理方式
+     */
+    private Long creditManagementId;
+
+    /**
+     * 信用支付密码
+     */
+    private String creditPaymentPassword;
+}

+ 14 - 0
ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/RemoteProductShoppingCartService.java

@@ -1,5 +1,11 @@
 package org.dromara.product.api;
 
+import org.dromara.product.api.domain.RemoteProductShoppingCartVo;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
 /**
  * author
  * 时间:2026/2/4,17:33
@@ -10,4 +16,12 @@ public interface RemoteProductShoppingCartService {
 
     //解顶购物车 就是 删除购物车
     boolean unlockShoppingCart(Long productId, Long count);
+
+    /*根据购物车id 查询购物车项*/
+    List<RemoteProductShoppingCartVo> getShoppingCartList(Set<Long> cartIds);
+
+    /*批量删除购物车项*/
+    Boolean deleteWithValidByIds(Set<Long> ids);
+
+
 }

+ 41 - 0
ruoyi-api/ruoyi-api-product/src/main/java/org/dromara/product/api/domain/RemoteProductShoppingCartVo.java

@@ -0,0 +1,41 @@
+package org.dromara.product.api.domain;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class RemoteProductShoppingCartVo implements Serializable {
+
+    /**
+     *
+     */
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 商品id
+     */
+    private Long productId;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 商品数量
+     */
+    private Long productNum;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    private String status;
+
+
+}

+ 47 - 0
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/ComplaintsSuggestionsType.java

@@ -0,0 +1,47 @@
+package org.dromara.common.core.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum ComplaintsSuggestionsType {
+    /**
+     * 商品相关(如商品描述、质量问题等)
+     */
+    PRODUCT("0", "商品相关"),
+
+    /**
+     * 物流状况(配送延迟、丢件等)
+     */
+    LOGISTICS("1", "物流状况"),
+
+    /**
+     * 客户服务(客服态度、响应速度等)
+     */
+    CUSTOMER_SERVICE("2", "客户服务"),
+
+    /**
+     * 优惠活动(优惠券、折扣活动问题)
+     */
+    PROMOTION("3", "优惠活动"),
+
+    /**
+     * 功能异常(APP/网站功能报错、无法使用等)
+     */
+    FUNCTIONAL_ERROR("4", "功能异常"),
+
+    /**
+     * 产品建议(用户提出的改进建议)
+     */
+    PRODUCT_SUGGESTION("5", "产品建议"),
+
+    /**
+     * 其他未分类问题
+     */
+    OTHER("6", "其他");
+
+
+    private final String code;
+    private final String info;
+}

+ 17 - 0
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderPayType.java

@@ -0,0 +1,17 @@
+package org.dromara.common.core.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum OrderPayType {
+
+    /**
+     * 信用支付
+     */
+    CREDIT_PAY("0", "信用支付");
+
+    private final String code;
+    private final String info;
+}

+ 23 - 0
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderSourceEnum.java

@@ -0,0 +1,23 @@
+package org.dromara.common.core.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum OrderSourceEnum {
+    /**
+     * 前台提交
+     */
+    BEFORE_ADD("0", "前台提交"),
+
+    /**
+     * 后台新增
+     */
+    AFTER_ADD("1", "后台新增");
+
+
+    private final String code;
+    private final String info;
+
+}

+ 3 - 1
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/enums/OrderStatus.java

@@ -40,7 +40,9 @@ public enum OrderStatus {
     /**
      * 已关闭(取消、超时、全额退款等)
      */
-    CLOSED("6", "已关闭");
+    CLOSED("6", "已关闭"),
+
+    CANCEL("7", "取消");
 
 
     private final String code;

+ 2 - 2
ruoyi-common/ruoyi-common-mybatis/src/main/java/org/dromara/common/mybatis/interceptor/PlatformDataScopeInterceptor.java

@@ -77,6 +77,7 @@ public class PlatformDataScopeInterceptor implements Interceptor {
         "order_product",
         "com_",
         "product_",
+        "flow_",
         "supplier_level",
         "enterprise_scale",
         "industry_category",
@@ -96,7 +97,6 @@ public class PlatformDataScopeInterceptor implements Interceptor {
         "authorize_type_level"
 
 
-
         // 注意:前缀匹配需特殊处理(如 qrtz_),见 isIgnoreTable 方法
     ));
 
@@ -210,7 +210,7 @@ public class PlatformDataScopeInterceptor implements Interceptor {
         }
 
         // 前缀匹配
-        return tableName.startsWith("qrtz_") || tableName.startsWith("product_") || tableName.startsWith("com_") ||tableName.startsWith("supplier_");
+        return tableName.startsWith("qrtz_") || tableName.startsWith("product_") || tableName.startsWith("com_") || tableName.startsWith("supplier_") || tableName.startsWith("flow_");
     }
 
     /**

+ 5 - 5
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/pc/controller/PcStatementDetailController.java → ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementDetailController.java

@@ -1,4 +1,4 @@
-package org.dromara.bill.pc.controller;
+package org.dromara.bill.controller.pc;
 
 import lombok.RequiredArgsConstructor;
 import jakarta.validation.constraints.*;
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
 
 /**
  * PC端 - 对账单明细管理
- * 前端访问路由地址为:/pc/enterprise/statementDetail
+ * 前端访问路由地址为:/pcStatementDetail
  *
  * @author Claude
  * @date 2026-01-29
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/statementDetail")
+@RequestMapping("/pcStatementDetail")
 public class PcStatementDetailController extends BaseController {
 
     private final IStatementDetailService statementDetailService;
@@ -39,7 +39,7 @@ public class PcStatementDetailController extends BaseController {
         if (bo.getStatementOrderId() != null) {
             StatementOrderVo statement = statementOrderService.queryById(bo.getStatementOrderId());
             if (statement != null) {
-                Long customerId = LoginHelper.getUserId();
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
                 if (!customerId.equals(statement.getCustomerId())) {
                     throw new IllegalArgumentException("无权访问该对账单明细");
                 }
@@ -58,7 +58,7 @@ public class PcStatementDetailController extends BaseController {
         if (vo != null && vo.getStatementOrderId() != null) {
             StatementOrderVo statement = statementOrderService.queryById(vo.getStatementOrderId());
             if (statement != null) {
-                Long customerId = LoginHelper.getUserId();
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
                 if (!customerId.equals(statement.getCustomerId())) {
                     return R.fail("无权访问该对账单明细");
                 }

+ 17 - 5
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/pc/controller/PcStatementInvoiceController.java → ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementInvoiceController.java

@@ -1,8 +1,12 @@
-package org.dromara.bill.pc.controller;
+package org.dromara.bill.controller.pc;
 
 import lombok.RequiredArgsConstructor;
 import jakarta.validation.constraints.*;
 import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.satoken.utils.LoginHelper;
@@ -15,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
 
 /**
  * PC端 - 对账单发票管理
- * 前端访问路由地址为:/pc/enterprise/statementInvoice
+ * 前端访问路由地址为:/pcStatementInvoice
  *
  * @author Claude
  * @date 2026-01-29
@@ -23,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/statementInvoice")
+@RequestMapping("/pcStatementInvoice")
 public class PcStatementInvoiceController extends BaseController {
 
     private final IStatementInvoiceService statementInvoiceService;
@@ -34,7 +38,7 @@ public class PcStatementInvoiceController extends BaseController {
      */
     @GetMapping("/list")
     public TableDataInfo<StatementInvoiceVo> list(StatementInvoiceBo bo, PageQuery pageQuery) {
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         bo.setCustomerId(customerId);
         return statementInvoiceService.queryPageList(bo, pageQuery);
     }
@@ -48,11 +52,19 @@ public class PcStatementInvoiceController extends BaseController {
                                          @PathVariable("id") Long id) {
         StatementInvoiceVo vo = statementInvoiceService.queryById(id);
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该对账单发票");
             }
         }
         return R.ok(vo);
     }
+
+    /*pc端客户申请开票*/
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody StatementInvoiceBo bo) {
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        bo.setCustomerId(customerId);
+        return toAjax(statementInvoiceService.pcInsertByBo(bo));
+    }
 }

+ 71 - 0
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementInvoiceDetailController.java

@@ -0,0 +1,71 @@
+package org.dromara.bill.controller.pc;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.dromara.bill.domain.StatementInvoice;
+import org.dromara.bill.domain.StatementInvoiceDetail;
+import org.dromara.bill.domain.bo.StatementDetailBo;
+import org.dromara.bill.domain.bo.StatementInvoiceDetailBo;
+import org.dromara.bill.domain.vo.StatementDetailVo;
+import org.dromara.bill.domain.vo.StatementInvoiceDetailVo;
+import org.dromara.bill.domain.vo.StatementInvoiceVo;
+import org.dromara.bill.domain.vo.StatementOrderVo;
+import org.dromara.bill.service.IStatementInvoiceDetailService;
+import org.dromara.bill.service.IStatementInvoiceService;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.common.web.core.BaseController;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcStatementInvoiceDetail")
+public class PcStatementInvoiceDetailController extends BaseController {
+
+    private final IStatementInvoiceService statementInvoiceService;
+
+    private final IStatementInvoiceDetailService statementInvoiceDetailService;
+
+    /**
+     * 查询发票单明细列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo<StatementInvoiceDetailVo> list(StatementInvoiceDetailBo bo, PageQuery pageQuery) {
+        if (bo.getStatementInvoiceId() != null) {
+            StatementInvoiceVo statement = statementInvoiceService.queryById(bo.getStatementInvoiceId());
+            if (statement != null) {
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
+                if (!customerId.equals(statement.getCustomerId())) {
+                    throw new IllegalArgumentException("无权访问该对账单明细");
+                }
+            }
+        }
+        return statementInvoiceDetailService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 获取发票单明细详细信息
+     */
+    @GetMapping("/{id}")
+    public R<StatementInvoiceDetailVo> getInfo(@NotNull(message = "主键不能为空")
+                                               @PathVariable("id") Long id) {
+        StatementInvoiceDetailVo vo = statementInvoiceDetailService.queryById(id);
+        if (vo != null && vo.getStatementInvoiceId() != null) {
+            StatementInvoiceVo statement = statementInvoiceService.queryById(vo.getStatementInvoiceId());
+            if (statement != null) {
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
+                if (!customerId.equals(statement.getCustomerId())) {
+                    return R.fail("无权访问该对账单明细");
+                }
+            }
+        }
+        return R.ok(vo);
+    }
+}

+ 8 - 8
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/pc/controller/PcStatementOrderController.java → ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementOrderController.java

@@ -1,4 +1,4 @@
-package org.dromara.bill.pc.controller;
+package org.dromara.bill.controller.pc;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -26,7 +26,7 @@ import java.util.List;
 
 /**
  * PC端 - 对账单管理
- * 前端访问路由地址为:/pc/enterprise/statement
+ * 前端访问路由地址为:/pcStatementOrder
  *
  * @author Claude
  * @date 2026-01-29
@@ -34,7 +34,7 @@ import java.util.List;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/statement")
+@RequestMapping("/pcStatementOrder")
 public class PcStatementOrderController extends BaseController {
 
     private final IStatementOrderService statementOrderService;
@@ -47,7 +47,7 @@ public class PcStatementOrderController extends BaseController {
      */
     @GetMapping("/list")
     public TableDataInfo<StatementOrderVo> list(StatementOrderBo bo, PageQuery pageQuery) {
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // PC端权限控制:强制只查询状态为 1、2、3 的对账单
         LambdaQueryWrapper<StatementOrder> wrapper = new LambdaQueryWrapper<>();
@@ -90,7 +90,7 @@ public class PcStatementOrderController extends BaseController {
                                        @PathVariable("id") Long id) {
         StatementOrderVo vo = statementOrderService.queryById(id);
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该对账单");
             }
@@ -103,7 +103,7 @@ public class PcStatementOrderController extends BaseController {
      */
     @GetMapping("/details")
     public TableDataInfo<StatementDetailVo> getDetails(PageQuery pageQuery) {
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         return statementOrderService.listDetailsByCustomerIdPage(customerId, pageQuery);
     }
 
@@ -113,7 +113,7 @@ public class PcStatementOrderController extends BaseController {
     @Log(title = "PC端-对账单确认", businessType = BusinessType.UPDATE)
     @PutMapping("/confirm")
     public R<Void> confirm(@RequestBody StatementOrderBo bo) {
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         StatementOrderVo existingStatement = statementOrderService.queryById(bo.getId());
         if (existingStatement == null) {
             return R.fail("对账单不存在");
@@ -132,7 +132,7 @@ public class PcStatementOrderController extends BaseController {
     @Log(title = "PC端-对账单驳回", businessType = BusinessType.UPDATE)
     @PutMapping("/reject")
     public R<Void> reject(@RequestBody StatementOrderBo bo) {
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         StatementOrderVo existingStatement = statementOrderService.queryById(bo.getId());
         if (existingStatement == null) {
             return R.fail("对账单不存在");

+ 6 - 6
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/pc/controller/PcStatementProductController.java → ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/controller/pc/PcStatementProductController.java

@@ -1,4 +1,4 @@
-package org.dromara.bill.pc.controller;
+package org.dromara.bill.controller.pc;
 
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import lombok.RequiredArgsConstructor;
@@ -21,7 +21,7 @@ import java.util.List;
 
 /**
  * PC端 - 对账单商品管理
- * 前端访问路由地址为:/pc/enterprise/statementProduct
+ * 前端访问路由地址为:/pcStatementProduct
  *
  * @author Claude
  * @date 2026-01-29
@@ -29,7 +29,7 @@ import java.util.List;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/statementProduct")
+@RequestMapping("/pcStatementProduct")
 public class PcStatementProductController extends BaseController {
 
     private final IStatementProductService statementProductService;
@@ -43,7 +43,7 @@ public class PcStatementProductController extends BaseController {
         if (bo.getStatementOrderId() != null) {
             StatementOrderVo statement = statementOrderService.queryById(bo.getStatementOrderId());
             if (statement != null) {
-                Long customerId = LoginHelper.getUserId();
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
                 if (!customerId.equals(statement.getCustomerId())) {
                     throw new IllegalArgumentException("无权访问该对账单商品");
                 }
@@ -67,7 +67,7 @@ public class PcStatementProductController extends BaseController {
             throw new IllegalArgumentException("statementOrderId 和 orderId 不能为空");
         }
 
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         for (StatementOrderItem item : items) {
             Long statementOrderId = Long.parseLong(item.getStatementOrderId());
             StatementOrderVo statement = statementOrderService.queryById(statementOrderId);
@@ -92,7 +92,7 @@ public class PcStatementProductController extends BaseController {
         if (vo != null && vo.getStatementOrderId() != null) {
             StatementOrderVo statement = statementOrderService.queryById(vo.getStatementOrderId());
             if (statement != null) {
-                Long customerId = LoginHelper.getUserId();
+                Long customerId = LoginHelper.getLoginUser().getCustomerId();
                 if (!customerId.equals(statement.getCustomerId())) {
                     return R.fail("无权访问该对账单商品");
                 }

+ 4 - 0
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/domain/bo/StatementInvoiceBo.java

@@ -11,6 +11,7 @@ import jakarta.validation.constraints.*;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Set;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 
@@ -90,4 +91,7 @@ public class StatementInvoiceBo extends BaseEntity {
 
     private List<InvoiceInfoBo> invoiceList;
 
+    /*客户申请开票提供的对账单id*/
+    private Set<Long> statementOrderIds;
+
 }

+ 8 - 0
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/service/IStatementInvoiceService.java

@@ -54,6 +54,14 @@ public interface IStatementInvoiceService extends IService<StatementInvoice> {
      */
     Boolean insertByBo(StatementInvoiceBo bo);
 
+    /**
+     * pc新增销售发票主
+     *
+     * @param bo 销售发票主
+     * @return 是否新增成功
+     */
+    Boolean pcInsertByBo(StatementInvoiceBo bo);
+
     /**
      * 修改销售发票主
      *

+ 91 - 24
ruoyi-modules/ruoyi-bill/src/main/java/org/dromara/bill/service/impl/StatementInvoiceServiceImpl.java

@@ -1,27 +1,30 @@
 package org.dromara.bill.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
 import org.dromara.bill.domain.*;
-import org.dromara.bill.domain.bo.*;
-import org.dromara.bill.domain.vo.*;
-import org.dromara.bill.mapper.InvoiceInfoMapper;
-import org.dromara.bill.mapper.StatementInvoiceDetailMapper;
-import org.dromara.bill.mapper.StatementInvoiceProductMapper;
+import org.dromara.bill.domain.bo.InvoiceInfoBo;
+import org.dromara.bill.domain.bo.StatementInvoiceBo;
+import org.dromara.bill.domain.bo.StatementInvoiceDetailBo;
+import org.dromara.bill.domain.bo.StatementInvoiceProductBo;
+import org.dromara.bill.domain.vo.InvoiceInfoVo;
+import org.dromara.bill.domain.vo.StatementInvoiceDetailVo;
+import org.dromara.bill.domain.vo.StatementInvoiceProductVo;
+import org.dromara.bill.domain.vo.StatementInvoiceVo;
+import org.dromara.bill.mapper.*;
+import org.dromara.bill.service.IStatementInvoiceService;
+import org.dromara.common.core.enums.InvoiceStatus;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
-import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.mybatis.core.page.PageQuery;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.redis.utils.SequenceUtils;
 import org.springframework.stereotype.Service;
-import org.dromara.bill.mapper.StatementInvoiceMapper;
-import org.dromara.bill.service.IStatementInvoiceService;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
@@ -46,6 +49,8 @@ public class StatementInvoiceServiceImpl extends ServiceImpl<StatementInvoiceMap
 
     private final StatementInvoiceProductMapper statementInvoiceProductMapper;
 
+    private final StatementOrderMapper statementOrderMapper;
+
 
     /**
      * 查询销售发票主
@@ -143,15 +148,71 @@ public class StatementInvoiceServiceImpl extends ServiceImpl<StatementInvoiceMap
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean insertByBo(StatementInvoiceBo bo) {
+        boolean success = false;
+        try {
+            String statementInvoiceNo = SequenceUtils.generateOrderCode("BL");
+            bo.setStatementInvoiceNo(statementInvoiceNo);
+            StatementInvoice entity = MapstructUtils.convert(bo, StatementInvoice.class);
+            validEntityBeforeSave(entity);
+            success = this.save(entity);
+            if (success) {
+                bo.setId(entity.getId());
+                saveDetailsAndProductsAndInvoiceInfos(bo);
+            }
+            /*查询发票单对应的对账单号 统一修改对账单为已开票状态*/
+            // 提取对账单 ID 列表
+            Set<Long> statementOrderIds = bo.getDetailList().stream()
+                .map(StatementInvoiceDetailBo::getStatementOrderId)
+                .filter(Objects::nonNull) // 防止空指针
+                .collect(Collectors.toSet());
+
+            if (!statementOrderIds.isEmpty()) {
+                List<StatementOrder> updateList = statementOrderIds.stream()
+                    .map(id -> {
+                        StatementOrder so = new StatementOrder();
+                        so.setId(id);
+                        so.setIsInvoiceStatus(InvoiceStatus.INVOICED.getCode());
+                        return so;
+                    })
+                    .collect(Collectors.toList());
+
+                // 批量更新
+                statementOrderMapper.updateBatchById(updateList);
+            }
+        } catch (Exception e) {
+            log.error("新增销售发票主失败:{}", e.getMessage());
+            throw new RuntimeException(e);
+        }
+        return success;
+    }
+
+    /**
+     * pc新增销售发票主
+     *
+     * @param bo 销售发票主
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean pcInsertByBo(StatementInvoiceBo bo) {
+        // 1. 设置发票编号
         String statementInvoiceNo = SequenceUtils.generateOrderCode("BL");
         bo.setStatementInvoiceNo(statementInvoiceNo);
+
+        // 2. 设置初始状态为“待确认”
+        bo.setInvoiceStatus(InvoiceStatus.NOT_INVOICED.getCode()); // 假设 PENDING = "0" 或 "pending"
+
+        // 3. 转换并保存主表
         StatementInvoice entity = MapstructUtils.convert(bo, StatementInvoice.class);
         validEntityBeforeSave(entity);
         boolean success = this.save(entity);
+
         if (success) {
             bo.setId(entity.getId());
+            // 4. 保存明细、商品、发票信息(不含真实发票)
             saveDetailsAndProductsAndInvoiceInfos(bo);
         }
+
+
         return success;
     }
 
@@ -164,16 +225,22 @@ public class StatementInvoiceServiceImpl extends ServiceImpl<StatementInvoiceMap
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean updateByBo(StatementInvoiceBo bo) {
-        StatementInvoice entity = MapstructUtils.convert(bo, StatementInvoice.class);
-        validEntityBeforeSave(entity);
-
-        // 先删除旧数据
-        deleteDetailsAndProductsAndInvoiceInfos(entity.getId());
-
-        // 再保存新数据
-        boolean success = this.updateById(entity);
-        if (success && CollectionUtil.isNotEmpty(bo.getDetailList())) {
-            saveDetailsAndProductsAndInvoiceInfos(bo);
+        boolean success = false;
+        try {
+            StatementInvoice entity = MapstructUtils.convert(bo, StatementInvoice.class);
+            validEntityBeforeSave(entity);
+
+            // 先删除旧数据
+            deleteDetailsAndProductsAndInvoiceInfos(entity.getId());
+
+            // 再保存新数据
+            success = this.updateById(entity);
+            if (success && CollectionUtil.isNotEmpty(bo.getDetailList())) {
+                saveDetailsAndProductsAndInvoiceInfos(bo);
+            }
+        } catch (Exception e) {
+            log.error("修改销售发票主失败:{}", e.getMessage());
+            throw new RuntimeException(e);
         }
         return success;
     }

+ 106 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/ComplaintsSuggestionsController.java

@@ -0,0 +1,106 @@
+package org.dromara.customer.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.customer.domain.vo.ComplaintsSuggestionsVo;
+import org.dromara.customer.domain.bo.ComplaintsSuggestionsBo;
+import org.dromara.customer.service.IComplaintsSuggestionsService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 投诉与建议记录
+ * 前端访问路由地址为:/customer/complaintsSuggestions
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/complaintsSuggestions")
+public class ComplaintsSuggestionsController extends BaseController {
+
+    private final IComplaintsSuggestionsService complaintsSuggestionsService;
+
+    /**
+     * 查询投诉与建议记录列表
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:list")
+    @GetMapping("/list")
+    public TableDataInfo<ComplaintsSuggestionsVo> list(ComplaintsSuggestionsBo bo, PageQuery pageQuery) {
+        return complaintsSuggestionsService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出投诉与建议记录列表
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:export")
+    @Log(title = "投诉与建议记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(ComplaintsSuggestionsBo bo, HttpServletResponse response) {
+        List<ComplaintsSuggestionsVo> list = complaintsSuggestionsService.queryList(bo);
+        ExcelUtil.exportExcel(list, "投诉与建议记录", ComplaintsSuggestionsVo.class, response);
+    }
+
+    /**
+     * 获取投诉与建议记录详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:query")
+    @GetMapping("/{id}")
+    public R<ComplaintsSuggestionsVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(complaintsSuggestionsService.queryById(id));
+    }
+
+    /**
+     * 新增投诉与建议记录
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:add")
+    @Log(title = "投诉与建议记录", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ComplaintsSuggestionsBo bo) {
+        return toAjax(complaintsSuggestionsService.insertByBo(bo));
+    }
+
+    /**
+     * 修改投诉与建议记录
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:edit")
+    @Log(title = "投诉与建议记录", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ComplaintsSuggestionsBo bo) {
+        return toAjax(complaintsSuggestionsService.updateByBo(bo));
+    }
+
+    /**
+     * 删除投诉与建议记录
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("customer:complaintsSuggestions:remove")
+    @Log(title = "投诉与建议记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(complaintsSuggestionsService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 1 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/CustomerInfoController.java

@@ -172,7 +172,7 @@ public class CustomerInfoController extends BaseController {
     @Log(title = "客户信息", businessType = BusinessType.UPDATE)
     @PutMapping("/updateCreditAmount")
     public R<Void> updateCreditAmount(@RequestBody CustomerSalesInfoBo bo) {
-        return toAjax(customerInfoService.updateCreditAmount(bo.getCustomerIds(), bo.getCreditAmount()));
+        return toAjax(customerInfoService.updateCreditAmount(bo.getCustomerIds(), bo.getTemporaryQuota()));
     }
 
     /**

+ 2 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/PurchaseHabitController.java

@@ -106,7 +106,7 @@ public class PurchaseHabitController extends BaseController {
 
     @SaCheckPermission("customer:purchaseHabit:list")
     @GetMapping("/getCustomerPurchaseHabitData")
-    public R<PurchaseHabitVo> getOpenPlatformSettingData(@RequestParam("customerNo") String customerNo) {
-        return R.ok(purchaseHabitService.getCustomerPurchaseHabitData(customerNo));
+    public R<PurchaseHabitVo> getCustomerPurchaseHabitData(@RequestParam("customerId") Long customerId) {
+        return R.ok(purchaseHabitService.getCustomerPurchaseHabitData(customerId));
     }
 }

+ 9 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcAddressController.java

@@ -5,6 +5,7 @@ import java.util.List;
 import lombok.RequiredArgsConstructor;
 import jakarta.validation.constraints.*;
 import org.dromara.common.core.domain.R;
+import org.dromara.common.core.enums.IsDefault;
 import org.dromara.common.log.annotation.Log;
 import org.dromara.common.log.enums.BusinessType;
 import org.dromara.common.mybatis.core.page.PageQuery;
@@ -30,7 +31,7 @@ import org.dromara.common.idempotent.annotation.RepeatSubmit;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/address")
+@RequestMapping("/address")
 public class PcAddressController extends BaseController {
 
     private final ICustomerShippingAddressService customerShippingAddressService;
@@ -42,7 +43,7 @@ public class PcAddressController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<CustomerShippingAddressVo> list(CustomerShippingAddressBo bo, PageQuery pageQuery) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止越权访问
         bo.setCustomerId(customerId);
 
@@ -63,7 +64,7 @@ public class PcAddressController extends BaseController {
 
         // 验证地址是否属于当前用户的企业
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该地址");
             }
@@ -80,7 +81,7 @@ public class PcAddressController extends BaseController {
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody CustomerShippingAddressBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止为其他企业添加地址
         bo.setCustomerId(customerId);
 
@@ -95,7 +96,7 @@ public class PcAddressController extends BaseController {
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CustomerShippingAddressBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证地址是否属于当前用户的企业
         CustomerShippingAddressVo existingAddress = customerShippingAddressService.queryById(bo.getId());
@@ -122,7 +123,7 @@ public class PcAddressController extends BaseController {
     public R<Void> remove(@NotEmpty(message = "主键不能为空")
                           @PathVariable("ids") Long[] ids) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证所有地址是否都属于当前用户的企业
         for (Long id : ids) {
@@ -145,7 +146,7 @@ public class PcAddressController extends BaseController {
     @PutMapping("/default")
     public R<Void> changeDefaultAddress(@RequestBody CustomerShippingAddressBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证地址是否属于当前用户的企业
         CustomerShippingAddressVo address = customerShippingAddressService.queryById(bo.getId());
@@ -158,6 +159,7 @@ public class PcAddressController extends BaseController {
 
         // 强制设置企业ID
         bo.setCustomerId(customerId);
+        bo.setDefaultAddress(IsDefault.Yes.getCode());
 
         return toAjax(customerShippingAddressService.changeDefaultAddress(bo));
     }

+ 99 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcComplaintsSuggestionsController.java

@@ -0,0 +1,99 @@
+package org.dromara.customer.controller.pc;
+
+import jakarta.validation.constraints.NotEmpty;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.customer.domain.bo.ComplaintsSuggestionsBo;
+import org.dromara.customer.domain.vo.ComplaintsSuggestionsVo;
+import org.dromara.customer.domain.vo.CustomerInvoiceInfoVo;
+import org.dromara.customer.service.IComplaintsSuggestionsService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcComplaintsSuggestions")
+public class PcComplaintsSuggestionsController extends BaseController {
+
+    private final IComplaintsSuggestionsService pcComplaintsSuggestionsService;
+
+    @GetMapping("/list")
+    public TableDataInfo<ComplaintsSuggestionsVo> getComplaintsSuggestions(PageQuery pageQuery) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        ComplaintsSuggestionsBo bo = new ComplaintsSuggestionsBo();
+        bo.setCustomerId(customerId);
+        return pcComplaintsSuggestionsService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 新增投诉建议
+     */
+    @Log(title = "PC端-新增投诉建议", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ComplaintsSuggestionsBo bo) {
+        // 获取当前登录用户的企业ID
+        Long userId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置ID,防止为其他企业创建售后申请
+        bo.setUserId(userId);
+        bo.setCustomerId(customerId);
+
+        return toAjax(pcComplaintsSuggestionsService.insertByBo(bo));
+    }
+
+    /**
+     * 修改投诉建议
+     */
+    @Log(title = "PC端-修改投诉建议", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> update(@Validated(AddGroup.class) @RequestBody ComplaintsSuggestionsBo bo) {
+        // 获取当前登录用户的企业ID
+        Long userId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置ID,防止为其他企业创建售后申请
+        bo.setUserId(userId);
+        bo.setCustomerId(customerId);
+
+        return toAjax(pcComplaintsSuggestionsService.updateByBo(bo));
+    }
+
+    /**
+     * 删除投诉建议
+     *
+     * @param ids 主键串
+     */
+    @Log(title = "PC端-投诉建议", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+
+        // 验证所有发票是否都属于当前用户的企业
+        for (Long id : ids) {
+            ComplaintsSuggestionsVo suggestionsVo = pcComplaintsSuggestionsService.queryById(id);
+            if (suggestionsVo == null) {
+                return R.fail("投诉建议ID " + id + " 不存在");
+            }
+            if (!customerId.equals(suggestionsVo.getCustomerId())) {
+                return R.fail("无权删除投诉建议ID " + id);
+            }
+        }
+
+        return toAjax(pcComplaintsSuggestionsService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 19 - 19
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcContactController.java

@@ -1,11 +1,13 @@
 package org.dromara.customer.controller.pc;
 
-import java.util.List;
-
 import cn.dev33.satoken.annotation.SaIgnore;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
 import lombok.RequiredArgsConstructor;
-import jakarta.validation.constraints.*;
 import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
 import org.dromara.common.log.annotation.Log;
 import org.dromara.common.log.enums.BusinessType;
 import org.dromara.common.mybatis.core.page.PageQuery;
@@ -17,9 +19,8 @@ import org.dromara.customer.domain.vo.CustomerContactVo;
 import org.dromara.customer.service.ICustomerContactService;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
-import org.dromara.common.core.validate.AddGroup;
-import org.dromara.common.core.validate.EditGroup;
-import org.dromara.common.idempotent.annotation.RepeatSubmit;
+
+import java.util.List;
 
 /**
  * PC端 - 人员管理
@@ -32,7 +33,7 @@ import org.dromara.common.idempotent.annotation.RepeatSubmit;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/organization/contact")
+@RequestMapping("/organization/contact")
 public class PcContactController extends BaseController {
 
     private final ICustomerContactService customerContactService;
@@ -45,18 +46,17 @@ public class PcContactController extends BaseController {
         // TODO: 需要根据当前登录用户的实际ID查询联系人信息
         // 目前LoginHelper.getUserId()返回的是customerId(企业ID)
         // 需要通过其他方式(如手机号、用户名)来查询当前用户的联系人记录
-        Long customerId = LoginHelper.getUserId();
+        Long userId = LoginHelper.getUserId();
 
         // 查询该企业下的联系人(不限制是否为主联系人)
         CustomerContactBo bo = new CustomerContactBo();
-        bo.setCustomerId(customerId);
-
-        List<CustomerContactVo> list = customerContactService.queryList(bo);
-        if (list != null && !list.isEmpty()) {
-            return R.ok(list.get(0));
+        bo.setId(userId);
+        CustomerContactVo customerContactVo = customerContactService.queryById(userId);
+        if (customerContactVo != null) {
+            return R.ok(customerContactVo);
         }
 
-        return R.fail("未找到当前用户信息,customerId: " + customerId);
+        return R.fail("未找到当前用户信息");
     }
 
     /**
@@ -66,7 +66,7 @@ public class PcContactController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<CustomerContactVo> list(CustomerContactBo bo, PageQuery pageQuery) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止越权访问
         bo.setCustomerId(customerId);
 
@@ -87,7 +87,7 @@ public class PcContactController extends BaseController {
 
         // 验证联系人是否属于当前用户的企业
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该联系人");
             }
@@ -104,7 +104,7 @@ public class PcContactController extends BaseController {
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody CustomerContactBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止为其他企业添加联系人
         bo.setCustomerId(customerId);
 
@@ -119,7 +119,7 @@ public class PcContactController extends BaseController {
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CustomerContactBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证联系人是否属于当前用户的企业
         CustomerContactVo existingContact = customerContactService.queryById(bo.getId());
@@ -146,7 +146,7 @@ public class PcContactController extends BaseController {
     public R<Void> remove(@NotEmpty(message = "主键不能为空")
                           @PathVariable("ids") Long[] ids) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证所有联系人是否都属于当前用户的企业
         for (Long id : ids) {

+ 7 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcDeptController.java

@@ -31,7 +31,7 @@ import org.dromara.common.idempotent.annotation.RepeatSubmit;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/organization/dept")
+@RequestMapping("/organization/dept")
 public class PcDeptController extends BaseController {
 
     private final ICustomerDeptService customerDeptService;
@@ -43,7 +43,7 @@ public class PcDeptController extends BaseController {
     @GetMapping("/tree")
     public R<List<CustomerDeptTreeVo>> getDeptTree() {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         List<CustomerDeptTreeVo> tree = customerDeptService.getCustomerDeptTree(customerId);
         return R.ok(tree);
@@ -56,7 +56,7 @@ public class PcDeptController extends BaseController {
     @GetMapping("/list")
     public R<List<CustomerDeptVo>> list(CustomerDeptBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止越权访问
         bo.setCustomerId(customerId);
 
@@ -78,7 +78,7 @@ public class PcDeptController extends BaseController {
 
         // 验证部门是否属于当前用户的企业
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该部门");
             }
@@ -95,7 +95,7 @@ public class PcDeptController extends BaseController {
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody CustomerDeptBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止为其他企业添加部门
         bo.setCustomerId(customerId);
 
@@ -110,7 +110,7 @@ public class PcDeptController extends BaseController {
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CustomerDeptBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证部门是否属于当前用户的企业
         CustomerDeptVo existingDept = customerDeptService.queryById(bo.getDeptId());
@@ -137,7 +137,7 @@ public class PcDeptController extends BaseController {
     public R<Void> remove(@NotEmpty(message = "主键不能为空")
                           @PathVariable("ids") Long[] ids) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证所有部门是否都属于当前用户的企业
         for (Long id : ids) {

+ 5 - 5
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcEnterpriseController.java

@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise")
+@RequestMapping("/enterprise")
 public class PcEnterpriseController extends BaseController {
 
     private final ICustomerInfoService customerInfoService;
@@ -35,7 +35,7 @@ public class PcEnterpriseController extends BaseController {
     @GetMapping("/info")
     public R<CustomerInfoVo> getInfo() {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         if (customerId == null) {
             return R.fail("用户未登录或企业信息不存在");
         }
@@ -54,10 +54,10 @@ public class PcEnterpriseController extends BaseController {
      * PC端用户只能修改自己所属企业的信息
      */
     @Log(title = "PC端-企业信息", businessType = BusinessType.UPDATE)
-    @PutMapping("/info")
+    @PutMapping("/updateEnterprise")
     public R<Void> updateInfo(@Validated @RequestBody CustomerInfoBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         if (customerId == null) {
             return R.fail("用户未登录或企业信息不存在");
         }
@@ -66,7 +66,7 @@ public class PcEnterpriseController extends BaseController {
         bo.setId(customerId);
 
         // 调用Service更新企业信息
-        boolean result = customerInfoService.updateByBo(bo);
+        boolean result = customerInfoService.pcUpdateCustomerInfo(bo);
         return toAjax(result);
     }
 }

+ 28 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcEnterpriseScaleController.java

@@ -0,0 +1,28 @@
+package org.dromara.customer.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.customer.domain.bo.EnterpriseScaleBo;
+import org.dromara.customer.domain.vo.EnterpriseScaleVo;
+import org.dromara.customer.service.IEnterpriseScaleService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcEnterpriseScale")
+public class PcEnterpriseScaleController extends BaseController {
+
+    private final IEnterpriseScaleService enterpriseScaleService;
+
+
+    @GetMapping("/list")
+    public TableDataInfo<EnterpriseScaleVo> list(PageQuery pageQuery) {
+        return enterpriseScaleService.queryPageList(new EnterpriseScaleBo(), pageQuery);
+    }
+}

+ 27 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcIndustryCategoryController.java

@@ -0,0 +1,27 @@
+package org.dromara.customer.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.customer.domain.bo.IndustryCategoryBo;
+import org.dromara.customer.domain.vo.IndustryCategoryVo;
+import org.dromara.customer.service.IIndustryCategoryService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcIndustryCategory")
+public class PcIndustryCategoryController extends BaseController {
+
+    private final IIndustryCategoryService industryCategoryService;
+
+    @GetMapping("/list")
+    public TableDataInfo<IndustryCategoryVo> list(PageQuery pageQuery) {
+        return industryCategoryService.queryPageList(new IndustryCategoryBo(), pageQuery);
+    }
+}

+ 6 - 6
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcInvoiceController.java

@@ -30,7 +30,7 @@ import org.dromara.common.idempotent.annotation.RepeatSubmit;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/invoice")
+@RequestMapping("/pcInvoice")
 public class PcInvoiceController extends BaseController {
 
     private final ICustomerInvoiceInfoService customerInvoiceInfoService;
@@ -42,7 +42,7 @@ public class PcInvoiceController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<CustomerInvoiceInfoVo> list(CustomerInvoiceInfoBo bo, PageQuery pageQuery) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止越权访问
         bo.setCustomerId(customerId);
 
@@ -63,7 +63,7 @@ public class PcInvoiceController extends BaseController {
 
         // 验证发票是否属于当前用户的企业
         if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
             if (!customerId.equals(vo.getCustomerId())) {
                 return R.fail("无权访问该发票信息");
             }
@@ -80,7 +80,7 @@ public class PcInvoiceController extends BaseController {
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody CustomerInvoiceInfoBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
         // 强制设置企业ID,防止为其他企业添加发票
         bo.setCustomerId(customerId);
 
@@ -95,7 +95,7 @@ public class PcInvoiceController extends BaseController {
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody CustomerInvoiceInfoBo bo) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证发票是否属于当前用户的企业
         CustomerInvoiceInfoVo existingInvoice = customerInvoiceInfoService.queryById(bo.getId());
@@ -122,7 +122,7 @@ public class PcInvoiceController extends BaseController {
     public R<Void> remove(@NotEmpty(message = "主键不能为空")
                           @PathVariable("ids") Long[] ids) {
         // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
 
         // 验证所有发票是否都属于当前用户的企业
         for (Long id : ids) {

+ 62 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/PcPurchaseHabitController.java

@@ -0,0 +1,62 @@
+package org.dromara.customer.controller.pc;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import jakarta.validation.constraints.NotEmpty;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.customer.domain.bo.PurchaseHabitBo;
+import org.dromara.customer.domain.vo.PurchaseHabitVo;
+import org.dromara.customer.service.IPurchaseHabitService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcPurchaseHabit")
+public class PcPurchaseHabitController extends BaseController {
+    private final IPurchaseHabitService purchaseHabitService;
+
+    /**
+     * 新增客户采购习惯
+     */
+    @Log(title = "PC-客户采购习惯", businessType = BusinessType.INSERT)
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody PurchaseHabitBo bo) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置企业ID,防止为其他企业添加地址
+        bo.setCustomerId(customerId);
+        return toAjax(purchaseHabitService.insertByBo(bo));
+    }
+
+    /**
+     * 修改客户采购习惯
+     */
+    @Log(title = "PC-客户采购习惯", businessType = BusinessType.UPDATE)
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody PurchaseHabitBo bo) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置企业ID,防止为其他企业添加地址
+        bo.setCustomerId(customerId);
+        return toAjax(purchaseHabitService.updateByBo(bo));
+    }
+
+
+    @GetMapping("/getCustomerPurchaseHabitData")
+    public R<PurchaseHabitVo> getCustomerPurchaseHabitData() {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        return R.ok(purchaseHabitService.getCustomerPurchaseHabitData(customerId));
+    }
+}

+ 121 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/ComplaintsSuggestions.java

@@ -0,0 +1,121 @@
+package org.dromara.customer.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serial;
+
+/**
+ * 投诉与建议记录对象 complaints_suggestions
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("complaints_suggestions")
+public class ComplaintsSuggestions extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 投诉/建议编号
+     */
+    private String complainNo;
+
+    /**
+     * 企业id
+     */
+    private Long customerId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 用户编号
+     */
+    private String userNo;
+
+    /**
+     * 称呼
+     */
+    private String userName;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 反馈类型
+     */
+    private String feedbackType;
+
+    /**
+     * 反馈内容
+     */
+    private String feedbackContent;
+
+    /**
+     * 相关图片路径
+     */
+    private String relatedPictures;
+
+    /**
+     * 处理时间
+     */
+    private Date processTime;
+
+    /**
+     * 处理人员姓名
+     */
+    private String processStaff;
+
+    /**
+     * 处理结果
+     */
+    private String processResult;
+
+    /**
+     * 处理过程反馈
+     */
+    private String processFeedback;
+
+    /**
+     * 处理评价
+     */
+    private Integer processEvaluation;
+
+    /**
+     * 最终结果反馈
+     */
+    private String resultFeedback;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 8 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/CustomerInfo.java

@@ -101,6 +101,14 @@ public class CustomerInfo extends TenantEntity {
      */
     private String url;
 
+    /*营业执照*/
+    private String businessLicense;
+
+    /**
+     * 法人证件
+     */
+    private String legalPersonCardUrl;
+
     /**
      * 邮政编码
      */

+ 6 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/PurchaseHabit.java

@@ -4,6 +4,7 @@ import org.dromara.common.tenant.core.TenantEntity;
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+
 import java.math.BigDecimal;
 
 import java.io.Serial;
@@ -28,6 +29,11 @@ public class PurchaseHabit extends TenantEntity {
     @TableId(value = "id")
     private Long id;
 
+    /**
+     * 客户编号
+     */
+    private Long customerId;
+
     /**
      * 客户编号
      */

+ 113 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/ComplaintsSuggestionsBo.java

@@ -0,0 +1,113 @@
+package org.dromara.customer.domain.bo;
+
+import org.dromara.customer.domain.ComplaintsSuggestions;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+ * 投诉与建议记录业务对象 complaints_suggestions
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ComplaintsSuggestions.class, reverseConvertGenerate = false)
+public class ComplaintsSuggestionsBo extends BaseEntity {
+
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 投诉/建议编号
+     */
+    private String complainNo;
+
+    /**
+     * 企业id
+     */
+    private Long customerId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 用户编号
+     */
+    private String userNo;
+
+    /**
+     * 称呼
+     */
+    private String userName;
+
+    /**
+     * 联系电话
+     */
+    private String phone;
+
+    /**
+     * 反馈类型
+     */
+    private String feedbackType;
+
+    /**
+     * 反馈内容
+     */
+    private String feedbackContent;
+
+    /**
+     * 相关图片路径
+     */
+    private String relatedPictures;
+
+    /**
+     * 处理时间
+     */
+    private Date processTime;
+
+    /**
+     * 处理人员姓名
+     */
+    private String processStaff;
+
+    /**
+     * 处理结果
+     */
+    private String processResult;
+
+    /**
+     * 处理过程反馈
+     */
+    private String processFeedback;
+
+    /**
+     * 处理评价
+     */
+    private Integer processEvaluation;
+
+    /**
+     * 最终结果反馈
+     */
+    private String resultFeedback;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 2 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/CustomerContactBo.java

@@ -38,6 +38,8 @@ public class CustomerContactBo extends BaseEntity {
 //    @NotBlank(message = "联系人姓名不能为空", groups = {AddGroup.class, EditGroup.class})
     private String contactName;
 
+    private String wechat;
+
     /**
      * 手机号码
      */

+ 8 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/CustomerInfoBo.java

@@ -109,6 +109,14 @@ public class CustomerInfoBo extends BaseEntity {
      */
     private String url;
 
+    /*营业执照*/
+    private String businessLicense;
+
+    /**
+     * 法人证件
+     */
+    private String legalPersonCardUrl;
+
     /**
      * 邮政编码
      */

+ 5 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/bo/PurchaseHabitBo.java

@@ -27,6 +27,11 @@ public class PurchaseHabitBo extends BaseEntity {
      */
     private Long id;
 
+    /**
+     * 客户编号
+     */
+    private Long customerId;
+
     /**
      * 客户编号
      */

+ 143 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/ComplaintsSuggestionsVo.java

@@ -0,0 +1,143 @@
+package org.dromara.customer.domain.vo;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.dromara.customer.domain.ComplaintsSuggestions;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 投诉与建议记录视图对象 complaints_suggestions
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = ComplaintsSuggestions.class)
+public class ComplaintsSuggestionsVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /**
+     * 投诉/建议编号
+     */
+    @ExcelProperty(value = "投诉/建议编号")
+    private String complainNo;
+
+
+    /**
+     * 企业id
+     */
+    private Long customerId;
+
+    /**
+     * 用户id
+     */
+    @ExcelProperty(value = "用户id")
+    private Long userId;
+
+    /**
+     * 用户编号
+     */
+    @ExcelProperty(value = "用户编号")
+    private String userNo;
+
+    /**
+     * 称呼
+     */
+    @ExcelProperty(value = "称呼")
+    private String userName;
+
+    /**
+     * 联系电话
+     */
+    @ExcelProperty(value = "联系电话")
+    private String phone;
+
+    /**
+     * 反馈类型
+     */
+    @ExcelProperty(value = "反馈类型", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "complaints_suggestion_type")
+    private String feedbackType;
+
+    /**
+     * 反馈内容
+     */
+    @ExcelProperty(value = "反馈内容")
+    private String feedbackContent;
+
+    /**
+     * 相关图片路径
+     */
+    @ExcelProperty(value = "相关图片路径")
+    private String relatedPictures;
+
+    /**
+     * 处理时间
+     */
+    @ExcelProperty(value = "处理时间")
+    private Date processTime;
+
+    /**
+     * 处理人员姓名
+     */
+    @ExcelProperty(value = "处理人员姓名")
+    private String processStaff;
+
+    /**
+     * 处理结果
+     */
+    @ExcelProperty(value = "处理结果")
+    private String processResult;
+
+    /**
+     * 处理过程反馈
+     */
+    @ExcelProperty(value = "处理过程反馈")
+    private String processFeedback;
+
+    /**
+     * 处理评价
+     */
+    @ExcelProperty(value = "处理评价")
+    private Integer processEvaluation;
+
+    /**
+     * 最终结果反馈
+     */
+    @ExcelProperty(value = "最终结果反馈")
+    private String resultFeedback;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+    private Long createBy;
+
+    private Date createTime;
+
+    private String createName;
+
+
+}

+ 2 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/CustomerContactVo.java

@@ -46,6 +46,8 @@ public class CustomerContactVo implements Serializable {
     @ExcelProperty(value = "联系人姓名")
     private String contactName;
 
+    private String wechat;
+
     /*自定义登录名*/
     private String customLoginName;
 

+ 8 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/CustomerInfoVo.java

@@ -126,6 +126,14 @@ public class CustomerInfoVo implements Serializable {
     @ExcelProperty(value = "网址")
     private String url;
 
+    /*营业执照*/
+    private String businessLicense;
+
+    /**
+     * 法人证件
+     */
+    private String legalPersonCardUrl;
+
     /**
      * 邮政编码
      */

+ 6 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/domain/vo/PurchaseHabitVo.java

@@ -1,6 +1,7 @@
 package org.dromara.customer.domain.vo;
 
 import java.math.BigDecimal;
+
 import org.dromara.customer.domain.PurchaseHabit;
 import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
 import cn.idev.excel.annotation.ExcelProperty;
@@ -14,7 +15,6 @@ import java.io.Serializable;
 import java.util.Date;
 
 
-
 /**
  * 客户采购习惯视图对象 purchase_habit
  *
@@ -35,6 +35,11 @@ public class PurchaseHabitVo implements Serializable {
     @ExcelProperty(value = "ID")
     private Long id;
 
+    /**
+     * 客户编号
+     */
+    private Long customerId;
+
     /**
      * 客户编号
      */

+ 50 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerSalesServiceImpl.java

@@ -0,0 +1,50 @@
+package org.dromara.customer.dubbo;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.customer.api.RemoteCustomerSalesService;
+import org.dromara.customer.api.domain.vo.RemoteCustomerSalesVo;
+import org.dromara.customer.domain.CustomerSalesInfo;
+import org.dromara.customer.domain.IndustryCategory;
+import org.dromara.customer.domain.vo.CustomerSalesInfoVo;
+import org.dromara.customer.service.ICustomerSalesInfoService;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Service;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+@DubboService
+public class RemoteCustomerSalesServiceImpl implements RemoteCustomerSalesService {
+
+    private final ICustomerSalesInfoService customerSalesInfoService;
+
+    @Override
+    public RemoteCustomerSalesVo selectCustomerSalesInfoByCustomerId(Long customerId) {
+        CustomerSalesInfoVo salesInfoVo = customerSalesInfoService.queryByCustomerId(customerId);
+        return BeanUtil.toBean(salesInfoVo, RemoteCustomerSalesVo.class);
+    }
+
+    /*更新客户销售信息*/
+    @Override
+    public Boolean updateCustomerSalesInfo(RemoteCustomerSalesVo vo) {
+        CustomerSalesInfo salesInfo = customerSalesInfoService.getOne(Wrappers.lambdaQuery(CustomerSalesInfo.class)
+            .eq(CustomerSalesInfo::getCustomerId, vo.getCustomerId())
+        );
+
+        if (salesInfo == null) {
+            salesInfo = new CustomerSalesInfo();
+        }
+        salesInfo.setId(vo.getId());
+        salesInfo.setRemainingQuota(vo.getRemainingQuota());
+        salesInfo.setTemporaryQuota(vo.getTemporaryQuota());
+
+        return customerSalesInfoService.saveOrUpdate(salesInfo);
+
+    }
+}

+ 1 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java

@@ -47,6 +47,7 @@ public class RemoteCustomerServiceImpl implements RemoteCustomerService {
             c -> {
                 CustomerApiVo vo = new CustomerApiVo();
                 vo.setId(c.getId());
+                vo.setCompanyId(c.getBelongCompanyId());
                 vo.setCustomerNo(c.getCustomerNo());
                 vo.setCustomerName(c.getCustomerName() != null ? c.getCustomerName() : c.getBusinessCustomerName());
                 return vo;

+ 15 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/mapper/ComplaintsSuggestionsMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.customer.mapper;
+
+import org.dromara.customer.domain.ComplaintsSuggestions;
+import org.dromara.customer.domain.vo.ComplaintsSuggestionsVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 投诉与建议记录Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+public interface ComplaintsSuggestionsMapper extends BaseMapperPlus<ComplaintsSuggestions, ComplaintsSuggestionsVo> {
+
+}

+ 70 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/IComplaintsSuggestionsService.java

@@ -0,0 +1,70 @@
+package org.dromara.customer.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.customer.domain.ComplaintsSuggestions;
+import org.dromara.customer.domain.vo.ComplaintsSuggestionsVo;
+import org.dromara.customer.domain.bo.ComplaintsSuggestionsBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 投诉与建议记录Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+public interface IComplaintsSuggestionsService extends IService<ComplaintsSuggestions>{
+
+    /**
+     * 查询投诉与建议记录
+     *
+     * @param id 主键
+     * @return 投诉与建议记录
+     */
+    ComplaintsSuggestionsVo queryById(Long id);
+
+    /**
+     * 分页查询投诉与建议记录列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 投诉与建议记录分页列表
+     */
+    TableDataInfo<ComplaintsSuggestionsVo> queryPageList(ComplaintsSuggestionsBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的投诉与建议记录列表
+     *
+     * @param bo 查询条件
+     * @return 投诉与建议记录列表
+     */
+    List<ComplaintsSuggestionsVo> queryList(ComplaintsSuggestionsBo bo);
+
+    /**
+     * 新增投诉与建议记录
+     *
+     * @param bo 投诉与建议记录
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(ComplaintsSuggestionsBo bo);
+
+    /**
+     * 修改投诉与建议记录
+     *
+     * @param bo 投诉与建议记录
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(ComplaintsSuggestionsBo bo);
+
+    /**
+     * 校验并批量删除投诉与建议记录信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 11 - 3
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ICustomerInfoService.java

@@ -93,13 +93,21 @@ public interface ICustomerInfoService extends IService<CustomerInfo> {
      */
     Boolean updateByBo(CustomerInfoBo bo);
 
+    /**
+     * 修改客户信息
+     *
+     * @param bo 客户信息
+     * @return 是否修改成功
+     */
+    Boolean pcUpdateCustomerInfo(CustomerInfoBo bo);
+
     /**
      * 修改状态
      */
     int updateCustomerCheckStatus(Long customerId, String status);
 
     /*修改临时额度*/
-    int updateCreditAmount(List<Long> customerIds, BigDecimal creditAmount);
+    int updateCreditAmount(List<Long> customerIds, BigDecimal temporaryQuota);
 
     /*设置客户标签*/
     int setCustomerInfoTag(List<Long> customerIds, List<Long> tagIds);
@@ -124,7 +132,7 @@ public interface ICustomerInfoService extends IService<CustomerInfo> {
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
     /**
-    * 客户注册
-    * */
+     * 客户注册
+     */
     Boolean register(CustomerRegisterBo bo);
 }

+ 1 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/IPurchaseHabitService.java

@@ -59,7 +59,7 @@ public interface IPurchaseHabitService extends IService<PurchaseHabit> {
      */
     Boolean updateByBo(PurchaseHabitBo bo);
 
-    PurchaseHabitVo getCustomerPurchaseHabitData(String customerNo);
+    PurchaseHabitVo getCustomerPurchaseHabitData(Long customerId);
 
     /**
      * 校验并批量删除客户采购习惯信息

+ 169 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/ComplaintsSuggestionsServiceImpl.java

@@ -0,0 +1,169 @@
+package org.dromara.customer.service.impl;
+
+import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.redis.utils.SequenceUtils;
+import org.dromara.customer.domain.CustomerContact;
+import org.dromara.customer.mapper.CustomerContactMapper;
+import org.springframework.stereotype.Service;
+import org.dromara.customer.domain.bo.ComplaintsSuggestionsBo;
+import org.dromara.customer.domain.vo.ComplaintsSuggestionsVo;
+import org.dromara.customer.domain.ComplaintsSuggestions;
+import org.dromara.customer.mapper.ComplaintsSuggestionsMapper;
+import org.dromara.customer.service.IComplaintsSuggestionsService;
+
+import java.time.Duration;
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 投诉与建议记录Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-04
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class ComplaintsSuggestionsServiceImpl extends ServiceImpl<ComplaintsSuggestionsMapper, ComplaintsSuggestions> implements IComplaintsSuggestionsService {
+
+    private static final String COMPLAIN_CODE_KEY = "complaints_suggestions:complain_no";
+
+    private final ComplaintsSuggestionsMapper baseMapper;
+
+    private final CustomerContactMapper customerContactMapper;
+
+    /**
+     * 查询投诉与建议记录
+     *
+     * @param id 主键
+     * @return 投诉与建议记录
+     */
+    @Override
+    public ComplaintsSuggestionsVo queryById(Long id) {
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询投诉与建议记录列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 投诉与建议记录分页列表
+     */
+    @Override
+    public TableDataInfo<ComplaintsSuggestionsVo> queryPageList(ComplaintsSuggestionsBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<ComplaintsSuggestions> lqw = buildQueryWrapper(bo);
+        Page<ComplaintsSuggestionsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        List<ComplaintsSuggestionsVo> records = result.getRecords();
+        if (CollUtil.isNotEmpty(records)) {
+            Set<Long> createByIds = records.stream().map(ComplaintsSuggestionsVo::getCreateBy).collect(Collectors.toSet());
+            List<CustomerContact> customerContacts = customerContactMapper.selectByIds(createByIds);
+            Map<Long, String> createByMap = customerContacts.stream().collect(Collectors.toMap(CustomerContact::getId, CustomerContact::getContactName));
+            records.forEach(r -> {
+                r.setCreateName(createByMap.get(r.getCreateBy()));
+            });
+        }
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的投诉与建议记录列表
+     *
+     * @param bo 查询条件
+     * @return 投诉与建议记录列表
+     */
+    @Override
+    public List<ComplaintsSuggestionsVo> queryList(ComplaintsSuggestionsBo bo) {
+        LambdaQueryWrapper<ComplaintsSuggestions> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<ComplaintsSuggestions> buildQueryWrapper(ComplaintsSuggestionsBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<ComplaintsSuggestions> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(ComplaintsSuggestions::getId);
+        lqw.eq(StringUtils.isNotBlank(bo.getComplainNo()), ComplaintsSuggestions::getComplainNo, bo.getComplainNo());
+        lqw.eq(bo.getUserId() != null, ComplaintsSuggestions::getUserId, bo.getUserId());
+        lqw.eq(bo.getCustomerId() != null, ComplaintsSuggestions::getCustomerId, bo.getCustomerId());
+        lqw.eq(StringUtils.isNotBlank(bo.getUserNo()), ComplaintsSuggestions::getUserNo, bo.getUserNo());
+        lqw.like(StringUtils.isNotBlank(bo.getUserName()), ComplaintsSuggestions::getUserName, bo.getUserName());
+        lqw.eq(StringUtils.isNotBlank(bo.getPhone()), ComplaintsSuggestions::getPhone, bo.getPhone());
+        lqw.eq(StringUtils.isNotBlank(bo.getFeedbackType()), ComplaintsSuggestions::getFeedbackType, bo.getFeedbackType());
+        lqw.eq(StringUtils.isNotBlank(bo.getFeedbackContent()), ComplaintsSuggestions::getFeedbackContent, bo.getFeedbackContent());
+        lqw.eq(StringUtils.isNotBlank(bo.getRelatedPictures()), ComplaintsSuggestions::getRelatedPictures, bo.getRelatedPictures());
+        lqw.eq(bo.getProcessTime() != null, ComplaintsSuggestions::getProcessTime, bo.getProcessTime());
+        lqw.eq(StringUtils.isNotBlank(bo.getProcessStaff()), ComplaintsSuggestions::getProcessStaff, bo.getProcessStaff());
+        lqw.eq(StringUtils.isNotBlank(bo.getProcessResult()), ComplaintsSuggestions::getProcessResult, bo.getProcessResult());
+        lqw.eq(StringUtils.isNotBlank(bo.getProcessFeedback()), ComplaintsSuggestions::getProcessFeedback, bo.getProcessFeedback());
+        lqw.eq(bo.getProcessEvaluation() != null, ComplaintsSuggestions::getProcessEvaluation, bo.getProcessEvaluation());
+        lqw.eq(StringUtils.isNotBlank(bo.getResultFeedback()), ComplaintsSuggestions::getResultFeedback, bo.getResultFeedback());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), ComplaintsSuggestions::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增投诉与建议记录
+     *
+     * @param bo 投诉与建议记录
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(ComplaintsSuggestionsBo bo) {
+        bo.setComplainNo(SequenceUtils.nextPaddedIdStr(COMPLAIN_CODE_KEY, Duration.ofDays(3650), 4));
+        ComplaintsSuggestions add = MapstructUtils.convert(bo, ComplaintsSuggestions.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改投诉与建议记录
+     *
+     * @param bo 投诉与建议记录
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(ComplaintsSuggestionsBo bo) {
+        ComplaintsSuggestions update = MapstructUtils.convert(bo, ComplaintsSuggestions.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(ComplaintsSuggestions entity) {
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除投诉与建议记录信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if (isValid) {
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 5 - 4
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerContactServiceImpl.java

@@ -30,7 +30,7 @@ import java.util.Collection;
 @Slf4j
 @RequiredArgsConstructor
 @Service
-public class CustomerContactServiceImpl  extends ServiceImpl<CustomerContactMapper, CustomerContact> implements ICustomerContactService {
+public class CustomerContactServiceImpl extends ServiceImpl<CustomerContactMapper, CustomerContact> implements ICustomerContactService {
 
     private final CustomerContactMapper baseMapper;
 
@@ -41,7 +41,7 @@ public class CustomerContactServiceImpl  extends ServiceImpl<CustomerContactMapp
      * @return 客户联系人信息
      */
     @Override
-    public CustomerContactVo queryById(Long id){
+    public CustomerContactVo queryById(Long id) {
         return baseMapper.selectVoById(id);
     }
 
@@ -56,6 +56,7 @@ public class CustomerContactServiceImpl  extends ServiceImpl<CustomerContactMapp
     public TableDataInfo<CustomerContactVo> queryPageList(CustomerContactBo bo, PageQuery pageQuery) {
         LambdaQueryWrapper<CustomerContact> lqw = buildQueryWrapper(bo);
         Page<CustomerContactVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+
         return TableDataInfo.build(result);
     }
 
@@ -126,7 +127,7 @@ public class CustomerContactServiceImpl  extends ServiceImpl<CustomerContactMapp
     /**
      * 保存前的数据校验
      */
-    private void validEntityBeforeSave(CustomerContact entity){
+    private void validEntityBeforeSave(CustomerContact entity) {
         //TODO 做一些数据校验,如唯一约束
     }
 
@@ -139,7 +140,7 @@ public class CustomerContactServiceImpl  extends ServiceImpl<CustomerContactMapp
      */
     @Override
     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
+        if (isValid) {
             //TODO 做一些业务上的校验,判断是否需要校验
         }
         return baseMapper.deleteByIds(ids) > 0;

+ 33 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerInfoServiceImpl.java

@@ -679,6 +679,37 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
         return true;
     }
 
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean pcUpdateCustomerInfo(CustomerInfoBo bo) {
+        if (bo == null || bo.getId() == null || bo.getId() <= 0) {
+            return false;
+        }
+        CustomerInfo customerInfo = baseMapper.selectById(bo.getId());
+        if (customerInfo == null) {
+            return false;
+        }
+        customerInfo.setProvincialCityCounty(bo.getProvincialCityCounty());
+        customerInfo.setRegProvincialNo(bo.getRegProvincialNo());
+        customerInfo.setRegCityNo(bo.getRegCityNo());
+        customerInfo.setRegCountyNo(bo.getRegCountyNo());
+        customerInfo.setAddress(bo.getAddress());
+        customerInfo.setIndustryCategoryId(bo.getIndustryCategoryId());
+        customerInfo.setEnterpriseScaleId(bo.getEnterpriseScaleId());
+        customerInfo.setLandline(bo.getLandline());
+        customerInfo.setFax(bo.getFax());
+        customerInfo.setUrl(bo.getUrl());
+        customerInfo.setBusinessLicense(bo.getBusinessLicense());
+        customerInfo.setLegalPersonCardUrl(bo.getLegalPersonCardUrl());
+
+        validEntityBeforeSave(customerInfo);
+        boolean mainUpdated = baseMapper.updateById(customerInfo) > 0;
+        if (!mainUpdated) {
+            return false;
+        }
+
+        return true;
+    }
+
     /**
      * 保存客户的关联信息
      */
@@ -725,14 +756,14 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
     }
 
     @Override
-    public int updateCreditAmount(List<Long> customerIds, BigDecimal creditAmount) {
+    public int updateCreditAmount(List<Long> customerIds, BigDecimal temporaryQuota) {
         if (customerIds == null || customerIds.isEmpty()) {
             return 0; // 避免无效更新
         }
         return customerSalesInfoMapper.update(
             null,
             new LambdaUpdateWrapper<CustomerSalesInfo>()
-                .set(CustomerSalesInfo::getCreditAmount, creditAmount)
+                .set(CustomerSalesInfo::getTemporaryQuota, temporaryQuota)
                 .in(CustomerSalesInfo::getCustomerId, customerIds)
         );
     }

+ 2 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/PurchaseHabitServiceImpl.java

@@ -123,9 +123,9 @@ public class PurchaseHabitServiceImpl extends ServiceImpl<PurchaseHabitMapper, P
         return baseMapper.updateById(update) > 0;
     }
 
-    public PurchaseHabitVo getCustomerPurchaseHabitData(String customerNo) {
+    public PurchaseHabitVo getCustomerPurchaseHabitData(Long customerId) {
         return baseMapper.selectVoOne(Wrappers.lambdaQuery(PurchaseHabit.class)
-            .eq(PurchaseHabit::getCustomerNo, customerNo)
+            .eq(PurchaseHabit::getCustomerId, customerId)
             .orderByDesc(PurchaseHabit::getCreateTime)
             .last("LIMIT 1"));
     }

+ 7 - 0
ruoyi-modules/ruoyi-customer/src/main/resources/mapper/customer/ComplaintsSuggestionsMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.customer.mapper.ComplaintsSuggestionsMapper">
+
+</mapper>

+ 4 - 0
ruoyi-modules/ruoyi-order/pom.xml

@@ -122,6 +122,10 @@
             <artifactId>sdk</artifactId>
             <version>1.0.11</version>
         </dependency>
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-api-product</artifactId>
+        </dependency>
 
     </dependencies>
 

+ 106 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderEvaluationController.java

@@ -0,0 +1,106 @@
+package org.dromara.order.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.order.domain.vo.OrderEvaluationVo;
+import org.dromara.order.domain.bo.OrderEvaluationBo;
+import org.dromara.order.service.IOrderEvaluationService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 订单评价
+ * 前端访问路由地址为:/order/orderEvaluation
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/orderEvaluation")
+public class OrderEvaluationController extends BaseController {
+
+    private final IOrderEvaluationService orderEvaluationService;
+
+    /**
+     * 查询订单评价列表
+     */
+    //@SaCheckPermission("order:orderEvaluation:list")
+    @GetMapping("/list")
+    public TableDataInfo<OrderEvaluationVo> list(OrderEvaluationBo bo, PageQuery pageQuery) {
+        return orderEvaluationService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出订单评价列表
+     */
+    //@SaCheckPermission("order:orderEvaluation:export")
+    @Log(title = "订单评价", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(OrderEvaluationBo bo, HttpServletResponse response) {
+        List<OrderEvaluationVo> list = orderEvaluationService.queryList(bo);
+        ExcelUtil.exportExcel(list, "订单评价", OrderEvaluationVo.class, response);
+    }
+
+    /**
+     * 获取订单评价详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("order:orderEvaluation:query")
+    @GetMapping("/{id}")
+    public R<OrderEvaluationVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(orderEvaluationService.queryById(id));
+    }
+
+    /**
+     * 新增订单评价
+     */
+    //@SaCheckPermission("order:orderEvaluation:add")
+    @Log(title = "订单评价", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody OrderEvaluationBo bo) {
+        return toAjax(orderEvaluationService.insertByBo(bo));
+    }
+
+    /**
+     * 修改订单评价
+     */
+    //@SaCheckPermission("order:orderEvaluation:edit")
+    @Log(title = "订单评价", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody OrderEvaluationBo bo) {
+        return toAjax(orderEvaluationService.updateByBo(bo));
+    }
+
+    /**
+     * 删除订单评价
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("order:orderEvaluation:remove")
+    @Log(title = "订单评价", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(orderEvaluationService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 32 - 1
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/OrderMainController.java

@@ -1,5 +1,6 @@
 package org.dromara.order.controller;
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.constraints.NotEmpty;
@@ -18,6 +19,7 @@ import org.dromara.common.tenant.helper.PlatformHelper;
 import org.dromara.common.web.core.BaseController;
 import org.dromara.order.domain.OrderProduct;
 import org.dromara.order.domain.bo.OrderMainBo;
+import org.dromara.order.domain.bo.OrderProductBo;
 import org.dromara.order.domain.vo.OrderMainVo;
 import org.dromara.order.domain.vo.OrderProductVo;
 import org.dromara.order.domain.vo.OrderStatusStats;
@@ -116,7 +118,36 @@ public class OrderMainController extends BaseController {
     @Log(title = "订单主信息", businessType = BusinessType.INSERT)
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody OrderMainBo bo) {
-        return toAjax(orderMainService.insertByBo(bo));
+        orderMainService.insertByBo(bo); // 成功则继续,失败则抛异常
+        return R.ok();
+    }
+
+    /**
+     * 订单确认(仅允许修改商品数量,确认后状态变为“待发货”)
+     */
+    @Log(title = "订单主信息", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping("/orderAffirm")
+    public R<Void> orderAffirm(@Validated @RequestBody OrderMainBo bo) {
+        if (bo.getId() == null) {
+            return R.fail("订单ID不能为空");
+        }
+        if (CollUtil.isEmpty(bo.getOrderProductBos())) {
+            return R.fail("商品列表不能为空");
+        }
+
+        // 确保前端只传了必要字段:每个 OrderProductBo 应包含 id 和 orderQuantity
+        for (OrderProductBo productBo : bo.getOrderProductBos()) {
+            if (productBo.getId() == null) {
+                return R.fail("商品项缺少ID,无法匹配原订单商品");
+            }
+            if (productBo.getOrderQuantity() == null || productBo.getOrderQuantity() <= 0) {
+                return R.fail("商品数量必须大于0");
+            }
+        }
+
+        orderMainService.confirmOrder(bo.getId(), bo.getOrderProductBos());
+        return R.ok();
     }
 
     /**

+ 342 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderController.java

@@ -0,0 +1,342 @@
+package org.dromara.order.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.enums.OrderSourceEnum;
+import org.dromara.common.core.enums.OrderStatus;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.customer.api.RemoteCustomerService;
+import org.dromara.customer.api.domain.CustomerApiVo;
+import org.dromara.order.domain.bo.OrderMainBo;
+import org.dromara.order.domain.bo.OrderProductBo;
+import org.dromara.order.domain.bo.PcSubmitOrderBo;
+import org.dromara.order.domain.dto.OrderPayDto;
+import org.dromara.order.domain.vo.OrderMainVo;
+import org.dromara.order.domain.vo.OrderProductVo;
+import org.dromara.order.domain.vo.OrderStatusStats;
+import org.dromara.order.service.IOrderMainService;
+import org.dromara.product.api.RemoteProductService;
+import org.dromara.product.api.RemoteProductShoppingCartService;
+import org.dromara.product.api.domain.ProductVo;
+import org.dromara.product.api.domain.RemoteProductShoppingCartVo;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import jakarta.validation.constraints.NotNull;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.stream.Collectors;
+
+import static org.dromara.common.mybatis.core.mapper.BaseMapperPlus.log;
+
+/**
+ * PC端 - 订单管理
+ * 前端访问路由地址为:/pc/enterprise/order
+ *
+ * @author Claude
+ * @date 2026-01-28
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcOrder")
+public class PcOrderController extends BaseController {
+
+    @DubboReference
+    private RemoteCustomerService remoteCustomerService;
+
+    @DubboReference
+    private RemoteProductService remoteProductService;
+
+    @DubboReference
+    private RemoteProductShoppingCartService remoteProductShoppingCartService;
+
+    private final IOrderMainService orderMainService;
+
+    /**
+     * 查询当前企业的订单列表
+     * PC端用户只能查询自己企业的订单
+     */
+    @GetMapping("/list")
+    public TableDataInfo<OrderMainVo> list(OrderMainBo bo, PageQuery pageQuery) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置企业ID,防止越权访问
+        bo.setCustomerId(customerId);
+
+        return orderMainService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 查询当前企业的订单状态统计
+     * 返回各状态订单数量
+     */
+    @GetMapping("/statusStats")
+    public R<OrderStatusStats> getStatusStats() {
+        return R.ok(orderMainService.queryOrderStatusStats());
+    }
+
+    /**
+     * 获取订单详细信息
+     * PC端用户只能查询自己企业的订单
+     *
+     * @param id 订单主键
+     */
+    @GetMapping("/{id}")
+    public R<OrderMainVo> getInfo(@NotNull(message = "主键不能为空")
+                                  @PathVariable("id") Long id) {
+        // 查询订单信息
+        OrderMainVo vo = orderMainService.queryById(id);
+
+        // 验证订单是否属于当前用户的企业
+        if (vo != null) {
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
+            if (!customerId.equals(vo.getCustomerId())) {
+                return R.fail("无权访问该订单");
+            }
+        }
+
+        return R.ok(vo);
+    }
+
+    /**
+     * 根据订单ID查询订单商品明细
+     * PC端用户只能查询自己企业的订单商品
+     *
+     * @param orderIds 订单ID列表
+     */
+    @GetMapping("/products")
+    public TableDataInfo<OrderProductVo> getOrderProducts(@RequestParam("orderIds") List<Long> orderIds) {
+        if (orderIds == null || orderIds.isEmpty()) {
+            throw new IllegalArgumentException("订单ID列表不能为空");
+        }
+        if (orderIds.size() > 1000) {
+            throw new IllegalArgumentException("订单ID数量不能超过1000个");
+        }
+
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+
+        // 验证所有订单是否都属于当前用户的企业
+        for (Long orderId : orderIds) {
+            OrderMainVo order = orderMainService.queryById(orderId);
+            if (order == null) {
+                throw new IllegalArgumentException("订单ID " + orderId + " 不存在");
+            }
+            if (!customerId.equals(order.getCustomerId())) {
+                throw new IllegalArgumentException("无权访问订单ID " + orderId);
+            }
+        }
+
+        Set<Long> uniqueOrderIds = new HashSet<>(orderIds);
+        return orderMainService.getCustomerOrderProductList(uniqueOrderIds);
+    }
+
+    /**
+     * 取消订单
+     * PC端用户只能取消自己企业的订单
+     *
+     * @param bo 订单业务对象
+     */
+    @Log(title = "PC端-订单管理", businessType = BusinessType.UPDATE)
+    @PutMapping("/cancel")
+    public R<Void> cancelOrder(@RequestBody OrderMainBo bo) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+
+        // 验证订单是否属于当前用户的企业
+        OrderMainVo existingOrder = orderMainService.queryById(bo.getId());
+        if (existingOrder == null) {
+            return R.fail("订单不存在");
+        }
+        if (!customerId.equals(existingOrder.getCustomerId())) {
+            return R.fail("无权取消该订单");
+        }
+
+        // 强制设置企业ID
+        bo.setCustomerId(customerId);
+        bo.setOrderStatuses(OrderStatus.CANCEL.getCode());
+
+        return toAjax(orderMainService.updateStatus(bo));
+    }
+
+    /**
+     * 审核订单
+     * PC端企业客户审核自己企业的订单
+     *
+     * @param bo 订单业务对象
+     */
+    @Log(title = "PC端-订单审核", businessType = BusinessType.UPDATE)
+    @PutMapping("/checkStatus")
+    public R<Void> checkStatus(@RequestBody OrderMainBo bo) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+
+        // 验证订单是否属于当前用户的企业
+        OrderMainVo existingOrder = orderMainService.queryById(bo.getId());
+        if (existingOrder == null) {
+            return R.fail("订单不存在");
+        }
+        if (!customerId.equals(existingOrder.getCustomerId())) {
+            return R.fail("无权审核该订单");
+        }
+
+        // 强制设置企业ID
+        bo.setCustomerId(customerId);
+
+        return toAjax(orderMainService.updateCheckStatus(bo));
+    }
+
+    /**
+     * 提交订单(PC端下单)
+     * 调用服务层 insertByBo 方法实现
+     */
+    @Log(title = "PC端-提交订单", businessType = BusinessType.INSERT)
+    @PostMapping("/submit")
+    public R<Long> submitOrder(@RequestBody @Validated PcSubmitOrderBo bo) {
+        try {
+            // 获取当前登录用户的企业ID
+            Long userId = LoginHelper.getUserId();
+
+            Long customerId = LoginHelper.getLoginUser().getCustomerId();
+            Map<Long, CustomerApiVo> longCustomerApiVoMap = remoteCustomerService.selectCustomerByIds(Set.of(customerId));
+            CustomerApiVo customerApiVo = longCustomerApiVoMap.get(customerId);
+
+            // 构造 OrderMainBo 对象
+            OrderMainBo mainBo = new OrderMainBo();
+            mainBo.setCustomerId(customerId);
+            mainBo.setUserId(userId);
+            mainBo.setShippingAddressId(bo.getShippingAddressId());
+            mainBo.setPurchaseReason(bo.getPurchaseReason());
+            mainBo.setRemark(bo.getRemark());
+            mainBo.setExpenseType(bo.getExpenseType());
+            mainBo.setShippingFee(bo.getShippingFee());
+
+            if (null != customerApiVo) {
+                mainBo.setCompanyId(customerApiVo.getCompanyId());
+                mainBo.setCustomerCode(customerApiVo.getCustomerNo());
+            }
+
+            // 解析配送时间
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+            LocalDate deliveryLocalDate = LocalDate.parse(bo.getDeliveryDate(), formatter);
+            Date expectedDeliveryTime = Date.from(deliveryLocalDate.atStartOfDay().toInstant(java.time.ZoneOffset.UTC));
+            mainBo.setExpectedDeliveryTime(expectedDeliveryTime);
+
+            // 设置仓库(假设默认仓库)
+            mainBo.setWarehouseId(1L); // TODO: 后续可配置或根据客户动态获取
+
+
+            // 设置订单状态为待审核
+            mainBo.setOrderStatus(OrderStatus.PENDING_PAYMENT.getCode());
+
+            // 设置检查状态为待审核
+            mainBo.setCheckStatus("0");
+
+            mainBo.setOrderSource(OrderSourceEnum.BEFORE_ADD.getCode());
+
+            // 设置订单商品列表
+            // mainBo.setOrderProductBos(bo.getOrderProductBos());
+            // 1. 获取购物车项
+            Set<Long> productShoppingCartIds = bo.getProductShoppingCartId();
+            if (productShoppingCartIds == null || productShoppingCartIds.isEmpty()) {
+                throw new IllegalArgumentException("购物车项ID不能为空");
+            }
+
+            List<RemoteProductShoppingCartVo> shoppingCartList = remoteProductShoppingCartService.getShoppingCartList(productShoppingCartIds);
+            if (shoppingCartList.isEmpty()) {
+                throw new IllegalStateException("购物车数据不存在");
+            }
+
+            // 2. 构建 productId -> productNum 映射(防御性:过滤 null key)
+            Map<Long, Long> productNumMap = shoppingCartList.stream()
+                .filter(item -> item.getProductId() != null && item.getProductNum() != null)
+                .collect(Collectors.toMap(
+                    RemoteProductShoppingCartVo::getProductId,
+                    RemoteProductShoppingCartVo::getProductNum,
+                    (existing, replacement) -> existing // 防止重复 key 冲突(理论上不应发生)
+                ));
+
+            // 3. 提取所有商品 ID(使用 List/Collection,而非拼接字符串!)
+            List<Long> productIds = new ArrayList<>(productNumMap.keySet());
+
+
+            // 如果远程服务只接受字符串
+            String productIdStr = productIds.stream().map(String::valueOf).collect(Collectors.joining(","));
+            List<ProductVo> productDetails = remoteProductService.getProductDetails(productIdStr);
+
+            // 4. 构建订单商品列表
+            List<OrderProductBo> orderProductBos = productDetails.stream()
+                .map(productVo -> {
+                    Long productId = productVo.getId();
+                    Long quantity = productNumMap.get(productId);
+                    if (quantity == null) {
+                        // 理论上不会发生,但防御性处理
+                        log.warn("商品 {} 在购物车中无数量信息,跳过");
+                        return null;
+                    }
+
+                    OrderProductBo orderProductBo = new OrderProductBo();
+                    orderProductBo.setProductId(productId);
+                    orderProductBo.setProductNo(productVo.getProductNo());
+                    orderProductBo.setProductName(productVo.getItemName());
+                    orderProductBo.setProductUnitId(Long.valueOf(productVo.getUnitId()));
+                    orderProductBo.setProductUnit(productVo.getUnitName());
+                    orderProductBo.setProductImage(productVo.getProductImageUrl());
+                    orderProductBo.setOrderPrice(productVo.getMarketPrice());
+                    orderProductBo.setOrderQuantity(quantity);
+                    orderProductBo.setSubtotal(productVo.getMarketPrice().multiply(BigDecimal.valueOf(quantity)));
+                    return orderProductBo;
+                })
+                .filter(Objects::nonNull)
+                .collect(Collectors.toList());
+
+            if (orderProductBos.isEmpty()) {
+                throw new IllegalStateException("无可下单的商品");
+            }
+
+            mainBo.setOrderProductBos(orderProductBos);
+
+            // 5. 保存订单(关键:成功后再删除购物车)
+            Long orderId = orderMainService.insertByBo(mainBo);
+            if (orderId != null && orderId > 0) {
+                // 成功下单后,删除对应的购物车项
+                remoteProductShoppingCartService.deleteWithValidByIds(productShoppingCartIds);
+            } else {
+                throw new RuntimeException("订单创建失败");
+            }
+
+            return R.ok(orderId); // 正确返回 ID
+        } catch (Exception e) {
+            log.error("PC端提交订单失败", e);
+            return R.fail("下单失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 订单支付(PC端下单)
+     */
+    @Log(title = "PC端-订单支付", businessType = BusinessType.UPDATE)
+    @PostMapping("/orderPay")
+    public R<?> orderPay(@RequestBody @Validated OrderPayDto payDto) {
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+
+        // 调用 Service,返回支付结果
+        Boolean orderPayResult = orderMainService.orderPay(
+            customerId,
+            payDto.getOrderId(),
+            payDto.getPayType()
+        );
+
+        return R.ok(orderPayResult);
+    }
+}

+ 51 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderEvaluationController.java

@@ -0,0 +1,51 @@
+package org.dromara.order.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.order.domain.bo.OrderEvaluationBo;
+import org.dromara.order.domain.bo.OrderReturnBo;
+import org.dromara.order.domain.vo.OrderEvaluationListVo;
+import org.dromara.order.service.IOrderEvaluationService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcOrderEvaluation")
+public class PcOrderEvaluationController extends BaseController {
+
+    private final IOrderEvaluationService orderEvaluationService;
+
+    @GetMapping("/list")
+    public TableDataInfo<OrderEvaluationListVo> getEvaluationList(OrderEvaluationBo bo, PageQuery pageQuery) {
+        // 获取当前登录用户的企业ID
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        return orderEvaluationService.getEvaluationOrderList(customerId, bo.getEvaluationStatus(), pageQuery);
+    }
+
+    /**
+     * 新增订单评价
+     */
+    @Log(title = "PC端-新增订单评价", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody OrderEvaluationBo bo) {
+        // 获取当前登录用户的企业ID
+        Long userId = LoginHelper.getUserId();
+        Long customerId = LoginHelper.getLoginUser().getCustomerId();
+        // 强制设置企业ID,防止为其他企业创建售后申请
+        bo.setCustomerId(customerId);
+        bo.setUserId(userId);
+
+        return toAjax(orderEvaluationService.insertByBo(bo));
+    }
+}

+ 4 - 3
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/pc/controller/PcOrderReturnController.java → ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/controller/pc/PcOrderReturnController.java

@@ -1,4 +1,4 @@
-package org.dromara.order.pc.controller;
+package org.dromara.order.controller.pc;
 
 import lombok.RequiredArgsConstructor;
 import org.dromara.common.core.domain.R;
@@ -19,11 +19,12 @@ import org.springframework.web.bind.annotation.*;
 
 import jakarta.validation.constraints.NotEmpty;
 import jakarta.validation.constraints.NotNull;
+
 import java.util.List;
 
 /**
  * PC端 - 售后服务管理
- * 前端访问路由地址为:/pc/enterprise/orderReturn
+ * 前端访问路由地址为:/pcOrder/orderReturn
  *
  * @author Claude
  * @date 2026-01-29
@@ -31,7 +32,7 @@ import java.util.List;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/enterprise/orderReturn")
+@RequestMapping("/pcOrder/orderReturn")
 public class PcOrderReturnController extends BaseController {
 
     private final IOrderReturnService orderReturnService;

+ 87 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/OrderEvaluation.java

@@ -0,0 +1,87 @@
+package org.dromara.order.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 订单评价对象 order_evaluation
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("order_evaluation")
+public class OrderEvaluation extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 关联订单ID
+     */
+    private Long orderId;
+
+    /**
+     * 订单编号(业务单号)
+     */
+    private String orderNo;
+
+    /**
+     * 物流服务评分(例如1-5分)
+     */
+    private Integer logistics;
+
+    /**
+     * 商品配送评分(例如1-5分)
+     */
+    private Integer deliverGoods;
+
+    /**
+     * 整体配送体验评分(例如1-5分)
+     */
+    private Integer delivery;
+
+    /**
+     * 评价类型:1-首次评价,2-追评
+     */
+    private Integer evaluationType;
+
+    /**
+     * 关联客户ID
+     */
+    private Long customerId;
+
+    /**
+     * 客户编号
+     */
+    private String customerNo;
+
+    private Long userId;
+
+    /*评价内容*/
+    private String content;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 81 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/bo/OrderEvaluationBo.java

@@ -0,0 +1,81 @@
+package org.dromara.order.domain.bo;
+
+import org.dromara.order.domain.OrderEvaluation;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 订单评价业务对象 order_evaluation
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = OrderEvaluation.class, reverseConvertGenerate = false)
+public class OrderEvaluationBo extends BaseEntity {
+
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 关联订单ID
+     */
+    private Long orderId;
+
+    /**
+     * 订单编号(业务单号)
+     */
+    private String orderNo;
+
+    /**
+     * 物流服务评分(例如1-5分)
+     */
+    private Integer logistics;
+
+    /**
+     * 商品配送评分(例如1-5分)
+     */
+    private Integer deliverGoods;
+
+    /**
+     * 整体配送体验评分(例如1-5分)
+     */
+    private Integer delivery;
+
+    /**
+     * 评价类型:1-首次评价,2-追评
+     */
+    private Integer evaluationType;
+
+    /**
+     * 关联客户ID
+     */
+    private Long customerId;
+
+    /**
+     * 客户编号
+     */
+    private String customerNo;
+
+    private Long userId;
+
+    /*评价内容*/
+    private String content;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private String evaluationStatus;
+
+
+}

+ 51 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/bo/PcSubmitOrderBo.java

@@ -0,0 +1,51 @@
+package org.dromara.order.domain.bo;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Set;
+
+@Data
+public class PcSubmitOrderBo {
+
+    /**
+     * 收货地址ID
+     */
+    @NotNull(message = "收货地址不能为空")
+    private Long shippingAddressId;
+
+    /**
+     * 配送时间(格式:yyyy-MM-dd)
+     */
+//    @NotBlank(message = "配送时间不能为空")
+    private String deliveryDate; // 前端传字符串,后端转为 Date
+
+
+    /*支付方式*/
+    private String payType;
+
+    /*费用类型*/
+    private String expenseType;
+
+    /**
+     * 采购事由
+     */
+//    @NotBlank(message = "采购事由不能为空")
+    private String purchaseReason;
+
+    /**
+     * 订单备注
+     */
+    private String remark;
+
+    /**
+     * 运费(元)
+     */
+    private BigDecimal shippingFee;
+
+    /**
+     * 购物车项id
+     */
+    private Set<Long> productShoppingCartId;
+}

+ 14 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/dto/OrderPayDto.java

@@ -0,0 +1,14 @@
+package org.dromara.order.domain.dto;
+
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Data
+public class OrderPayDto {
+
+    @NotNull(message = "订单ID不能为空")
+    private Long orderId;
+
+    @NotNull(message = "支付方式不能为空")
+    private String payType;
+}

+ 27 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderEvaluationListVo.java

@@ -0,0 +1,27 @@
+package org.dromara.order.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class OrderEvaluationListVo implements Serializable {
+
+    private Long orderId;
+
+    private String orderNo;
+
+    // 下单时间
+    private Date orderTime;
+
+    private BigDecimal totalAmount;   // 订单总金额
+
+    private String orderStatus;
+
+    private String evaluationStatus; // 待评价 / 待追评 / 已评价
+
+    private List<OrderProductBriefVo> productList;
+}

+ 100 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderEvaluationVo.java

@@ -0,0 +1,100 @@
+package org.dromara.order.domain.vo;
+
+import org.dromara.order.domain.OrderEvaluation;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 订单评价视图对象 order_evaluation
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = OrderEvaluation.class)
+public class OrderEvaluationVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ExcelProperty(value = "主键ID")
+    private Long id;
+
+    /**
+     * 关联订单ID
+     */
+    @ExcelProperty(value = "关联订单ID")
+    private Long orderId;
+
+    /**
+     * 订单编号(业务单号)
+     */
+    @ExcelProperty(value = "订单编号", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "业=务单号")
+    private String orderNo;
+
+    /**
+     * 物流服务评分(例如1-5分)
+     */
+    @ExcelProperty(value = "物流服务评分", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "例=如1-5分")
+    private Integer logistics;
+
+    /**
+     * 商品配送评分(例如1-5分)
+     */
+    @ExcelProperty(value = "商品配送评分", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "例=如1-5分")
+    private Integer deliverGoods;
+
+    /**
+     * 整体配送体验评分(例如1-5分)
+     */
+    @ExcelProperty(value = "整体配送体验评分", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "例=如1-5分")
+    private Integer delivery;
+
+    /**
+     * 评价类型:1-首次评价,2-追评
+     */
+    @ExcelProperty(value = "评价类型:1-首次评价,2-追评")
+    private Integer evaluationType;
+
+    /**
+     * 关联客户ID
+     */
+    @ExcelProperty(value = "关联客户ID")
+    private Long customerId;
+
+    /**
+     * 客户编号
+     */
+    @ExcelProperty(value = "客户编号")
+    private String customerNo;
+
+    private Long userId;
+
+    /*评价内容*/
+    private String content;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 20 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/domain/vo/OrderProductBriefVo.java

@@ -0,0 +1,20 @@
+package org.dromara.order.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+@Data
+public class OrderProductBriefVo implements Serializable {
+
+    private String productName;
+
+    private Long quantity;
+
+    private BigDecimal unitPrice;
+
+    private BigDecimal subtotal;
+
+    private String productImage; // OSS ID(前端或网关层转换为 URL)
+}

+ 15 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderEvaluationMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.order.mapper;
+
+import org.dromara.order.domain.OrderEvaluation;
+import org.dromara.order.domain.vo.OrderEvaluationVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 订单评价Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+public interface OrderEvaluationMapper extends BaseMapperPlus<OrderEvaluation, OrderEvaluationVo> {
+
+}

+ 10 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderMainMapper.java

@@ -1,10 +1,15 @@
 package org.dromara.order.mapper;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
 import org.dromara.order.domain.OrderMain;
+import org.dromara.order.domain.vo.OrderEvaluationListVo;
 import org.dromara.order.domain.vo.OrderMainVo;
 import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
 import org.dromara.order.domain.vo.OrderStatusStats;
 
+import java.util.List;
+
 /**
  * 订单主信息Mapper接口
  *
@@ -15,4 +20,9 @@ public interface OrderMainMapper extends BaseMapperPlus<OrderMain, OrderMainVo>
 
     OrderStatusStats selectOrderStatusCounts();
 
+    /**
+     * 查询客户的所有已完成订单(主信息 + 评价状态)
+     */
+    IPage<OrderEvaluationListVo> selectEvaluationMainListPage(IPage<?> page, @Param("customerId") Long customerId, @Param("evaluationStatus") String evaluationStatus);
+
 }

+ 5 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/mapper/OrderProductMapper.java

@@ -55,4 +55,9 @@ public interface OrderProductMapper extends BaseMapperPlus<OrderProduct, OrderPr
         @Param("childOrderId") Long childOrderId,
         @Param("updateTime") Date updateTime
     );
+
+    /**
+     * 根据订单ID列表查询商品明细
+     */
+    List<OrderProduct> selectByOrderIds(@Param("orderIds") List<Long> orderIds);
 }

+ 0 - 171
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/pc/controller/PcOrderController.java

@@ -1,171 +0,0 @@
-package org.dromara.order.pc.controller;
-
-import lombok.RequiredArgsConstructor;
-import org.dromara.common.core.domain.R;
-import org.dromara.common.log.annotation.Log;
-import org.dromara.common.log.enums.BusinessType;
-import org.dromara.common.mybatis.core.page.PageQuery;
-import org.dromara.common.mybatis.core.page.TableDataInfo;
-import org.dromara.common.satoken.utils.LoginHelper;
-import org.dromara.common.web.core.BaseController;
-import org.dromara.order.domain.bo.OrderMainBo;
-import org.dromara.order.domain.vo.OrderMainVo;
-import org.dromara.order.domain.vo.OrderProductVo;
-import org.dromara.order.domain.vo.OrderStatusStats;
-import org.dromara.order.service.IOrderMainService;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import jakarta.validation.constraints.NotNull;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * PC端 - 订单管理
- * 前端访问路由地址为:/pc/enterprise/order
- *
- * @author Claude
- * @date 2026-01-28
- */
-@Validated
-@RequiredArgsConstructor
-@RestController
-@RequestMapping("/pc/enterprise/order")
-public class PcOrderController extends BaseController {
-
-    private final IOrderMainService orderMainService;
-
-    /**
-     * 查询当前企业的订单列表
-     * PC端用户只能查询自己企业的订单
-     */
-    @GetMapping("/list")
-    public TableDataInfo<OrderMainVo> list(OrderMainBo bo, PageQuery pageQuery) {
-        // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
-        // 强制设置企业ID,防止越权访问
-        bo.setCustomerId(customerId);
-
-        return orderMainService.queryPageList(bo, pageQuery);
-    }
-
-    /**
-     * 查询当前企业的订单状态统计
-     * 返回各状态订单数量
-     */
-    @GetMapping("/statusStats")
-    public R<OrderStatusStats> getStatusStats() {
-        return R.ok(orderMainService.queryOrderStatusStats());
-    }
-
-    /**
-     * 获取订单详细信息
-     * PC端用户只能查询自己企业的订单
-     *
-     * @param id 订单主键
-     */
-    @GetMapping("/{id}")
-    public R<OrderMainVo> getInfo(@NotNull(message = "主键不能为空")
-                                  @PathVariable("id") Long id) {
-        // 查询订单信息
-        OrderMainVo vo = orderMainService.queryById(id);
-
-        // 验证订单是否属于当前用户的企业
-        if (vo != null) {
-            Long customerId = LoginHelper.getUserId();
-            if (!customerId.equals(vo.getCustomerId())) {
-                return R.fail("无权访问该订单");
-            }
-        }
-
-        return R.ok(vo);
-    }
-
-    /**
-     * 根据订单ID查询订单商品明细
-     * PC端用户只能查询自己企业的订单商品
-     *
-     * @param orderIds 订单ID列表
-     */
-    @GetMapping("/products")
-    public TableDataInfo<OrderProductVo> getOrderProducts(@RequestParam("orderIds") List<Long> orderIds) {
-        if (orderIds == null || orderIds.isEmpty()) {
-            throw new IllegalArgumentException("订单ID列表不能为空");
-        }
-        if (orderIds.size() > 1000) {
-            throw new IllegalArgumentException("订单ID数量不能超过1000个");
-        }
-
-        // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
-
-        // 验证所有订单是否都属于当前用户的企业
-        for (Long orderId : orderIds) {
-            OrderMainVo order = orderMainService.queryById(orderId);
-            if (order == null) {
-                throw new IllegalArgumentException("订单ID " + orderId + " 不存在");
-            }
-            if (!customerId.equals(order.getCustomerId())) {
-                throw new IllegalArgumentException("无权访问订单ID " + orderId);
-            }
-        }
-
-        Set<Long> uniqueOrderIds = new HashSet<>(orderIds);
-        return orderMainService.getCustomerOrderProductList(uniqueOrderIds);
-    }
-
-    /**
-     * 取消订单
-     * PC端用户只能取消自己企业的订单
-     *
-     * @param bo 订单业务对象
-     */
-    @Log(title = "PC端-订单管理", businessType = BusinessType.UPDATE)
-    @PutMapping("/cancel")
-    public R<Void> cancelOrder(@RequestBody OrderMainBo bo) {
-        // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
-
-        // 验证订单是否属于当前用户的企业
-        OrderMainVo existingOrder = orderMainService.queryById(bo.getId());
-        if (existingOrder == null) {
-            return R.fail("订单不存在");
-        }
-        if (!customerId.equals(existingOrder.getCustomerId())) {
-            return R.fail("无权取消该订单");
-        }
-
-        // 强制设置企业ID
-        bo.setCustomerId(customerId);
-
-        return toAjax(orderMainService.updateStatus(bo));
-    }
-
-    /**
-     * 审核订单
-     * PC端企业客户审核自己企业的订单
-     *
-     * @param bo 订单业务对象
-     */
-    @Log(title = "PC端-订单审核", businessType = BusinessType.UPDATE)
-    @PutMapping("/checkStatus")
-    public R<Void> checkStatus(@RequestBody OrderMainBo bo) {
-        // 获取当前登录用户的企业ID
-        Long customerId = LoginHelper.getUserId();
-
-        // 验证订单是否属于当前用户的企业
-        OrderMainVo existingOrder = orderMainService.queryById(bo.getId());
-        if (existingOrder == null) {
-            return R.fail("订单不存在");
-        }
-        if (!customerId.equals(existingOrder.getCustomerId())) {
-            return R.fail("无权审核该订单");
-        }
-
-        // 强制设置企业ID
-        bo.setCustomerId(customerId);
-
-        return toAjax(orderMainService.updateCheckStatus(bo));
-    }
-}

+ 73 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderEvaluationService.java

@@ -0,0 +1,73 @@
+package org.dromara.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.order.domain.OrderEvaluation;
+import org.dromara.order.domain.vo.OrderEvaluationListVo;
+import org.dromara.order.domain.vo.OrderEvaluationVo;
+import org.dromara.order.domain.bo.OrderEvaluationBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 订单评价Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+public interface IOrderEvaluationService extends IService<OrderEvaluation> {
+
+    /**
+     * 查询订单评价
+     *
+     * @param id 主键
+     * @return 订单评价
+     */
+    OrderEvaluationVo queryById(Long id);
+
+    TableDataInfo<OrderEvaluationListVo> getEvaluationOrderList(Long customerId, String evaluationStatus, PageQuery pageQuery);
+
+    /**
+     * 分页查询订单评价列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 订单评价分页列表
+     */
+    TableDataInfo<OrderEvaluationVo> queryPageList(OrderEvaluationBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的订单评价列表
+     *
+     * @param bo 查询条件
+     * @return 订单评价列表
+     */
+    List<OrderEvaluationVo> queryList(OrderEvaluationBo bo);
+
+    /**
+     * 新增订单评价
+     *
+     * @param bo 订单评价
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(OrderEvaluationBo bo);
+
+    /**
+     * 修改订单评价
+     *
+     * @param bo 订单评价
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(OrderEvaluationBo bo);
+
+    /**
+     * 校验并批量删除订单评价信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 12 - 1
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/IOrderMainService.java

@@ -3,6 +3,7 @@ package org.dromara.order.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.dromara.order.domain.OrderMain;
 import org.dromara.order.domain.OrderProduct;
+import org.dromara.order.domain.bo.OrderProductBo;
 import org.dromara.order.domain.vo.OrderMainVo;
 import org.dromara.order.domain.bo.OrderMainBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -57,7 +58,7 @@ public interface IOrderMainService extends IService<OrderMain> {
      * @param bo 订单主信息
      * @return 是否新增成功
      */
-    Boolean insertByBo(OrderMainBo bo);
+    Long insertByBo(OrderMainBo bo);
 
     /**
      * 修改订单主信息
@@ -67,9 +68,19 @@ public interface IOrderMainService extends IService<OrderMain> {
      */
     Boolean updateByBo(OrderMainBo bo);
 
+    /**
+     * 订单确认
+     *
+     * @param
+     * @return 是否确认成功
+     */
+    void confirmOrder(Long orderId, List<OrderProductBo> updatedProducts);
+
     int updateStatus(OrderMainBo bo);
 
 
+    Boolean orderPay(Long customerId, Long orderId, String payType);
+
     /**
      * 修改订单审核状态
      *

+ 194 - 0
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderEvaluationServiceImpl.java

@@ -0,0 +1,194 @@
+package org.dromara.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.order.domain.OrderEvaluation;
+import org.dromara.order.domain.OrderProduct;
+import org.dromara.order.domain.bo.OrderEvaluationBo;
+import org.dromara.order.domain.vo.OrderEvaluationListVo;
+import org.dromara.order.domain.vo.OrderEvaluationVo;
+import org.dromara.order.domain.vo.OrderProductBriefVo;
+import org.dromara.order.mapper.OrderEvaluationMapper;
+import org.dromara.order.mapper.OrderMainMapper;
+import org.dromara.order.mapper.OrderProductMapper;
+import org.dromara.order.service.IOrderEvaluationService;
+import org.springframework.stereotype.Service;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 订单评价Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-03
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class OrderEvaluationServiceImpl extends ServiceImpl<OrderEvaluationMapper, OrderEvaluation> implements IOrderEvaluationService {
+
+    private final OrderEvaluationMapper baseMapper;
+
+    private final OrderMainMapper orderMainMapper;
+
+    private final OrderProductMapper orderProductMapper;
+
+    /**
+     * 查询订单评价
+     *
+     * @param id 主键
+     * @return 订单评价
+     */
+    @Override
+    public OrderEvaluationVo queryById(Long id) {
+        return baseMapper.selectVoById(id);
+    }
+
+    @Override
+    public TableDataInfo<OrderEvaluationListVo> getEvaluationOrderList(Long customerId, String evaluationStatus, PageQuery pageQuery) {
+        // 1. 分页查询主订单(含评价状态)
+        IPage<OrderEvaluationListVo> page = orderMainMapper.selectEvaluationMainListPage(pageQuery.build(), customerId, evaluationStatus);
+        List<OrderEvaluationListVo> orders = page.getRecords();
+
+        if (!orders.isEmpty()) {
+            // 2. 批量查商品(仅当前页的订单ID)
+            List<Long> orderIds = orders.stream()
+                .map(OrderEvaluationListVo::getOrderId)
+                .collect(Collectors.toList());
+
+            List<OrderProduct> products = orderProductMapper.selectByOrderIds(orderIds);
+
+            // 3. 按 orderId 分组
+            Map<Long, List<OrderProduct>> productMap = products.stream()
+                .collect(Collectors.groupingBy(OrderProduct::getOrderId));
+
+            // 4. 转换并赋值
+            for (OrderEvaluationListVo order : orders) {
+                List<OrderProduct> list = productMap.get(order.getOrderId());
+                if (list != null) {
+                    List<OrderProductBriefVo> briefs = list.stream().map(p -> {
+                        OrderProductBriefVo b = new OrderProductBriefVo();
+                        b.setProductName(p.getProductName());
+                        b.setQuantity(p.getOrderQuantity());
+                        b.setUnitPrice(p.getOrderPrice());
+                        b.setSubtotal(p.getSubtotal());
+                        b.setProductImage(p.getProductImage());
+                        return b;
+                    }).collect(Collectors.toList());
+                    order.setProductList(briefs);
+                } else {
+                    order.setProductList(Collections.emptyList());
+                }
+            }
+        }
+
+        // 5. 构造分页返回对象
+        return TableDataInfo.build(page);
+    }
+
+    /**
+     * 分页查询订单评价列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 订单评价分页列表
+     */
+    @Override
+    public TableDataInfo<OrderEvaluationVo> queryPageList(OrderEvaluationBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<OrderEvaluation> lqw = buildQueryWrapper(bo);
+        Page<OrderEvaluationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的订单评价列表
+     *
+     * @param bo 查询条件
+     * @return 订单评价列表
+     */
+    @Override
+    public List<OrderEvaluationVo> queryList(OrderEvaluationBo bo) {
+        LambdaQueryWrapper<OrderEvaluation> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<OrderEvaluation> buildQueryWrapper(OrderEvaluationBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<OrderEvaluation> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(OrderEvaluation::getId);
+        lqw.eq(bo.getOrderId() != null, OrderEvaluation::getOrderId, bo.getOrderId());
+        lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), OrderEvaluation::getOrderNo, bo.getOrderNo());
+        lqw.eq(bo.getLogistics() != null, OrderEvaluation::getLogistics, bo.getLogistics());
+        lqw.eq(bo.getDeliverGoods() != null, OrderEvaluation::getDeliverGoods, bo.getDeliverGoods());
+        lqw.eq(bo.getDelivery() != null, OrderEvaluation::getDelivery, bo.getDelivery());
+        lqw.eq(bo.getCustomerId() != null, OrderEvaluation::getCustomerId, bo.getCustomerId());
+        lqw.eq(StringUtils.isNotBlank(bo.getCustomerNo()), OrderEvaluation::getCustomerNo, bo.getCustomerNo());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), OrderEvaluation::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增订单评价
+     *
+     * @param bo 订单评价
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(OrderEvaluationBo bo) {
+        OrderEvaluation add = MapstructUtils.convert(bo, OrderEvaluation.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改订单评价
+     *
+     * @param bo 订单评价
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(OrderEvaluationBo bo) {
+        OrderEvaluation update = MapstructUtils.convert(bo, OrderEvaluation.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(OrderEvaluation entity) {
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除订单评价信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if (isValid) {
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 245 - 19
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java

@@ -10,13 +10,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.core.enums.OrderPayType;
 import org.dromara.common.core.enums.OrderStatus;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.redis.utils.SequenceUtils;
+import org.dromara.customer.api.RemoteCustomerSalesService;
 import org.dromara.customer.api.RemoteCustomerService;
+import org.dromara.customer.api.domain.vo.RemoteCustomerSalesVo;
 import org.dromara.order.domain.OrderMain;
 import org.dromara.order.domain.OrderProduct;
 import org.dromara.order.domain.bo.OrderMainBo;
@@ -35,7 +38,9 @@ import org.dromara.system.api.RemoteUserService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -58,6 +63,9 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
     @DubboReference
     private RemoteCustomerService remoteCustomerService;
 
+    @DubboReference
+    private RemoteCustomerSalesService remoteCustomerSalesService;
+
     private final OrderMainMapper baseMapper;
 
     private final OrderProductMapper orderProductMapper;
@@ -239,7 +247,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
      */
     @Transactional(rollbackFor = Exception.class)
     @Override
-    public Boolean insertByBo(OrderMainBo bo) {
+    public Long insertByBo(OrderMainBo bo) {
         try {
             // 1. 校验商品列表
             List<OrderProductBo> orderProductBos = bo.getOrderProductBos();
@@ -254,26 +262,40 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
                 }
             }
 
+            BigDecimal totalAmount = orderProductBos.stream().map(OrderProductBo::getSubtotal).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+
+            // 应付总额 = 商品总价 + 运费
+            BigDecimal payableAmount = totalAmount.add(bo.getShippingFee());
+
             // 2. 生成订单号并转换主单
             String orderNo = SequenceUtils.generateOrderCode("RS");
             bo.setOrderNo(orderNo);
-            Date originalDate = bo.getOrderTime(); // 假设是 2025-01-06 00:00:00
-            if (originalDate != null) {
-                Calendar calOriginal = Calendar.getInstance();
-                calOriginal.setTime(originalDate);
 
-                Calendar calNow = Calendar.getInstance(); // 获取当前时分秒
+            bo.setTotalAmount(totalAmount);
+
+            bo.setPayableAmount(payableAmount);
+
+            // 处理下单时间:前台不传则用当前时间,后台传了则按规则调整
+            Date orderTimeToUse;
+            if (bo.getOrderTime() != null) {
+                // 后台传了时间:保留日期,更新时分秒为当前
+                Calendar cal = Calendar.getInstance();
+                cal.setTime(bo.getOrderTime());
+                Calendar now = Calendar.getInstance();
+                cal.set(Calendar.HOUR_OF_DAY, now.get(Calendar.HOUR_OF_DAY));
+                cal.set(Calendar.MINUTE, now.get(Calendar.MINUTE));
+                cal.set(Calendar.SECOND, now.get(Calendar.SECOND));
+                cal.set(Calendar.MILLISECOND, now.get(Calendar.MILLISECOND));
+                orderTimeToUse = cal.getTime();
+            } else {
+                // 前台未传:直接使用当前时间
+                orderTimeToUse = new Date();
+            }
+            bo.setOrderTime(orderTimeToUse);
 
-                // 保留原日期的年月日,替换时分秒为当前时间
-                calOriginal.set(Calendar.HOUR_OF_DAY, calNow.get(Calendar.HOUR_OF_DAY));
-                calOriginal.set(Calendar.MINUTE, calNow.get(Calendar.MINUTE));
-                calOriginal.set(Calendar.SECOND, calNow.get(Calendar.SECOND));
-                calOriginal.set(Calendar.MILLISECOND, calNow.get(Calendar.MILLISECOND));
 
-                bo.setOrderTime(calOriginal.getTime());
-            }
+            // 转换主订单
             OrderMain orderMain = MapstructUtils.convert(bo, OrderMain.class);
-
             validEntityBeforeSave(orderMain);
 
             // 3. 插入主订单
@@ -282,22 +304,39 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
                 throw new RuntimeException("主订单保存失败");
             }
 
-            // 4. 转换并填充子订单商品
             Long orderId = orderMain.getId();
+
+            // 4. 转换并填充子订单商品
             List<OrderProduct> orderProducts = orderProductBos.stream()
                 .map(productBo -> {
+                    BigDecimal unitPrice = productBo.getOrderPrice();
+                    Long quantity = productBo.getOrderQuantity();
+
+                    // 防御性校验
+                    if (unitPrice == null) {
+                        throw new IllegalArgumentException("商品单价不能为空");
+                    }
+                    if (quantity == null || quantity <= 0) {
+                        throw new IllegalArgumentException("商品数量必须大于0");
+                    }
+
                     OrderProduct product = MapstructUtils.convert(productBo, OrderProduct.class);
-                    product.setOrderId(orderId);      // 关联主单ID
-                    product.setOrderNo(orderNo);      // 关联订单号
+                    product.setOrderId(orderId);
+                    product.setOrderNo(orderNo);
+
+                    // 小计 = 单价 × 数量
+                    BigDecimal subtotal = unitPrice.multiply(BigDecimal.valueOf(quantity));
+                    product.setSubtotal(subtotal);
+
                     return product;
                 })
                 .collect(Collectors.toList());
 
             // 5. 批量插入订单商品
-            boolean productsSaved = orderProductMapper.insertBatch(orderProducts);
+            orderProductMapper.insertBatch(orderProducts);
 
             log.info("成功新增订单,ID: {}", orderId);
-            return productsSaved;
+            return orderId;
         } catch (RuntimeException e) {
             log.error("新增订单失败: {}", e.getMessage(), e);
             throw new RuntimeException("新增订单失败: " + e.getMessage());
@@ -324,6 +363,193 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
         }
     }
 
+
+    /**
+     * 订单确认
+     *
+     * @param
+     * @return 是否确认成功
+     */
+    @Transactional(rollbackFor = Exception.class)
+    @Override
+    public void confirmOrder(Long orderId, List<OrderProductBo> updatedProducts) {
+        if (orderId == null) {
+            throw new IllegalArgumentException("订单ID不能为空");
+        }
+
+        // 1. 查询现有主订单(加锁防止并发修改)
+        OrderMain existingOrder = baseMapper.selectOne(new LambdaQueryWrapper<OrderMain>()
+            .eq(OrderMain::getId, orderId)
+            .last("FOR UPDATE"));
+        if (existingOrder == null) {
+            throw new IllegalArgumentException("订单不存在");
+        }
+
+        // 2. 检查当前状态:只允许从“待确认”(比如状态0或1)变为“待发货”(2)
+        if (!OrderStatus.PENDING_PAYMENT.getCode().equals(existingOrder.getOrderStatus()) && !OrderStatus.PENDING_CONFIRMATION.getCode().equals(existingOrder.getOrderStatus())) {
+            throw new IllegalStateException("订单状态不可确认,当前状态:" + existingOrder.getOrderStatus());
+        }
+
+        // 3. 查询现有子订单商品(按 orderId)
+        List<OrderProduct> existingProducts = orderProductMapper.selectList(
+            new LambdaQueryWrapper<OrderProduct>().eq(OrderProduct::getOrderId, orderId)
+        );
+
+        if (CollUtil.isEmpty(existingProducts)) {
+            throw new IllegalStateException("订单商品不存在,无法确认");
+        }
+
+        // 4. 构建商品ID -> 现有商品的映射
+        Map<Long, OrderProduct> existingProductMap = existingProducts.stream()
+            .collect(Collectors.toMap(OrderProduct::getId, Function.identity()));
+
+        // 5. 校验传入的商品列表是否匹配(不能增删商品,只能改数量)
+        if (CollUtil.isEmpty(updatedProducts)) {
+            throw new IllegalArgumentException("确认订单时商品列表不能为空");
+        }
+
+        if (updatedProducts.size() != existingProducts.size()) {
+            throw new IllegalArgumentException("商品数量不一致,不允许增删商品项");
+        }
+
+        // 6. 遍历更新项,仅允许修改数量,并校验ID存在
+        List<OrderProduct> toUpdateProducts = new ArrayList<>();
+        BigDecimal newTotalAmount = BigDecimal.ZERO;
+
+        for (OrderProductBo bo : updatedProducts) {
+            if (bo.getId() == null) {
+                throw new IllegalArgumentException("商品项必须包含ID(用于匹配原订单商品)");
+            }
+
+            OrderProduct existing = existingProductMap.get(bo.getId());
+            if (existing == null) {
+                throw new IllegalArgumentException("商品ID " + bo.getId() + " 不属于该订单");
+            }
+
+            // 仅允许修改数量(可选),其他字段如 price、skuCode 等必须保持一致
+            Long newQty = bo.getOrderQuantity();
+            if (newQty == null || newQty <= 0) {
+                throw new IllegalArgumentException("商品数量必须大于0");
+            }
+
+            // 重新计算小计:注意使用原单价 * 新数量(防止前端篡改价格)
+            BigDecimal unitPrice = existing.getOrderPrice(); // 使用数据库中的原始单价
+            BigDecimal newSubtotal = unitPrice.multiply(BigDecimal.valueOf(newQty));
+
+            // 更新对象(仅数量和小计)
+            existing.setOrderQuantity(newQty);
+            existing.setSubtotal(newSubtotal);
+
+            toUpdateProducts.add(existing);
+            newTotalAmount = newTotalAmount.add(newSubtotal);
+        }
+
+        // 7. 重新计算应付金额(运费不变)
+        BigDecimal newPayableAmount = newTotalAmount.add(existingOrder.getShippingFee());
+
+        // 8. 更新主订单:仅更新 totalAmount、payableAmount 和 orderStatus
+        existingOrder.setTotalAmount(newTotalAmount);
+        existingOrder.setPayableAmount(newPayableAmount);
+        existingOrder.setOrderStatus(OrderStatus.PENDING_SHIPMENT.getCode()); // 待发货
+
+        // 9. 执行更新
+        int mainUpdated = baseMapper.updateById(existingOrder);
+        if (mainUpdated <= 0) {
+            throw new RuntimeException("主订单确认失败");
+        }
+
+        // 10. 批量更新子订单商品
+        orderProductMapper.updateBatchById(toUpdateProducts);
+
+        log.info("订单 {} 已确认,状态更新为待发货", orderId);
+    }
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean orderPay(Long customerId, Long orderId, String payType) {
+        // 参数校验
+        if (orderId == null) {
+            throw new IllegalArgumentException("订单ID不能为空");
+        }
+        if (customerId == null) {
+            throw new IllegalArgumentException("客户ID不能为空");
+        }
+        if (payType == null || !OrderPayType.CREDIT_PAY.getCode().equals(payType)) {
+            throw new IllegalArgumentException("仅支持信用支付方式");
+        }
+
+        // 查询订单
+        OrderMainVo orderMainVo = baseMapper.selectVoById(orderId);
+        if (orderMainVo == null) {
+            throw new IllegalArgumentException("订单不存在");
+        }
+        if (!Objects.equals(customerId, orderMainVo.getCustomerId())) {
+            throw new IllegalArgumentException("订单不属于当前客户");
+        }
+
+        BigDecimal totalAmount = orderMainVo.getTotalAmount();
+        if (totalAmount == null || totalAmount.compareTo(BigDecimal.ZERO) <= 0) {
+            throw new IllegalArgumentException("订单金额无效");
+        }
+
+        // 查询客户信用销售信息
+        RemoteCustomerSalesVo salesInfo = remoteCustomerSalesService.selectCustomerSalesInfoByCustomerId(customerId);
+        if (salesInfo == null) {
+            throw new IllegalStateException("客户信用信息未配置,无法使用信用支付");
+        }
+
+        // 获取可用额度:剩余额度 + 临时额度
+        BigDecimal remainingQuota = Optional.ofNullable(salesInfo.getRemainingQuota()).orElse(BigDecimal.ZERO);
+        BigDecimal temporaryQuota = Optional.ofNullable(salesInfo.getTemporaryQuota()).orElse(BigDecimal.ZERO);
+
+
+        // 临时额度可用于支付
+        BigDecimal availableCredit = remainingQuota.add(temporaryQuota);
+
+        // 判断额度是否足够
+        if (availableCredit.compareTo(totalAmount) < 0) {
+            throw new IllegalStateException("信用额度不足,无法完成支付");
+        }
+
+        // 扣减逻辑:优先扣减临时额度,再扣剩余额度
+        BigDecimal newRemainingQuota = remainingQuota;
+        BigDecimal newTemporaryQuota = temporaryQuota;
+
+        if (temporaryQuota.compareTo(totalAmount) >= 0) {
+            // 临时额度足够,只扣临时额度
+            newTemporaryQuota = temporaryQuota.subtract(totalAmount);
+        } else {
+            // 临时额度不足,先清空临时额度,再扣剩余额度
+            BigDecimal remainingToDeduct = totalAmount.subtract(temporaryQuota);
+            newTemporaryQuota = BigDecimal.ZERO;
+            newRemainingQuota = remainingQuota.subtract(remainingToDeduct);
+
+            // 理论上不会为负(前面已校验总额度足够),但防御性检查
+            if (newRemainingQuota.compareTo(BigDecimal.ZERO) < 0) {
+                throw new IllegalStateException("信用额度计算异常,请联系管理员");
+            }
+        }
+
+        // 更新对象
+        salesInfo.setRemainingQuota(newRemainingQuota);
+        salesInfo.setTemporaryQuota(newTemporaryQuota);
+
+        // 执行更新
+        boolean updated = remoteCustomerSalesService.updateCustomerSalesInfo(salesInfo);
+        if (!updated) {
+            throw new RuntimeException("信用额度更新失败,请重试");
+        }
+        OrderMain order = new OrderMain();
+        order.setId(orderId);
+        order.setOrderStatus(OrderStatus.PENDING_CONFIRMATION.getCode());
+        Boolean result = baseMapper.updateById(order) > 0;
+        if (!result) {
+            throw new RuntimeException("订单支付失败");
+        }
+        return true;
+    }
+
     /**
      * 修改状态
      *

+ 7 - 0
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderEvaluationMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.order.mapper.OrderEvaluationMapper">
+
+</mapper>

+ 34 - 0
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMainMapper.xml

@@ -14,4 +14,38 @@
         FROM order_main
         WHERE del_flag = '0'
     </select>
+
+    <select id="selectEvaluationMainListPage" resultType="org.dromara.order.domain.vo.OrderEvaluationListVo">
+        SELECT
+        o.id AS orderId,
+        o.order_no AS orderNo,
+        o.order_time AS orderTime,
+        o.total_amount AS totalAmount,
+        o.order_status as orderStatus,
+        CASE
+        WHEN oe.max_type IS NULL THEN '0'
+        WHEN oe.max_type = 1 THEN '1'
+        WHEN oe.max_type = 2 THEN '2'
+        END AS evaluationStatus
+        FROM order_main o
+        LEFT JOIN (
+        SELECT order_id, MAX(evaluation_type) AS max_type
+        FROM order_evaluation
+        GROUP BY order_id
+        ) oe ON o.id = oe.order_id
+        WHERE
+        o.customer_id = #{customerId}
+        AND o.order_status = '5'
+        AND o.del_flag = '0'
+        <if test="evaluationStatus != null and evaluationStatus == '0'">
+            AND oe.max_type IS NULL
+        </if>
+        <if test="evaluationStatus != null and evaluationStatus == '1'">
+            AND oe.max_type = 1
+        </if>
+        <if test="evaluationStatus != null and evaluationStatus == '2'">
+            AND oe.max_type = 2
+        </if>
+        ORDER BY o.order_time DESC
+    </select>
 </mapper>

+ 16 - 0
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderProductMapper.xml

@@ -100,4 +100,20 @@
         </foreach>
     </update>
 
+    <select id="selectByOrderIds" resultType="org.dromara.order.domain.OrderProduct">
+        SELECT
+        order_id AS orderId,
+        product_name AS productName,
+        order_quantity AS orderQuantity,
+        order_price AS orderPrice,
+        subtotal,
+        product_image AS productImage
+        FROM order_product
+        WHERE order_id IN
+        <foreach collection="orderIds" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+        AND del_flag = '0'
+    </select>
+
 </mapper>

+ 19 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteProductShoppingCartServiceImpl.java

@@ -1,13 +1,20 @@
 package org.dromara.product.dubbo;
 
+import cn.hutool.core.bean.BeanUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.product.api.RemoteProductShoppingCartService;
+import org.dromara.product.api.domain.RemoteProductShoppingCartVo;
+import org.dromara.product.domain.ProductShoppingCart;
 import org.dromara.product.domain.bo.ProductShoppingCartBo;
 import org.dromara.product.service.IProductShoppingCartService;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+import java.util.Set;
+
 /**
  * author
  * 时间:2026/2/4,17:35
@@ -19,6 +26,7 @@ import org.springframework.stereotype.Service;
 public class RemoteProductShoppingCartServiceImpl implements RemoteProductShoppingCartService {
 
     private final IProductShoppingCartService productShoppingCartService;
+
     @Override
     public boolean lockShoppingCart(Long productId, Long count) {
         ProductShoppingCartBo productShoppingCartBo = new ProductShoppingCartBo();
@@ -36,4 +44,15 @@ public class RemoteProductShoppingCartServiceImpl implements RemoteProductShoppi
     public boolean unlockShoppingCart(Long productId, Long count) {
         return false;
     }
+
+    @Override
+    public List<RemoteProductShoppingCartVo> getShoppingCartList(Set<Long> cartIds) {
+        List<ProductShoppingCart> productShoppingCarts = productShoppingCartService.listByIds(cartIds);
+        return BeanUtil.copyToList(productShoppingCarts, RemoteProductShoppingCartVo.class);
+    }
+
+    @Override
+    public Boolean deleteWithValidByIds(Set<Long> ids) {
+        return productShoppingCartService.deleteWithValidByIds(ids, true);
+    }
 }

+ 28 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/PcComBankController.java

@@ -0,0 +1,28 @@
+package org.dromara.system.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.system.domain.bo.ComBankBo;
+import org.dromara.system.domain.vo.ComBankVo;
+import org.dromara.system.service.IComBankService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/pcBank")
+public class PcComBankController extends BaseController {
+
+    private final IComBankService comBankService;
+
+
+    @GetMapping("/list")
+    public TableDataInfo<ComBankVo> list(PageQuery pageQuery) {
+        return comBankService.queryPageList(new ComBankBo(), pageQuery);
+    }
+}

+ 29 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/PcComStaffController.java

@@ -0,0 +1,29 @@
+package org.dromara.system.controller.pc;
+
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.system.domain.bo.ComBankBo;
+import org.dromara.system.domain.bo.ComStaffBo;
+import org.dromara.system.domain.vo.ComBankVo;
+import org.dromara.system.domain.vo.ComStaffVo;
+import org.dromara.system.service.IComStaffService;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/organization/comStaff")
+public class PcComStaffController extends BaseController {
+
+    private final IComStaffService comStaffService;
+
+    @GetMapping("/list")
+    public TableDataInfo<ComStaffVo> list(ComStaffBo bo, PageQuery pageQuery) {
+        return comStaffService.queryPageList(bo, pageQuery);
+    }
+}

+ 2 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/ComStaffVo.java

@@ -127,5 +127,7 @@ public class ComStaffVo implements Serializable {
 
     private String postName;
 
+    private String roleName;
+
 
 }

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/pc/controller/PcRoleController.java

@@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.*;
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/pc/organization/role")
+@RequestMapping("/organization/role")
 public class PcRoleController extends BaseController {
 
     private final ISysRoleService sysRoleService;

+ 19 - 2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/ComStaffServiceImpl.java

@@ -38,6 +38,8 @@ public class ComStaffServiceImpl extends ServiceImpl<ComStaffMapper, ComStaff> i
 
     private final SysPostMapper sysPostMapper;
 
+    private final SysRoleMapper sysRoleMapper;
+
     /**
      * 查询人员信息
      *
@@ -70,9 +72,15 @@ public class ComStaffServiceImpl extends ServiceImpl<ComStaffMapper, ComStaff> i
             Map<Long, String> postMap = sysPostMapper.selectList(new LambdaQueryWrapper<SysPost>()
                     .select(SysPost::getPostId, SysPost::getPostName).in(SysPost::getPostId, postIds)).stream()
                 .collect(Collectors.toMap(SysPost::getPostId, SysPost::getPostName));
+            Set<Long> roleIds = records.stream().map(ComStaffVo::getRoleId).filter(Objects::nonNull).collect(Collectors.toSet());
+            Map<Long, String> roleMap = sysRoleMapper.selectList(new LambdaQueryWrapper<SysRole>().select(SysRole::getRoleId, SysRole::getRoleName).in(SysRole::getRoleId, roleIds)).stream()
+                .collect(Collectors.toMap(SysRole::getRoleId, SysRole::getRoleName));
+
+
             records.forEach(item -> {
                 item.setDeptName(deptMap.get(item.getDeptId()));
                 item.setPostName(postMap.get(item.getPostId()));
+                item.setRoleName(roleMap.get(item.getRoleId()));
             });
         }
         return TableDataInfo.build(result);
@@ -122,12 +130,21 @@ public class ComStaffServiceImpl extends ServiceImpl<ComStaffMapper, ComStaff> i
                         .select(SysPost::getPostId, SysPost::getPostName).in(SysPost::getPostId, postIds)).stream()
                     .collect(Collectors.toMap(SysPost::getPostId, SysPost::getPostName));
             }
+            Set<Long> roleIds = records.stream().map(ComStaffVo::getRoleId).filter(Objects::nonNull).collect(Collectors.toSet());
+            Map<Long, String> roleMap = new HashMap<>();
+            if (CollUtil.isNotEmpty(roleIds)) {
+                roleMap = sysRoleMapper.selectList(new LambdaQueryWrapper<SysRole>().select(SysRole::getRoleId, SysRole::getRoleName).in(SysRole::getRoleId, roleIds)).stream()
+                    .collect(Collectors.toMap(SysRole::getRoleId, SysRole::getRoleName));
+
+            }
 
             Map<Long, String> finalDeptMap = deptMap;
             Map<Long, String> finalPostMap = postMap;
+            Map<Long, String> finalRoleMap = roleMap;
             records.forEach(item -> {
                 item.setDeptName(finalDeptMap.get(item.getDeptId()));
                 item.setPostName(finalPostMap.get(item.getPostId()));
+                item.setRoleName(finalRoleMap.get(item.getRoleId()));
             });
         }
 
@@ -247,10 +264,10 @@ public class ComStaffServiceImpl extends ServiceImpl<ComStaffMapper, ComStaff> i
     }
 
     @Override
-    public Map<String,String> selectStaffNameAndCode() {
+    public Map<String, String> selectStaffNameAndCode() {
 
         List<ComStaff> staffList = baseMapper.selectList();
-        Map<String,String> resultMap = new HashMap<>();
+        Map<String, String> resultMap = new HashMap<>();
         staffList.stream()
             .filter(staff -> staff.getStaffId() != null && staff.getStaffName() != null)
             .forEach(staff -> resultMap.put(staff.getStaffCode(), staff.getStaffName()));

+ 2 - 1
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/FlowCategory.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.dromara.common.tenant.core.TenantEntity;
+import org.dromara.common.tenant.core.TenantEntityWithoutPlatformCode;
 
 import java.io.Serial;
 import java.util.ArrayList;
@@ -21,7 +22,7 @@ import java.util.List;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("flow_category")
-public class FlowCategory extends TenantEntity {
+public class FlowCategory extends TenantEntityWithoutPlatformCode {
 
     @Serial
     private static final long serialVersionUID = 1L;

+ 2 - 1
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/domain/TestLeave.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.mybatis.core.domain.BaseEntityWithoutPlatform;
 
 import java.io.Serial;
 import java.util.Date;
@@ -18,7 +19,7 @@ import java.util.Date;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("test_leave")
-public class TestLeave extends BaseEntity {
+public class TestLeave extends BaseEntityWithoutPlatform {
 
     @Serial
     private static final long serialVersionUID = 1L;

+ 2 - 1
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java

@@ -13,6 +13,7 @@ import org.dromara.common.core.enums.BusinessStatusEnum;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.mybatis.core.domain.BaseEntityWithoutPlatform;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.tenant.helper.TenantHelper;
@@ -93,7 +94,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
         lqw.eq(StringUtils.isNotBlank(bo.getLeaveType()), TestLeave::getLeaveType, bo.getLeaveType());
         lqw.ge(bo.getStartLeaveDays() != null, TestLeave::getLeaveDays, bo.getStartLeaveDays());
         lqw.le(bo.getEndLeaveDays() != null, TestLeave::getLeaveDays, bo.getEndLeaveDays());
-        lqw.orderByDesc(BaseEntity::getCreateTime);
+        lqw.orderByDesc(BaseEntityWithoutPlatform::getCreateTime);
         return lqw;
     }