当前位置: 首页>>代码示例>>Java>>正文


Java ResultType类代码示例

本文整理汇总了Java中org.apache.ibatis.annotations.ResultType的典型用法代码示例。如果您正苦于以下问题:Java ResultType类的具体用法?Java ResultType怎么用?Java ResultType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ResultType类属于org.apache.ibatis.annotations包,在下文中一共展示了ResultType类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectRoleIdListByUserId

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select role_id AS roleId from user_role where user_id = #{userId}")
@ResultType(Long.class)
List<Long> selectRoleIdListByUserId(@Param("userId") Long userId);
 
开发者ID:TomChen001,项目名称:xmanager,代码行数:4,代码来源:UserRoleMapper.java

示例2: getAllUsers

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:4,代码来源:Mapper.java

示例3: FIND_IN_SET

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@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);
 
开发者ID:xmomen,项目名称:dms-webapp,代码行数:4,代码来源:ItemCategoryMapper.java

示例4: getRoleList

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@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);
 
开发者ID:xmomen,项目名称:dms-webapp,代码行数:4,代码来源:UserMapper.java

示例5: getDictionaryList

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select(value = "")
@ResultType(Dictionary.class)
public Dictionary getDictionaryList(@Param(value = "keyword") String keyword);
 
开发者ID:xmomen,项目名称:dms-webapp,代码行数:4,代码来源:DictionaryMapper.java

示例6: FIND_IN_SET

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@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);
 
开发者ID:xmomen,项目名称:dms-webapp,代码行数:4,代码来源:OrganizationMapper.java

示例7: selectWordCountTopN

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
/**
 * 查询词频统计结果,查询频次开前的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);
 
开发者ID:huge-data,项目名称:storm-sentiment,代码行数:9,代码来源:WordCountDao.java

示例8: findPage

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select * from user")
@ResultType(User.class)
public Page<User> findPage(Pageable pageRequest);
 
开发者ID:buzheng,项目名称:mybatis-pageable,代码行数:4,代码来源:AnnotateUserMapper.java

示例9: findPageByFirstName

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select * from user where firstName = #{firstName}")
@ResultType(User.class)
public Page<User> findPageByFirstName(@Param("firstName") String firstName, Pageable pageRequest);
 
开发者ID:buzheng,项目名称:mybatis-pageable,代码行数:4,代码来源:AnnotateUserMapper.java

示例10: getPermissionList

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
/**
 * 查询用户所有权限
 * @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);
 
开发者ID:xmomen,项目名称:dms-webapp,代码行数:9,代码来源:UserMapper.java

示例11: selectByCriteria

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
/**
 * 条件查询
 * 自定议显示字段传入 model.params,为空时为所有字段
 * 条件传入model.QueryCriteria
 * @param model
 * @return
 */
@SelectProvider(method = "selectByCriteria", type = SqlTemplate.class)
@ResultType(value = List.class)
List<Map<String, Object>> selectByCriteria(Table model);
 
开发者ID:uncodecn,项目名称:uncode-dal-all,代码行数:11,代码来源:CommonMapper.java

示例12: selectByPrimaryKey

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
/**
 * 主键查询
 * 自定议显示字段传入 model.params,为空时为所有字段
 * 主键参数传入 model.conditions,不能为空
 * @param model
 * @return
 */
@SelectProvider(method = "selectByPrimaryKey", type = SqlTemplate.class)
@ResultType(value = Map.class)
Map<String, Object> selectByPrimaryKey(Table model);
 
开发者ID:uncodecn,项目名称:uncode-dal-all,代码行数:11,代码来源:CommonMapper.java

示例13: countByCriteria

import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
/**
 * 条件count
 * 条件传入model.QueryCriteria
 * @param model
 * @return
 */
@SelectProvider(method = "countByCriteria", type = SqlTemplate.class)
@ResultType(value = Integer.class)
int countByCriteria(Table model);
 
开发者ID:uncodecn,项目名称:uncode-dal-all,代码行数:10,代码来源:CommonMapper.java


注:本文中的org.apache.ibatis.annotations.ResultType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。