add queryByQueueName

This commit is contained in:
ligang 2019-04-11 18:39:54 +08:00
parent 30a63a05aa
commit 4214d60ffa
2 changed files with 21 additions and 0 deletions

View File

@ -112,5 +112,8 @@ public interface QueueMapper {
@SelectProvider(type = QueueMapperProvider.class, method = "queryByQueue")
Queue queryByQueue(@Param("queue") String queue);
@SelectProvider(type = QueueMapperProvider.class, method = "queryByQueueName")
Queue queryByQueueName(@Param("queueName") String queueName);
}

View File

@ -170,4 +170,22 @@ public class QueueMapperProvider {
}.toString();
}
/**
* query by queue name
*
* @param parameter
* @return
*/
public String queryByQueueName(Map<String, Object> parameter) {
return new SQL() {
{
SELECT("*");
FROM(TABLE_NAME);
WHERE("`queue_name` = #{queueName}");
}
}.toString();
}
}