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

项目:taskana    文件:QueryMapper.java   
@Select("<script>SELECT ID, COMPANY, SYSTEM, SYSTEM_INSTANCE, TYPE, VALUE "
    + "FROM OBJECT_REFERENCE "
    + "<where>"
    + "<if test='company != null'>AND COMPANY IN(<foreach item='item' collection='company' separator=',' >#{item}</foreach>)</if> "
    + "<if test='system != null'>AND SYSTEM IN(<foreach item='item' collection='system' separator=',' >#{item}</foreach>)</if> "
    + "<if test='systemInstance != null'>AND SYSTEM_INSTANCE IN(<foreach item='item' collection='systemInstance' separator=',' >#{item}</foreach>)</if> "
    + "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
    + "<if test='value != null'>AND VALUE IN(<foreach item='item' collection='value' separator=',' >#{item}</foreach>)</if> "
    + "</where>"
    + "</script>")
@Results({
    @Result(property = "id", column = "ID"),
    @Result(property = "company", column = "COMPANY"),
    @Result(property = "system", column = "SYSTEM"),
    @Result(property = "systemInstance", column = "SYSTEM_INSTANCE"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "value", column = "VALUE")})
List<ObjectReference> queryObjectReference(ObjectReferenceQueryImpl objectReference);
项目:taskana    文件:WorkbasketAccessMapper.java   
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST WHERE ID = #{id}")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "workbasketKey", column = "WORKBASKET_KEY"),
    @Result(property = "accessId", column = "ACCESS_ID"),
    @Result(property = "permRead", column = "PERM_READ"),
    @Result(property = "permOpen", column = "PERM_OPEN"),
    @Result(property = "permAppend", column = "PERM_APPEND"),
    @Result(property = "permTransfer", column = "PERM_TRANSFER"),
    @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"),
    @Result(property = "permCustom1", column = "PERM_CUSTOM_1"),
    @Result(property = "permCustom2", column = "PERM_CUSTOM_2"),
    @Result(property = "permCustom3", column = "PERM_CUSTOM_3"),
    @Result(property = "permCustom4", column = "PERM_CUSTOM_4"),
    @Result(property = "permCustom5", column = "PERM_CUSTOM_5"),
    @Result(property = "permCustom6", column = "PERM_CUSTOM_6"),
    @Result(property = "permCustom7", column = "PERM_CUSTOM_7"),
    @Result(property = "permCustom8", column = "PERM_CUSTOM_8")})
WorkbasketAccessItem findById(@Param("id") String id);
项目:taskana    文件:WorkbasketAccessMapper.java   
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST WHERE WORKBASKET_KEY = #{key}")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "workbasketKey", column = "WORKBASKET_KEY"),
    @Result(property = "accessId", column = "ACCESS_ID"),
    @Result(property = "permRead", column = "PERM_READ"),
    @Result(property = "permOpen", column = "PERM_OPEN"),
    @Result(property = "permAppend", column = "PERM_APPEND"),
    @Result(property = "permTransfer", column = "PERM_TRANSFER"),
    @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"),
    @Result(property = "permCustom1", column = "PERM_CUSTOM_1"),
    @Result(property = "permCustom2", column = "PERM_CUSTOM_2"),
    @Result(property = "permCustom3", column = "PERM_CUSTOM_3"),
    @Result(property = "permCustom4", column = "PERM_CUSTOM_4"),
    @Result(property = "permCustom5", column = "PERM_CUSTOM_5"),
    @Result(property = "permCustom6", column = "PERM_CUSTOM_6"),
    @Result(property = "permCustom7", column = "PERM_CUSTOM_7"),
    @Result(property = "permCustom8", column = "PERM_CUSTOM_8")})
