Explorar o código

入职登记修改新增角色和岗位,中审会计项目登记项目经理查询项调整

sangwenwei hai 6 meses
pai
achega
bbe6b08732
Modificáronse 14 ficheiros con 230 adicións e 25 borrados
  1. 2 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java
  2. 17 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml
  3. 22 1
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java
  4. 9 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/domain/EnrollmentRegistration.java
  5. 2 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/xml/EnrollmentRegistrationMapper.xml
  6. 82 22
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java
  7. 21 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/PostController.java
  8. 20 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/RoleController.java
  9. 9 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/PostMapper.java
  10. 5 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/RoleMapper.java
  11. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/PostMapper.xml
  12. 4 1
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/RoleMapper.xml
  13. 5 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/PostService.java
  14. 10 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/RoleService.java

+ 2 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/ReimbursementInfoMapper.java

@@ -107,4 +107,6 @@ public interface ReimbursementInfoMapper extends BaseMapper<ReimbursementInfo> {
     List<TreeUserDto> findOfficeListByIdList(@Param("idList") List<String> idList);
 
     void updatePaymentById(@Param("id") String id,@Param("paymentStatus") String paymentStatus);
+    @InterceptorIgnore(tenantLine = "true")
+    List<TreeUserDto> findZhglgsUserList3(@Param("name")String name, @Param("officeId")String officeId);
 }

+ 17 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -224,6 +224,23 @@
 		</if>
 	</select>
 
