From 8d6b17bfa56fd767c6f9de666eb0dd44c6b032cd Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 22 五月 2025 15:42:38 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/service/userInfo/RoleService.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/RoleService.java b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/RoleService.java
new file mode 100644
index 0000000..371aaf6
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/RoleService.java
@@ -0,0 +1,31 @@
+package com.example.erp.service.userInfo;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.example.erp.entity.userInfo.Role;
+import com.example.erp.mapper.userInfo.RoleMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+@DS("user_info")
+public class RoleService {
+ private final RoleMapper roleMapper;
+
+ public RoleService(RoleMapper roleMapper) {
+ this.roleMapper = roleMapper;
+ }
+
+ public List<Role> findAll() {
+ return roleMapper.selectList(
+ new QueryWrapper<Role>()
+ .ne("role","admin")
+ );
+ }
+
+ public Boolean add(Role role) {
+
+ return roleMapper.insert(role) > 0;
+ }
+}
--
Gitblit v1.8.0