List<WorkbasketAccessItem> findByWorkbasketKey(@Param("key") String key);
项目:taskana    文件:WorkbasketAccessMapper.java   
@Select("SELECT ID, WORKBASKET_KEY, ACCESS_ID, PERM_READ, PERM_OPEN, PERM_APPEND, PERM_TRANSFER, PERM_DISTRIBUTE, PERM_CUSTOM_1, PERM_CUSTOM_2, PERM_CUSTOM_3, PERM_CUSTOM_4, PERM_CUSTOM_5, PERM_CUSTOM_6, PERM_CUSTOM_7, PERM_CUSTOM_8 FROM WORKBASKET_ACCESS_LIST ORDER BY ID")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "workbasketKey", column = "WORKBASKET_KEY"),
    @Result(property = "accessId", column = "ACCESS_ID"),
    @Result(property = "permRead", column = "PERM_READ"),
    @Result(property = "permOpen", column = "PERM_OPEN"),
    @Result(property = "permAppend", column = "PERM_APPEND"),
    @Result(property = "permTransfer", column = "PERM_TRANSFER"),
    @Result(property = "permDistribute", column = "PERM_DISTRIBUTE"),
    @Result(property = "permCustom1", column = "PERM_CUSTOM_1"),
    @Result(property = "permCustom2", column = "PERM_CUSTOM_2"),
    @Result(property = "permCustom3", column = "PERM_CUSTOM_3"),
    @Result(property = "permCustom4", column = "PERM_CUSTOM_4"),
    @Result(property = "permCustom5", column = "PERM_CUSTOM_5"),
    @Result(property = "permCustom6", column = "PERM_CUSTOM_6"),
    @Result(property = "permCustom7", column = "PERM_CUSTOM_7"),
    @Result(property = "permCustom8", column = "PERM_CUSTOM_8")})
List<WorkbasketAccessItem> findAll();
项目:taskana    文件:WorkbasketMapper.java   
@Select("SELECT ID, KEY, CREATED, MODIFIED, NAME, DOMAIN, TYPE, DESCRIPTION, OWNER, CUSTOM_1 ,CUSTOM_2 ,CUSTOM_3 ,CUSTOM_4 ,ORG_LEVEL_1 ,ORG_LEVEL_2 ,ORG_LEVEL_3 ,ORG_LEVEL_4 FROM WORKBASKET WHERE KEY = #{key}")
@Results(value = { @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "created", column = "CREATED"),
    @Result(property = "modified", column = "MODIFIED"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "distributionTargets", column = "ID", javaType = List.class,
        many = @Many(fetchType = FetchType.DEFAULT, select = "findByDistributionTargets")),
    @Result(property = "custom1", column = "CUSTOM_1"),
    @Result(property = "custom2", column = "CUSTOM_2"),
    @Result(property = "custom3", column = "CUSTOM_3"),
    @Result(property = "custom4", column = "CUSTOM_4"),

    @Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
    @Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
    @Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
    @Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
WorkbasketImpl findByKey(@Param("key") String key);
项目:taskana    文件:WorkbasketMapper.java   
@Select("SELECT * FROM WORKBASKET WHERE id IN (SELECT TARGET_ID FROM DISTRIBUTION_TARGETS WHERE SOURCE_ID = #{id})")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "type", column = "TYPE"),

    @Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
    @Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
    @Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
    @Result(property = "orgLevel4", column = "ORG_LEVEL_4")})

List<WorkbasketSummary> findByDistributionTargets(@Param("id") String id);
项目:mybatis-plus-mini    文件:MybatisMapperAnnotationBuilder.java   
private SqlCommandType getSqlCommandType(Method method) {
    Class<? extends Annotation> type = getSqlAnnotationType(method);

    if (type == null) {
        type = getSqlProviderAnnotationType(method);

        if (type == null) {
            return SqlCommandType.UNKNOWN;
        }

        if (type == SelectProvider.class) {
            type = Select.class;
        } else if (type == InsertProvider.class) {
            type = Insert.class;
        } else if (type == UpdateProvider.class) {
            type = Update.class;
        } else if (type == DeleteProvider.class) {
            type = Delete.class;
        }
    }

    return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH));
}
项目:taskana    文件:TaskMonitorMapper.java   
@Select("<script>"
    + "SELECT COUNT (*) "
    + "FROM TASK "
    + "WHERE WORKBASKETID = #{workbasketId} "
    + "AND DUE >= #{fromDate} "
    + "AND STATE IN (<foreach collection='status' item='state' separator=','>#{state}</foreach>)"
    + "</script>")
