package com.zhangmeng.admin.manager.service.impl;

import com.zhangmeng.admin.manager.service.RolePermissionService;
import com.zhangmeng.model.base.baseService.impl.AbstractBaseServiceImpl;
import com.zhangmeng.model.entity.RolePermission;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Condition;
import tk.mybatis.mapper.entity.Example;

import java.util.List;


@Service
public class RolePermissionServiceImpl extends AbstractBaseServiceImpl<RolePermission> implements RolePermissionService {

    @Override
    public List<RolePermission> findByRoleId(Long roleId) {
        Condition condition = new Condition(RolePermission.class);
        Example.Criteria criteria = condition.createCriteria();
        criteria.andEqualTo("role_id",roleId);
        return this.findByCondition(condition);
    }
}
