Преглед изворни кода

订单详情返回是否能开发票字段

qmj пре 1 недеља
родитељ
комит
828613562b
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/app/order/OrderInvoiceService.java

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/app/order/OrderInvoiceService.java

@@ -186,7 +186,7 @@ public class OrderInvoiceService {
 
 
     /** 客户查询订单发票;门店不可开票时 invoiceStatus=null(客户端据此隐藏入口)。 */
     /** 客户查询订单发票;门店不可开票时 invoiceStatus=null(客户端据此隐藏入口)。 */
     public PosOrderInvoiceVo getInvoice(Long orderId, Long currentUserId) {
     public PosOrderInvoiceVo getInvoice(Long orderId, Long currentUserId) {
-        PosOrder order = posOrderMapper.selectPosOrderById(orderId);
+        PosOrder order = posOrderMapper.selectOne(new LambdaQueryWrapper<PosOrder>().eq(PosOrder::getDdId,orderId));
         if (order == null || !Objects.equals(order.getUserId(), currentUserId)) {
         if (order == null || !Objects.equals(order.getUserId(), currentUserId)) {
             throw new ServiceException("订单不存在");
             throw new ServiceException("订单不存在");
         }
         }