+	<select id="findZhglgsUserList3" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.TreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		WHERE
+		a.del_flag = 0 and a.is_admin is null and a.tenant_id = '10004' and a.login_flag = '1' and a.office_id = #{officeId}
+		<if test="name != null and name != ''">
+			and a.`name` LIKE CONCAT ('%', #{name}, '%')
+		</if>
+	</select>
+
 
 	<select id="findExportList" resultType="com.jeeplus.assess.reimbursement.reimbursementInfo.service.dto.RetureListDto">
 		SELECT

+ 22 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/service/ReimbursementInfoService.java

@@ -1024,7 +1024,7 @@ public class ReimbursementInfoService {
         List<TreeUserDto> officeAllList = infoMapper.findOfficeListByIdList(strings);
 
         // 查询部门
-        if(userDTO.isAdmin() || (null != userDTO.getTenantDTO() && "10002".equals(userDTO.getTenantDTO().getId()))){
+        if(userDTO.isAdmin() || (null != userDTO.getTenantDTO() && "10002".equals(userDTO.getTenantDTO().getId()))|| (null != userDTO.getTenantDTO() && "10004".equals(userDTO.getTenantDTO().getId()))){
             officeList = infoMapper.findOfficeListByNotTenantId("10000");
         }else{
             officeList = infoMapper.findOfficeListByCompanyId(userDTO.getCompanyDTO().getId());
@@ -1036,6 +1036,24 @@ public class ReimbursementInfoService {
         UserDTO dtoByName = SpringUtil.getBean(IUserApi.class).getByLoginNameNoTen("潘中");
         List<TreeUserDto> officeList1 = infoMapper.findOfficeListByCompanyId2(dtoByName.getCompanyDTO().getId());
         filterList.addAll(officeList1);
+        //当前登录人所属部门是中审江苏分所下的管理咨询部时
+        List<TreeUserDto> zsUserList = null;
+        String officeId = "";
+        for (TreeUserDto dto : officeList) {
+            if (dto.getName().equals("管理咨询部")){
+                officeId = dto.getId();
+                break;
+            }
+
+        }
+        if (userDTO.isAdmin() || (StringUtils.isNotBlank(officeId) && userDTO.getOfficeDTO().getId().equals(officeId))){
+            List<TreeUserDto> zsOfficeList = infoMapper.findOfficeListByCompanyId2(officeId);
+            filterList.addAll(zsOfficeList);
+            //查询管理咨询部下的用户信息
+            zsUserList=infoMapper.findZhglgsUserList3(name,officeId);
+        }
+
+
         ArrayList<TreeUserDto> treeUsers = new ArrayList<>();
 
         //如果当前登录人是会计公司,则查询有资质的员工
@@ -1054,6 +1072,9 @@ public class ReimbursementInfoService {
 //        treeUserDtos.addAll(userList);
         treeUserDtos.addAll(userList1);
         treeUserDtos.addAll(treeUsers);
+        if (zsUserList != null){
+            treeUserDtos.addAll(zsUserList);
+        }
         list = disposeUserTree(treeUserDtos, filterList);
         for (TreeUserDto officeDto : officeList) {
             if("0".equals(officeDto.getParentId())){

+ 9 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/domain/EnrollmentRegistration.java

@@ -1,10 +1,13 @@
 package com.jeeplus.human.enrollment.enrollmentRegistration.domain;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 入职人员登记
  * @author 王强
@@ -81,4 +84,10 @@ public class EnrollmentRegistration extends BaseEntity {
     private String gsAccountHolderOpposite;
     @TableField(exist = false)
     private String isPc; //用来判断是否是从电脑端发起的入职流程
+    @TableField(exist = false)
+    private String wageCardId; //工资卡id
+    @TableField(exist = false)
+    private List<String> roleIdList;
+    @TableField(exist = false)
+    private List<String> postIdList;
 }

+ 2 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/mapper/xml/EnrollmentRegistrationMapper.xml

@@ -91,7 +91,8 @@
         c.gs_bank_card_number as gsBankCardNumber,
         c.gs_account_holder as gsAccountHolder,
         c.gs_account_holder_front as gsAccountHolderFront,
-        c.gs_account_holder_opposite as gsAccountHolderOpposite
+        c.gs_account_holder_opposite as gsAccountHolderOpposite,
+        c.id as wageCardId
         from human_resources_enrollment_registration a
         left join human_resources_enrollment_social_security_card b on a.id = b.enrollment_registration_id and b.del_flag = '0'
         left join human_resources_enrollment_wage_card c on a.id = c.enrollment_registration_id and c.del_flag = '0'

+ 82 - 22
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.human.enrollment.enrollmentRegistration.service;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.TypeReference;
@@ -17,6 +18,7 @@ import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentSoci
 import com.jeeplus.human.enrollment.enrollmentRegistration.domain.EnrollmentWageCard;
 import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentRegistrationMapper;
 import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentSocialSecurityCardMapper;
+import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentWageCardMapper;
 import com.jeeplus.human.enrollment.enrollmentRegistration.utils.SnowFlake;
 import com.jeeplus.human.practice.register.domain.Registration;
 import com.jeeplus.sys.feign.IOfficeApi;
@@ -56,6 +58,9 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
     @Resource
     private EnrollmentKeyCardService keyCardService;
 
+    @Resource
+    private EnrollmentWageCardMapper wageCardMapper;
+
     /**
      * 实习人员登记表信息
      * @param page
@@ -465,6 +470,24 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
     public EnrollmentRegistration findById(String id) throws Exception {
         // 查询基础信息表
         EnrollmentRegistration info = mapper.getById(id);
+        //根据用户查询岗位和角色信息
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getById(info.getUserId());
+        ArrayList<String> roles = new ArrayList<>();
+        ArrayList<String> posts = new ArrayList<>();
+        if (userDTO != null){
+            if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
+                for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
+                    roles.add(roleDTO.getId());
+                }
+            }
+            if (CollectionUtil.isNotEmpty(userDTO.getPostDTOList())){
+                for (PostDTO postDTO : userDTO.getPostDTOList()) {
+                    posts.add(postDTO.getId());
+                }
+            }
+        }
+        info.setRoleIdList(roles);
+        info.setPostIdList(posts);
         return info;
     }
 
@@ -557,6 +580,24 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
         }
 
         /**
+         * 修改工资卡信息
+         */
+        EnrollmentWageCard wageCard = new EnrollmentWageCard();
+        wageCard.setEnrollmentRegistrationId(report.getId());
+        wageCard.setId(report.getWageCardId());
+        wageCard.setAccountHolderFront(report.getAccountHolderFront());
+        wageCard.setAccountHolderOpposite(report.getAccountHolderOpposite());
+        wageCard.setZxAccountHolder(report.getZxAccountHolder());
+        wageCard.setGsAccountHolder(report.getGsAccountHolder());
+        wageCard.setGsAccountHolderFront(report.getGsAccountHolderFront());
+        wageCard.setGsAccountHolderOpposite(report.getGsAccountHolderOpposite());
+        wageCard.setZxBankCardNumber(report.getZxBankCardNumber());
+        wageCard.setGsBankCardNumber(report.getGsBankCardNumber());
+        wageCardService.saveOrUpdate(wageCard);
+
+
+
+        /**
          * 修改用户信息
          */
         EnrollmentRegistration registration = mapper.getById(reportData.getId());
@@ -577,32 +618,51 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
                 OfficeDTO officeDTO1 = new OfficeDTO();
                 officeDTO1.setId(officeDTO.getParent().getId());
                 dto1.setCompanyDTO(officeDTO1);
+                //角色和岗位信息
                 List <RoleDTO> roleIdList = new ArrayList<>();
-
-                if (null != officeDTO) {
-                    Map<String,String> keyMap = new HashMap<>();
-                    TenantDTO tenantDTO = new TenantDTO();
-                    tenantDTO.setId(officeDTO.getTenantId());
-                    dto1.setTenantDTO(tenantDTO);
-                    if (officeDTO.getTenantId().equals("10003")){
-                        keyMap.put("name", "兴光会计员工,共有权限(会计)");
-                        keyMap.put("tenantId", officeDTO.getTenantId());
-                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
-                    }else if (officeDTO.getTenantId().equals("10004")) {
-                        keyMap.put("name", "中审员工,共有权限(中审)");
-                        keyMap.put("tenantId", officeDTO.getTenantId());
-                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
-                    }else if (officeDTO.getTenantId().equals("10001")) {
-                        keyMap.put("name", "评估员工,共有权限(评估)");
-                        keyMap.put("tenantId", officeDTO.getTenantId());
-                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
+                List <PostDTO> postDTOList = new ArrayList<>();
+                if (CollectionUtil.isNotEmpty(reportData.getPostIdList())){
+                    for (String post : reportData.getPostIdList()) {
+                        PostDTO postDTO = new PostDTO();
+                        postDTO.setId(post);
+                        postDTOList.add(postDTO);
+                    }
+                }
+                if (CollectionUtil.isNotEmpty(reportData.getRoleIdList())){
+                    for (String role : reportData.getRoleIdList()) {
+                        RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(role);
+                        roleIdList.add(roleDTO);
                     }
-                } else {
-                    TenantDTO tenantDTO = new TenantDTO();
-                    tenantDTO.setId("10002");
-                    dto1.setTenantDTO(tenantDTO);
                 }
+                //所属租户
+                TenantDTO tenantDTO = new TenantDTO();
+                tenantDTO.setId(officeDTO.getTenantId());
+                dto1.setTenantDTO(tenantDTO);
+//                if (null != officeDTO) {
+//                    Map<String,String> keyMap = new HashMap<>();
+//                    TenantDTO tenantDTO = new TenantDTO();
+//                    tenantDTO.setId(officeDTO.getTenantId());
+//                    dto1.setTenantDTO(tenantDTO);
+//                    if (officeDTO.getTenantId().equals("10003")){
+//                        keyMap.put("name", "兴光会计员工,共有权限(会计)");
+//                        keyMap.put("tenantId", officeDTO.getTenantId());
+//                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
+//                    }else if (officeDTO.getTenantId().equals("10004")) {
+//                        keyMap.put("name", "中审员工,共有权限(中审)");
+//                        keyMap.put("tenantId", officeDTO.getTenantId());
+//                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
+//                    }else if (officeDTO.getTenantId().equals("10001")) {
+//                        keyMap.put("name", "评估员工,共有权限(评估)");
+//                        keyMap.put("tenantId", officeDTO.getTenantId());
+//                        roleIdList = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId(keyMap);
+//                    }
+//                } else {
+//                    TenantDTO tenantDTO = new TenantDTO();
+//                    tenantDTO.setId("10002");
+//                    dto1.setTenantDTO(tenantDTO);
+//                }
                 dto1.setRoleDTOList(roleIdList);
+                dto1.setPostDTOList(postDTOList);
                 SpringUtil.getBean ( IUserApi.class ).saveOrUpdate(dto1);
 
 

+ 21 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/PostController.java

@@ -3,6 +3,7 @@
  */
 package com.jeeplus.sys.controller;
 
+import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -10,7 +11,9 @@ import com.google.common.collect.Lists;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.sys.domain.Post;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.service.PostService;
+import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.PostDTO;
 import com.jeeplus.sys.service.mapstruct.PostWrapper;
 import io.swagger.annotations.Api;
@@ -20,6 +23,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * 岗位Controller
@@ -53,6 +57,23 @@ public class PostController {
     }
 
     /**
+     * 获取岗位列表数据
+     *
+     * @param post
+     * @param page
+     * @return
+     * @throws Exception
+     */
+    @ApiLog("查询岗位列表")
+    @GetMapping("list2")
+    public ResponseEntity list2(@RequestParam String department) throws Exception {
+        OfficeDTO officeDTO = SpringUtil.getBean(IOfficeApi.class).getOfficeById(department);
+
+        List<Post> result = postService.getPostByTenant(officeDTO.getTenantId());
+        return ResponseEntity.ok ( result );
+    }
+
+    /**
      * 查询岗位数据
      *
      * @param id

+ 20 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/RoleController.java

@@ -4,6 +4,7 @@
 package com.jeeplus.sys.controller;
 
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -11,9 +12,12 @@ import com.jeeplus.aop.demo.annotation.DemoMode;
 import com.jeeplus.common.constant.CommonConstants;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.logging.annotation.ApiLog;
+import com.jeeplus.sys.domain.Post;
 import com.jeeplus.sys.domain.Role;
+import com.jeeplus.sys.feign.IOfficeApi;
 import com.jeeplus.sys.service.RoleService;
 import com.jeeplus.sys.service.UserService;
+import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.RoleDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.UserUtils;
@@ -24,6 +28,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * 角色Controller
@@ -56,6 +61,21 @@ public class RoleController {
         return ResponseEntity.ok ( result );
     }
 
+    /**
+     * 角色列表数据
+     *
+     * @param role
+     * @param page
+     * @return
+     */
+    @ApiLog("查询角色列表")
+    @GetMapping("list2")
+    public ResponseEntity data2(@RequestParam String department) throws Exception {
+        OfficeDTO officeDTO = SpringUtil.getBean(IOfficeApi.class).getOfficeById(department);
+        List<Role> result = roleService.getRoleByTenant(officeDTO.getTenantId());
+        return ResponseEntity.ok ( result );
+    }
+
 
     /**
      * 按id查询

+ 9 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/PostMapper.java

@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.sys.domain.Post;
 import com.jeeplus.sys.service.dto.PostDTO;
 
+import java.util.List;
+
 /**
  * 岗位MAPPER接口
  *
@@ -24,4 +26,11 @@ public interface PostMapper extends BaseMapper <Post> {
     @InterceptorIgnore(tenantLine = "true")
     PostDTO getPostDTOByName(String name);
 
+    /**
+     * 根据租户查询岗位信息
+     * @param tenantId
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<Post> getPostByTenant(String tenantId);
 }

+ 5 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/RoleMapper.java

@@ -76,4 +76,9 @@ public interface RoleMapper extends BaseMapper <Role> {
      */
     @InterceptorIgnore(tenantLine = "true")
     RoleDTO getRoleDTOByIdForApp(@Param("id")String id);
+    /*8
+    根据租户获取角色信息
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<Role> getRoleByTenant(@Param("tenantId")String tenantId);
 }

+ 22 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/PostMapper.xml

@@ -24,4 +24,26 @@
             and NAME = #{name}
         limit 1
     </select>
+
+    <select id="getPostByTenant" resultType="com.jeeplus.sys.domain.Post">
+        SELECT
+            id,
+            NAME,
+            CODE,
+            type,
+            STATUS,
+            sort,
+            remarks,
+            create_time,
+            create_by_id,
+            update_time,
+            update_by_id,
+            del_flag,
+            tenant_id
+        FROM
+            sys_post
+        WHERE
+            del_flag = 0
+            and tenant_id = #{tenantId}
+    </select>
 </mapper>

+ 4 - 1
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/RoleMapper.xml

@@ -37,7 +37,10 @@
         SELECT id, name, en_name, is_sys AS sysData, useable, remarks, create_time, create_by_id, update_time,
         update_by_id, del_flag, tenant_id FROM sys_role WHERE del_flag = 0 AND id = #{id}
     </select>
-
+    <select id="getRoleByTenant" resultType="com.jeeplus.sys.domain.Role">
+        SELECT id, name, en_name, is_sys AS sysData, useable, remarks, create_time, create_by_id, update_time,
+        update_by_id, del_flag, tenant_id FROM sys_role WHERE del_flag = 0 and tenant_id = #{tenantId}
+    </select>
     <!--维护角色与菜单权限关系-->
     <delete id="deleteRoleMenu">
         DELETE

+ 5 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/PostService.java

@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
+
 /**
  * 岗位Service
  *
@@ -29,4 +31,7 @@ public class PostService extends ServiceImpl <PostMapper, Post> {
         return postDTO;
     }
 
+    public List<Post> getPostByTenant(String tenantId) {
+        return mapper.getPostByTenant(tenantId);
+    }
 }

+ 10 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/RoleService.java

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.constant.CacheNames;
+import com.jeeplus.sys.domain.Post;
 import com.jeeplus.sys.domain.Role;
 import com.jeeplus.sys.mapper.RoleMapper;
 import com.jeeplus.sys.service.dto.RoleDTO;
@@ -204,4 +205,13 @@ public class RoleService extends ServiceImpl <RoleMapper, Role> {
         RoleDTO roleDTO = baseMapper.getRoleDTOByIdForApp(id);
         return roleDTO;
     }
+
+    /**
+     * 根据租户获取角色信息
+     * @param tenantId
+     * @return
+     */
+    public List<Role> getRoleByTenant(String tenantId) {
+        return baseMapper.getRoleByTenant(tenantId);
+    }
 }