You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2022/11/18 14:26:54 UTC
[incubator-streampark] branch dev updated: [Bug] After building the project, the build time is not updated (#2058)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new d019d0522 [Bug] After building the project, the build time is not updated (#2058)
d019d0522 is described below
commit d019d0522e63daca2f7ab60a79e097f59d434b99
Author: macksonmu <ma...@gmail.com>
AuthorDate: Fri Nov 18 22:26:48 2022 +0800
[Bug] After building the project, the build time is not updated (#2058)
* [Bug] After building the project, the build time is not updated #2055
Co-authored-by: mucj7 <mu...@chinaunicom.cn>
---
.../org/apache/streampark/console/core/mapper/ProjectMapper.java | 2 ++
.../org/apache/streampark/console/core/task/ProjectBuildTask.java | 1 +
.../src/main/resources/mapper/core/ProjectMapper.xml | 6 ++++++
3 files changed, 9 insertions(+)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ProjectMapper.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ProjectMapper.java
index db0d1d61b..c826335bc 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ProjectMapper.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/ProjectMapper.java
@@ -28,6 +28,8 @@ public interface ProjectMapper extends BaseMapper<Project> {
void updateBuildState(@Param("id") Long id, @Param("state") Integer buildState);
+ void updateBuildTime(@Param("id") Long id);
+
IPage<Project> page(Page<Project> page, @Param("project") Project project);
Boolean existsByTeamId(@Param("teamId") Long teamId);
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/ProjectBuildTask.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/ProjectBuildTask.java
index f731dc25d..110aa8b86 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/ProjectBuildTask.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/ProjectBuildTask.java
@@ -75,6 +75,7 @@ public class ProjectBuildTask extends AbstractLogFileTask {
return;
}
this.baseMapper.updateBuildState(project.getId(), BuildState.SUCCESSFUL.get());
+ this.baseMapper.updateBuildTime(project.getId());
this.deploy(project);
List<Application> applications = this.applicationService.getByProjectId(project.getId());
// Update the deploy state
diff --git a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
index 65e70f6c8..472fd657e 100644
--- a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
+++ b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
@@ -52,6 +52,12 @@
where id = #{id}
</update>
+ <update id="updateBuildTime" parameterType="java.lang.Long">
+ update t_flink_project
+ set last_build = now()
+ where id = #{id}
+ </update>
+
<select id="page" resultType="org.apache.streampark.console.core.entity.Project" parameterType="org.apache.streampark.console.core.entity.Project">
select *
from t_flink_project t