From 66772a2d80b2612cea4e1e5740c9df3d2f672a39 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 25 Sep 2025 21:51:20 +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