long getTaskCountForWorkbasketByDaysInPastAndState(@Param("workbasketId") String workbasketId,
    @Param("fromDate") Date fromDate, @Param("status") List<TaskState> states);
项目:taskana    文件:QueryMapper.java   
@Select("<script>SELECT ID, KEY, PARENT_CLASSIFICATION_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, VALID_FROM, VALID_UNTIL "
    + "FROM CLASSIFICATION "
    + "<where>"
    + "<if test='key != null'>AND KEY IN(<foreach item='item' collection='key' separator=',' >#{item}</foreach>)</if> "
    + "<if test='parentClassificationKey != null'>AND PARENT_CLASSIFICATION_KEY IN(<foreach item='item' collection='parentClassificationKey' separator=',' >#{item}</foreach>)</if> "
    + "<if test='category != null'>AND CATEGORY IN(<foreach item='item' collection='category' separator=',' >#{item}</foreach>)</if> "
    + "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
    + "<if test='domain != null'>AND DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
    + "<if test='validInDomain != null'>AND VALID_IN_DOMAIN = #{validInDomain}</if> "
    + "<if test='created != null'>AND CREATED IN(<foreach item='item' collection='created' separator=',' >#{item}</foreach>)</if> "
    + "<if test='name != null'>AND NAME IN(<foreach item='item' collection='name' separator=',' >#{item}</foreach>)</if> "
    + "<if test='description != null'>AND DESCRIPTION like #{description}</if> "
    + "<if test='priority != null'>AND PRIORITY IN(<foreach item='item' collection='priority' separator=',' >#{item}</foreach>)</if> "
    + "<if test='serviceLevel != null'>AND SERVICE_LEVEL IN(<foreach item='item' collection='serviceLevel' separator=',' >#{item}</foreach>)</if> "
    + "<if test='applicationEntryPoint != null'>AND APPLICATION_ENTRY_POINT IN(<foreach item='item' collection='applicationEntryPoint' separator=',' >#{item}</foreach>)</if> "
    + "<if test='customFields != null'>AND (CUSTOM_1 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_2 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_3 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_4 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_5 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_6 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_7 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>) OR CUSTOM_8 IN(<foreach item='item' collection='customFields' separator=',' >#{item}</foreach>))</if> "
    + "<if test='validFrom != null'>AND VALID_FROM IN(<foreach item='item' collection='validFrom' separator=',' >#{item}</foreach>)</if> "
    + "<if test='validUntil != null'>AND VALID_UNTIL IN(<foreach item='item' collection='validUntil' separator=',' >#{item}</foreach>)</if> "
    + "</where>"
    + "</script>")
@Results({@Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "category", column = "CATEGORY"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "name", column = "NAME"),
   @Result(property = "validUntil", column = "VALID_UNTIL")})
List<ClassificationSummaryImpl> queryClassification(ClassificationQueryImpl classificationQuery);
项目:taskana    文件:ObjectReferenceMapper.java   
@Select("SELECT ID, COMPANY, SYSTEM, SYSTEM_INSTANCE, TYPE, VALUE "
        + "FROM OBJECT_REFERENCE "
        + "WHERE COMPANY = #{objectReference.company} "
        + "AND SYSTEM = #{objectReference.system} "
        + "AND SYSTEM_INSTANCE = #{objectReference.systemInstance} "
        + "AND TYPE = #{objectReference.type} "
        + "AND VALUE = #{objectReference.value}")
@Results({
    @Result(property = "id", column = "ID"),
    @Result(property = "company", column = "COMPANY"),
    @Result(property = "system", column = "SYSTEM"),
    @Result(property = "systemInstance", column = "SYSTEM_INSTANCE"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "value", column = "VALUE") })
ObjectReference findByObjectReference(@Param("objectReference") ObjectReference objectReference);
项目:taskana    文件:WorkbasketMapper.java   
@Select("SELECT * FROM WORKBASKET ORDER BY id")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
    @Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
    @Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
    @Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
