Java 类org.apache.ibatis.annotations.ResultType 实例源码

项目:xmanager    文件:UserRoleMapper.java   
@Select("select role_id AS roleId from user_role where user_id = #{userId}")
@ResultType(Long.class)
List<Long> selectRoleIdListByUserId(@Param("userId") Long userId);
项目:MybatisCode    文件:Mapper.java   
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
项目:dms-webapp    文件:ItemCategoryMapper.java   
@Select(value = "SELECT s.ID,s.CATEGORY_NAME AS name, s.PARENT_ID,p.CATEGORY_NAME AS parent_name FROM cd_category s LEFT JOIN cd_category p ON p.ID=s.PARENT_ID where FIND_IN_SET(s.id, query_children_category(${id}))")
@ResultType(ItemCategoryModel.class)
public List<ItemCategoryModel> getItemCategoryTree(@Param(value = "id") Integer id);
项目:dms-webapp    文件:UserMapper.java   
@Select("select r.* from sys_roles r left join sys_users_roles ur on ur.role_id = r.id left join sys_users u on u.id=ur.user_id where u.username = #{username}")
@ResultType(SysRoles.class)
public List<SysRoles> getRoleList(String username);
项目:dms-webapp    文件:DictionaryMapper.java   
@Select(value = "")
@ResultType(Dictionary.class)
public Dictionary getDictionaryList(@Param(value = "keyword") String keyword);
项目:dms-webapp    文件:OrganizationMapper.java   
@Select(value = "SELECT s.ID,s.NAME,s.DESCRIPTION, s.PARENT_ID,p.NAME AS parent_name FROM sys_organization s LEFT JOIN sys_organization p ON p.ID=s.PARENT_ID where FIND_IN_SET(s.id, query_children_organization(${id}))")
@ResultType(OrganizationModel.class)
public List<OrganizationModel> getOrganizationTree(@Param(value = "id") Integer id);
项目:mybatis    文件:Mapper.java   
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
项目:mybaties    文件:Mapper.java   
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
项目:play    文件:Mapper.java   
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
项目:storm-sentiment    文件:WordCountDao.java   
/**
 * 查询词频统计结果,查询频次开前的N个结果
 */
@Select("SELECT `word`,`count` FROM `wordcount` ORDER BY `count` DESC LIMIT #{N}")
@ConstructorArgs(value = { @Arg(column = "word", javaType = String.class),
        @Arg(column = "count", javaType = Integer.class) })
@ResultType(value = WordAndCount.class)
public List<WordAndCount> selectWordCountTopN(int N);
项目:mybatis-pageable    文件:AnnotateUserMapper.java   
@Select("select * from user")
@ResultType(User.class)
public Page<User> findPage(Pageable pageRequest);
项目:mybatis-pageable    文件:AnnotateUserMapper.java   
@Select("select * from user where firstName = #{firstName}")
@ResultType(User.class)
public Page<User> findPageByFirstName(@Param("firstName") String firstName, Pageable pageRequest);
项目:mybatis-3    文件:Mapper.java   
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
项目:dms-webapp    文件:UserMapper.java   
/**
 * 查询用户所有权限
 * @param username
 * @return
 */
@Select("select p.* from sys_permissions p left join `sys_roles_permissions` rp on rp.`PERMISSION_ID`=p.`ID` left join sys_roles r on rp.`ROLE_ID`=r.`ID` left join sys_users_roles ur on ur.role_id = r.id left join sys_users u on u.id=ur.user_id where u.username = #{username}")
@ResultType(SysPermissions.class)
public List<SysPermissions> getPermissionList(String username);
项目:uncode-dal-all    文件:CommonMapper.java   
/**
 * 条件查询
 * 自定议显示字段传入 model.params,为空时为所有字段
 * 条件传入model.QueryCriteria
 * @param model
 * @return
 */
@SelectProvider(method = "selectByCriteria", type = SqlTemplate.class)
@ResultType(value = List.class)
List<Map<String, Object>> selectByCriteria(Table model);
项目:uncode-dal-all    文件:CommonMapper.java   
/**
 * 主键查询
 * 自定议显示字段传入 model.params,为空时为所有字段
 * 主键参数传入 model.conditions,不能为空
 * @param model
 * @return
 */
@SelectProvider(method = "selectByPrimaryKey", type = SqlTemplate.class)
@ResultType(value = Map.class)
Map<String, Object> selectByPrimaryKey(Table model);
项目:uncode-dal-all    文件:CommonMapper.java   
/**
 * 条件count
 * 条件传入model.QueryCriteria
 * @param model
 * @return
 */
@SelectProvider(method = "countByCriteria", type = SqlTemplate.class)
@ResultType(value = Integer.class)
int countByCriteria(Table model);