package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.dao.TBUserRoleMapper;
import com.qmth.themis.business.entity.TBUser;
import com.qmth.themis.business.entity.TBUserRole;
import com.qmth.themis.business.service.TBUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 用户角色 服务实现类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@Service
public class TBUserRoleServiceImpl extends ServiceImpl<TBUserRoleMapper, TBUserRole> implements TBUserRoleService {

    @Resource
    TBUserRoleMapper tbUserRoleMapper;

    /**
     * 根据机构id+角色查询用户
     *
     * @param orgId
     * @param roleCode
     * @return
     */
    @Override
    public List<TBUser> userQueryByRole(Long orgId, String roleCode) {
        return tbUserRoleMapper.userQueryByRole(orgId, roleCode);
    }
}