List<WorkbasketSummary> findAll();
项目:taskana    文件:WorkbasketMapper.java   
@Select("<script>SELECT W.ID, W.KEY, W.NAME, W.DESCRIPTION, W.OWNER, W.DOMAIN, W.TYPE, W.ORG_LEVEL_1, W.ORG_LEVEL_2,  W.ORG_LEVEL_3, W.ORG_LEVEL_4 FROM WORKBASKET AS W "
    + "INNER JOIN WORKBASKET_ACCESS_LIST AS ACL "
    + "ON (W.KEY = ACL.WORKBASKET_KEY AND ACL.ACCESS_ID = #{accessId}) "
    + "WHERE <foreach collection='authorizations' item='authorization' separator=' AND '>"
    + "<if test=\"authorization.name() == 'OPEN'\">PERM_OPEN</if>"
    + "<if test=\"authorization.name() == 'READ'\">PERM_READ</if>"
    + "<if test=\"authorization.name() == 'APPEND'\">PERM_APPEND</if>"
    + "<if test=\"authorization.name() == 'TRANSFER'\">PERM_TRANSFER</if>"
    + "<if test=\"authorization.name() == 'DISTRIBUTE'\">PERM_DISTRIBUTE</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_1'\">PERM_CUSTOM_1</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_2'\">PERM_CUSTOM_2</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_3'\">PERM_CUSTOM_3</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_4'\">PERM_CUSTOM_4</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_5'\">PERM_CUSTOM_5</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_6'\">PERM_CUSTOM_6</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_7'\">PERM_CUSTOM_7</if>"
    + "<if test=\"authorization.name() == 'CUSTOM_8'\">PERM_CUSTOM_8</if> = 1 </foreach> "
    + "ORDER BY id</script>")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "modified", column = "MODIFIED"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "type", column = "TYPE"),

    @Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
    @Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
    @Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
    @Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
List<WorkbasketSummary> findByPermission(@Param("authorizations") List<WorkbasketAuthorization> authorizations,
    @Param("accessId") String accessId);
项目:taskana    文件:ClassificationMapper.java   
@Select("SELECT ID, KEY, PARENT_CLASSIFICATION_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, VALID_FROM, VALID_UNTIL "
    + "FROM CLASSIFICATION "
    + "WHERE KEY = #{key}"
    + "AND DOMAIN = #{domain}"
    + "AND VALID_UNTIL = #{valid_until}")
@Results({ @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "parentClassificationKey", column = "PARENT_CLASSIFICATION_KEY"),
    @Result(property = "category", column = "CATEGORY"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "isValidInDomain", column = "VALID_IN_DOMAIN"),
    @Result(property = "created", column = "CREATED"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "priority", column = "PRIORITY"),
    @Result(property = "serviceLevel", column = "SERVICE_LEVEL"),
    @Result(property = "applicationEntryPoint", column = "APPLICATION_ENTRY_POINT"),
    @Result(property = "custom1", column = "CUSTOM_1"),
    @Result(property = "custom2", column = "CUSTOM_2"),
    @Result(property = "custom3", column = "CUSTOM_3"),
    @Result(property = "custom4", column = "CUSTOM_4"),
    @Result(property = "custom5", column = "CUSTOM_5"),
    @Result(property = "custom6", column = "CUSTOM_6"),
    @Result(property = "custom7", column = "CUSTOM_7"),
    @Result(property = "custom8", column = "CUSTOM_8"),
    @Result(property = "validFrom", column = "VALID_FROM"),
    @Result(property = "validUntil", column = "VALID_UNTIL") })
ClassificationImpl findByKeyAndDomain(@Param("key") String key, @Param("domain") String domain,
    @Param("valid_until") Date validUntil);
项目:china-district-syscode    文件:SysCodeMapper.java   
/**
 * This method was generated by MyBatis Generator.
 * This method corresponds to the database table SysCode
 *
 * @mbggenerated Wed Jul 12 20:57:03 CST 2017
 */
