Ver código fonte

fixed 收银台默认店铺问题

fushengqian 1 ano atrás
pai
commit
2781aae1a8

+ 6 - 3
fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java

@@ -629,9 +629,12 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
             storeId = accountInfo.getStoreId();
             merchantId = accountInfo.getMerchantId();
             if (storeId <= 0) {
-                MtStore mtStore = storeService.getDefaultStore(merchantNo);
-                if (mtStore != null) {
-                    storeId = mtStore.getId();
+                MtMerchant mtMerchant = merchantService.queryMerchantById(merchantId);
+                if (mtMerchant != null) {
+                    MtStore mtStore = storeService.getDefaultStore(mtMerchant.getNo());
+                    if (mtStore != null) {
+                        storeId = mtStore.getId();
+                    }
                 }
             }
             if (userId < 1) {