From 0ab919187081583c07a9b7654050f6e8741628dc Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Sat, 27 Sep 2025 23:13:16 +0800
Subject: [PATCH] 运费计算器

---
 oying-system/src/main/java/com/oying/modules/system/service/impl/MerchantServiceImpl.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/system/service/impl/MerchantServiceImpl.java b/oying-system/src/main/java/com/oying/modules/system/service/impl/MerchantServiceImpl.java
index 5e17186..5dd4a8f 100644
--- a/oying-system/src/main/java/com/oying/modules/system/service/impl/MerchantServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/system/service/impl/MerchantServiceImpl.java
@@ -16,12 +16,9 @@
 import org.springframework.transaction.annotation.Transactional;
 import com.oying.utils.PageUtil;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.io.IOException;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
 
 import com.oying.utils.PageResult;
 
@@ -48,6 +45,11 @@
     }
 
     @Override
+    public List<Merchant> findByUserId(Long userId) {
+        return merchantMapper.findByUserId(userId);
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class)
     public void create(Merchant resources) {
         resources.setMerchantCode(IdUtil.getSnowflakeNextIdStr());
@@ -55,7 +57,7 @@
         UserMerchant userMerchant = new UserMerchant();
         userMerchant.setMerchantId(resources.getMerchantId());
         userMerchant.setUserId(resources.getUserId());
-        userMerchant.setRoleType(MerchantRole.OWNER.getRole());
+        userMerchant.setRoleType(MerchantRole.ADMIN.getRole());
         userMerchantService.create(userMerchant);
     }
 

--
Gitblit v1.9.3