SnailJobMapper.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.interfaces.mapper.SnailJobMapper">
  6. <resultMap type="com.ruoyi.interfaces.domain.Job" id="JobResult">
  7. <result property="id" column="id" />
  8. <result property="namespaceId" column="namespace_id" />
  9. <result property="groupName" column="group_name" />
  10. <result property="jobName" column="job_name" />
  11. <result property="argsStr" column="args_str" />
  12. <result property="argsType" column="args_type" />
  13. <result property="nextTriggerAt" column="next_trigger_at" />
  14. <result property="jobStatus" column="job_status" />
  15. <result property="taskType" column="task_type" />
  16. <result property="routeKey" column="route_key" />
  17. <result property="executorType" column="executor_type" />
  18. <result property="executorInfo" column="executor_info" />
  19. <result property="triggerType" column="trigger_type" />
  20. <result property="triggerInterval" column="trigger_interval" />
  21. <result property="blockStrategy" column="block_strategy" />
  22. <result property="executorTimeout" column="executor_timeout" />
  23. <result property="maxRetryTimes" column="max_retry_times" />
  24. <result property="parallelNum" column="parallel_num" />
  25. <result property="retryInterval" column="retry_interval" />
  26. <result property="bucketIndex" column="bucket_index" />
  27. <result property="resident" column="resident" />
  28. <result property="notifyIds" column="notify_ids" />
  29. <result property="ownerId" column="owner_id" />
  30. <result property="labels" column="labels" />
  31. <result property="description" column="description" />
  32. <result property="extAttrs" column="ext_attrs" />
  33. <result property="deleted" column="deleted" />
  34. </resultMap>
  35. <sql id="selectJobVo">
  36. select
  37. id,
  38. namespace_id,
  39. group_name,
  40. job_name,
  41. args_str,
  42. args_type,
  43. next_trigger_at,
  44. job_status,
  45. task_type,
  46. route_key,
  47. executor_type,
  48. executor_info,
  49. trigger_type,
  50. trigger_interval,
  51. block_strategy,
  52. executor_timeout,
  53. max_retry_times,
  54. parallel_num,
  55. retry_interval,
  56. bucket_index,
  57. resident,
  58. notify_ids,
  59. owner_id,
  60. labels,
  61. description,
  62. ext_attrs,
  63. deleted
  64. from SNAIL_JOB.sj_job
  65. </sql>
  66. <select id="selectJobList" resultType="com.ruoyi.interfaces.domain.Job">
  67. <include refid="selectJobVo"></include>
  68. <where>
  69. <if test="namespaceId != null and namespaceId != ''">and namespace_id = #{namespaceId}</if>
  70. <if test="groupName != null and groupName != ''">and group_name = #{groupName}</if>
  71. <if test="jobName != null and jobName != ''">and job_name = #{jobName}</if>
  72. <if test="argsStr != null and argsStr != ''">and args_str = #{argsStr}</if>
  73. <if test="argsType != null ">and args_type = #{argsType}</if>
  74. <if test="nextTriggerAt != null ">and next_trigger_at = #{nextTriggerAt}</if>
  75. <if test="jobStatus != null ">and job_status = #{jobStatus}</if>
  76. <if test="taskType != null ">and task_type = #{taskType}</if>
  77. <if test="routeKey != null ">and route_key = #{routeKey}</if>
  78. <if test="executorType != null ">and executor_type = #{executorType}</if>
  79. <if test="executorInfo != null ">and executor_info = #{executorInfo}</if>
  80. </where>
  81. order by id
  82. </select>
  83. </mapper>