本文整理汇总了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);
示例2: getAllUsers
import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select * from users")
@ResultType(User.class)
void getAllUsers(UserResultHandler resultHandler);
示例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);
示例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);
示例5: getDictionaryList
import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select(value = "")
@ResultType(Dictionary.class)
public Dictionary getDictionaryList(@Param(value = "keyword") String keyword);
示例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);
示例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);
示例8: findPage
import org.apache.ibatis.annotations.ResultType; //导入依赖的package包/类
@Select("select * from user")
@ResultType(User.class)
public Page<User> findPage(Pageable pageRequest);
示例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);
示例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);
示例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);
示例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);
示例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);