From d671f1e6611902e2e4d59443f556c421dfc999d7 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Wed, 09 Jun 2021 11:36:49 +0800
Subject: [PATCH] screen-manage                  更新后台账号更新角色日志逻辑

---
 screen-manage/src/main/java/com/moral/api/service/impl/ManageRoleServiceImpl.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/screen-manage/src/main/java/com/moral/api/service/impl/ManageRoleServiceImpl.java b/screen-manage/src/main/java/com/moral/api/service/impl/ManageRoleServiceImpl.java
index 6f2cb80..4877afb 100644
--- a/screen-manage/src/main/java/com/moral/api/service/impl/ManageRoleServiceImpl.java
+++ b/screen-manage/src/main/java/com/moral/api/service/impl/ManageRoleServiceImpl.java
@@ -12,6 +12,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.ObjectUtils;
 import org.springframework.util.StringUtils;
 import org.springframework.web.context.request.RequestContextHolder;
 import org.springframework.web.context.request.ServletRequestAttributes;
@@ -237,6 +238,21 @@
         return resultMap;
     }
 
+    @Override
+    public ManageRole getRoleByAccountId(Integer accountId) {
+        QueryWrapper<ManageAccountRole> queryAccountRoleWrapper = new QueryWrapper<>();
+        queryAccountRoleWrapper.eq("is_delete",Constants.NOT_DELETE);
+        queryAccountRoleWrapper.eq("account_id",accountId);
+        ManageAccountRole accountRole = manageAccountRoleMapper.selectOne(queryAccountRoleWrapper);
+        if(ObjectUtils.isEmpty(accountRole))
+            return null;
+        Integer roleId = accountRole.getRoleId();
+        QueryWrapper<ManageRole> queryRoleWrapper = new QueryWrapper();
+        queryRoleWrapper.eq("is_delete", Constants.NOT_DELETE);
+        queryRoleWrapper.eq("id", roleId);
+        return  manageRoleMapper.selectOne(queryRoleWrapper);
+    }
+
     /**
      * @Description: ���������������
      * @Param: [list, menuId]list���menuId������

--
Gitblit v1.8.0