Browse Source

add queryByQueueName

pull/1/MERGE
ligang 6 years ago
parent
commit
4214d60ffa
  1. 3
      escheduler-dao/src/main/java/cn/escheduler/dao/mapper/QueueMapper.java
  2. 18
      escheduler-dao/src/main/java/cn/escheduler/dao/mapper/QueueMapperProvider.java

3
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/QueueMapper.java

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

18
escheduler-dao/src/main/java/cn/escheduler/dao/mapper/QueueMapperProvider.java

@ -170,4 +170,22 @@ public class QueueMapperProvider {
}.toString(); }.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();
}
} }

Loading…
Cancel
Save