com.base4j.mvc.sys.mapper.SysResourceMapper Maven / Gradle / Ivy
package com.base4j.mvc.sys.mapper;
import com.base4j.mvc.sys.entity.SysResource;
import com.base4j.mybatis.base.mapper.BaseMapper;
import com.base4j.mybatis.config.mybatis.annotations.AutoMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@AutoMapper
public interface SysResourceMapper extends BaseMapper {
@Select("select sr.*, sr.parent_id as parentId, sr.order_by as orderBy from SEED_SYS_RESOURCE sr where EXISTS " +
"(select srr.id from SEED_SYS_ROLE_RESOURCE srr where sr.id = srr.SYS_RESOURCE_ID and srr.SYS_ROLE_ID in ${userId})")
List findResourceForLoginUser(@Param("userId") String roleIds);
@Select("select id,parent_id as parentId, types, code, name, url, order_by as orderBy, icon " +
"from SEED_SYS_RESOURCE")
List selectListAll();
List selectAllOrgs();
List selectChildNumListByParentId(@Param("parentId") long parentId);
List selectListByName(@Param("name") String name );
}