@Select({
    "select",
    "codeId, codeTypeId, codeName, parentCodeId",
    "from SysCode",
    "where codeId = #{codeId,jdbcType=INTEGER}"
})
@Results({
    @Result(column="codeId", property="codeId", jdbcType=JdbcType.INTEGER, id=true),
    @Result(column="codeTypeId", property="codeTypeId", jdbcType=JdbcType.INTEGER),
    @Result(column="codeName", property="codeName", jdbcType=JdbcType.VARCHAR),
    @Result(column="parentCodeId", property="parentCodeId", jdbcType=JdbcType.INTEGER)
})
SysCode selectByPrimaryKey(Integer codeId);
项目:DanmuChat    文件:IUserInfoDao.java   
/**
 * 查询用户信息
 * @param openId
 * @return
 */
@Select("select * from userinfo t where t.openId = #{openId}")
@Results({
        @Result(property = "id", column = "id"),
        @Result(property = "openId", column = "openId"),
        @Result(property = "nickName", column = "nickname"),
        @Result(property = "sex", column = "sex"),
        @Result(property = "language", column = "language"),
        @Result(property = "city", column = "city"),
        @Result(property = "provience", column = "provience"),
        @Result(property = "country", column = "country"),
        @Result(property = "headImgUrl", column = "headImgUrl"),
        @Result(property = "privilege", column = "privilege"),
})
UserInfo getUserInfo(String openId);
项目:tulingchat    文件:ProxyIpMapper.java   
@Select("select 1 from proxyips where ip = #{ip} limit 1")
Integer findOne(String ip);
项目:JavaStudy    文件:UserMapper.java   
@Select("select * from t_user where id = #{id}")
public User getUserById(@Param("id")String id);
项目:DKJavaWebApiDemo    文件:UserMapper.java   
@Select("select * from user where username=#{username}")
User selectUserByUsername(@Param("username") String username);
项目:DKJavaWebApiDemo    文件:UserMapper.java   
@Select("select * from user")
List<User> selectAllUser();
项目:otus_java_2017_10    文件:UsersDAO.java   
@Select("SELECT * FROM accounts WHERE name = #{name} limit 1")
UsersDataSet select(String name);
项目:tulingchat    文件:ArtistMapper.java   
@Select("select count(1) from artist")
int countAllSize();
项目:tulingchat    文件:UserMapper.java   
@Select("select * from users")
@Results({@Result(property = "id", column = "userid"),
        @Result(property = "name", column = "username")})
