feat: ASW-8 新增 Runner 相关接口

This commit is contained in:
shizhendong
2024-07-16 17:38:32 +08:00
parent 5a4c15b00a
commit 79146845b9
15 changed files with 478 additions and 3 deletions

View File

@@ -26,6 +26,7 @@
<association property="pkg" columnPrefix="pkg_" javaType="net.geedge.asw.module.app.entity.PackageEntity">
<id property="id" column="id"/>
<result property="platform" column="platform"/>
<result property="identifier" column="identifier"/>
<result property="version" column="version"/>
<result property="logo" column="logo"/>
</association>
@@ -56,6 +57,7 @@
pkg.platform AS pkg_platform,
pkg.version AS pkg_version,
pkg.logo AS pkg_logo,
pkg.identifier AS pkg_identifier,
app.id AS app_id,
app.name AS app_name,
@@ -121,4 +123,26 @@
</if>
</select>
<select id="getPendingJobByPlatform" resultMap="jobResultMap">
SELECT
job.*,
pkg.id AS pkg_id,
pkg.platform AS pkg_platform,
pkg.identifier AS pkg_identifier,
pkg.version AS pkg_version,
pb.id AS pb_id,
pb.name AS pb_name
FROM
job job
LEFT JOIN package pkg ON job.package_id = pkg.id
LEFT JOIN playbook pb ON job.playbook_id = pb.id
WHERE
job.status = 'pending' and pkg.platform = #{platform}
ORDER BY job.create_timestamp ASC
LIMIT 1
</select>
</mapper>