List<User> findAll();
项目:springboot-course    文件:NoteMapper.java   
@Select("SELECT * FROM note")
List<Note> queryAll();
项目:loc-framework    文件:DemoInfoRead.java   
@Select("select `id`, `name`, `age`, `score` from demo_table")
List<DemoInfo> getAllDemoInfo();
项目:pingguopai    文件:OrderTaskMapper.java   
@Select("select * from t_order_task where id=#{id}")
OrderTask findByCustom(Long id);
项目:jDialects    文件:Demo.java   
@Select("select concat(firstName, ' ', lastName) as USERNAME, age as AGE from users where age>#{age}")
List<Map<String, Object>> getOlderThan(int age);
项目:otus_java_2017_06    文件:UsersDAO.java   
@Select("SELECT * FROM users WHERE name = #{name} limit 1")
UsersDataSet select(String name);
项目:otus_java_2017_06    文件:UsersDAO.java   
@Select("SELECT * FROM users")
List<UsersDataSet> selectAll();
项目:sjk    文件:CatalogMapper.java   
@Select("SELECT x.id AS subCatalog , x.pid AS catalog, x.name FROM Catalog x ORDER BY x.rank ASC")
List<CatalogInfo> listCatalogInfo();
项目:Fetax-AI    文件:AuthResourcesMapper.java   
@Select({"Select id,res_name name,res_Key resKey,res_Url resUrl from tb_resources"})
List<Resources> findAll();
项目:mafia    文件:MafiaAdminSlaveMapper.java   
@Select("SELECT * FROM mafia_admin")
List<MafiaAdmin> selectList();
项目:JSiter    文件:SystemDao.java   
@Select({"select", SELECT_FIELDS, "from", TABLE_NAME, "where id=#{id}"})
public MySystem selectById(String id);
项目:sjk    文件:TagMapper.java   
@Select(value = { "SELECT id, name FROM AndroidMarket.Tag where tagtype = 2" })
List<Tag> getTags();
项目:sjk    文件:AppMapper.java   
@Select("select count( distinct name) from App where hidden = 0")
long countName();
项目:azeroth    文件:UserEntityMapper.java   
@Select("SELECT * FROM users where 1=1")
@ResultMap("BaseResultMap")
Page<UserEntity> pageQuery(@Param("pageParam") PageParams pageParam);
项目:taskana    文件:QueryMapper.java   
@Select("<script>SELECT w.ID, w.KEY, w.NAME, w.DOMAIN, W.TYPE, w.DESCRIPTION, w.OWNER, w.ORG_LEVEL_1, w.ORG_LEVEL_2, w.ORG_LEVEL_3, w.ORG_LEVEL_4 from WORKBASKET w "
    + "<if test='accessId != null'>LEFT OUTER JOIN WORKBASKET_ACCESS_LIST a on w.KEY = a.WORKBASKET_KEY</if> "
    + "<where>"
    + "<if test='owner != null'>AND w.OWNER IN(<foreach item='item' collection='owner' separator=',' >#{item}</foreach>)</if> "
    + "<if test='key != null'>AND w.KEY IN(<foreach item='item' collection='key' separator=',' >#{item}</foreach>)</if> "
    + "<if test='name != null'>AND w.NAME IN(<foreach item='item' collection='name' separator=',' >#{item}</foreach>)</if> "
    + "<if test='domain != null'>AND w.DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
    + "<if test='type!= null'>AND w.TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
    + "<if test='createdAfter != null'>AND w.CREATED &gt; #{createdAfter}</if> "
    + "<if test='createdBefore != null'>AND w.CREATED &lt; #{createdBefore}</if> "
    + "<if test='modifiedAfter != null'>AND w.MODIFIED &gt; #{modifiedAfter}</if> "
    + "<if test='modifiedBefore != null'>AND w.MODIFIED &lt; #{modifiedBefore}</if> "
    + "<if test='description != null'>AND w.DESCRIPTION like #{description}</if> "
    + "<if test='accessId != null'>AND a.ACCESS_ID IN(<foreach item='item' collection='accessId' separator=',' >#{item}</foreach>) AND PERM_READ = 1 </if> "
    + "<if test='authorization != null'>AND "
    + "<if test=\"authorization.name().equals('OPEN')\">PERM_OPEN</if> "
    + "<if test=\"authorization.name().equals('READ')\">PERM_READ</if>"
    + "<if test=\"authorization.name().equals('APPEND')\">PERM_APPEND</if>"
    + "<if test=\"authorization.name().equals('TRANSFER')\">PERM_TRANSFER</if>"
    + "<if test=\"authorization.name().equals('DISTRIBUTE')\">PERM_DISTRIBUTE</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_1')\">PERM_CUSTOM_1</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_2')\">PERM_CUSTOM_2</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_3')\">PERM_CUSTOM_3</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_4')\">PERM_CUSTOM_4</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_5')\">PERM_CUSTOM_5</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_6')\">PERM_CUSTOM_6</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_7')\">PERM_CUSTOM_7</if>"
    + "<if test=\"authorization.name().equals('CUSTOM_8')\">PERM_CUSTOM_8</if> = 1 "
    + "</if>"
    + "</where>"
    + "</script>")
@Results({
    @Result(property = "id", column = "ID"),
    @Result(property = "key", column = "KEY"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "type", column = "TYPE"),
    @Result(property = "orgLevel1", column = "ORG_LEVEL_1"),
    @Result(property = "orgLevel2", column = "ORG_LEVEL_2"),
    @Result(property = "orgLevel3", column = "ORG_LEVEL_3"),
    @Result(property = "orgLevel4", column = "ORG_LEVEL_4")})
List<WorkbasketSummary> queryWorkbasket(WorkbasketQueryImpl workbasketQuery);
项目:loc-framework    文件:CityMapper.java   
@Select("select * from city where id = #{id}")
City selectCityById(@Param("id") long id);
项目:otus_java_2017_10    文件:UsersDAO.java   
@Select("SELECT * FROM accounts WHERE name = #{name} limit 1")
UsersDataSet select(String name);
项目:JSiter    文件:CategoryDao.java   
@Select({"select", SELECT_FIELDS, "from", TABLE_NAME, "where id=#{id}"})
public Category selectById(String id);
项目:taskana    文件:TaskMapper.java   
@Select("SELECT ID, CREATED, CLAIMED, COMPLETED, MODIFIED, PLANNED, DUE, NAME, DESCRIPTION, NOTE, PRIORITY, STATE, CLASSIFICATION_KEY, WORKBASKET_KEY, DOMAIN, BUSINESS_PROCESS_ID, PARENT_BUSINESS_PROCESS_ID, OWNER, POR_COMPANY, POR_SYSTEM, POR_INSTANCE, POR_TYPE, POR_VALUE, IS_READ, IS_TRANSFERRED, CUSTOM_ATTRIBUTES, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8, CUSTOM_9, CUSTOM_10 "
    + "FROM TASK "
    + "WHERE ID = #{id}")
@Results(value = {
    @Result(property = "id", column = "ID"),
    @Result(property = "created", column = "CREATED"),
    @Result(property = "claimed", column = "CLAIMED"),
    @Result(property = "completed", column = "COMPLETED"),
    @Result(property = "modified", column = "MODIFIED"),
    @Result(property = "planned", column = "PLANNED"),
    @Result(property = "due", column = "DUE"),
    @Result(property = "name", column = "NAME"),
    @Result(property = "description", column = "DESCRIPTION"),
    @Result(property = "note", column = "NOTE"),
    @Result(property = "priority", column = "PRIORITY"),
    @Result(property = "state", column = "STATE"),
    @Result(property = "workbasketKey", column = "WORKBASKET_KEY"),
    @Result(property = "classificationKey", column = "CLASSIFICATION_KEY"),
    @Result(property = "domain", column = "DOMAIN"),
    @Result(property = "businessProcessId", column = "BUSINESS_PROCESS_ID"),
    @Result(property = "parentBusinessProcessId", column = "PARENT_BUSINESS_PROCESS_ID"),
    @Result(property = "owner", column = "OWNER"),
    @Result(property = "primaryObjRef.company", column = "POR_COMPANY"),
    @Result(property = "primaryObjRef.system", column = "POR_SYSTEM"),
    @Result(property = "primaryObjRef.systemInstance", column = "POR_INSTANCE"),
    @Result(property = "primaryObjRef.type", column = "POR_TYPE"),
    @Result(property = "primaryObjRef.value", column = "POR_VALUE"),
    @Result(property = "isRead", column = "IS_READ"),
    @Result(property = "isTransferred", column = "IS_TRANSFERRED"),
    @Result(property = "customAttributes", column = "CUSTOM_ATTRIBUTES", jdbcType = JdbcType.BLOB,
        javaType = Map.class, typeHandler = MapTypeHandler.class),
    @Result(property = "custom1", column = "CUSTOM_1"),
    @Result(property = "custom2", column = "CUSTOM_2"),
    @Result(property = "custom3", column = "CUSTOM_3"),
    @Result(property = "custom4", column = "CUSTOM_4"),
    @Result(property = "custom5", column = "CUSTOM_5"),
    @Result(property = "custom6", column = "CUSTOM_6"),
    @Result(property = "custom7", column = "CUSTOM_7"),
    @Result(property = "custom8", column = "CUSTOM_8"),
    @Result(property = "custom9", column = "CUSTOM_9"),
    @Result(property = "custom10", column = "CUSTOM_10")
})
TaskImpl findById(@Param("id") String id);