Skip to content

Commit 15b19b8

Browse files
Fix the problem that alert records will persistent failed by dao.
1 parent 97dcb1e commit 15b19b8

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

  • streamis-jobmanager/streamis-job-manager/streamis-job-manager-base/src/main/java/com/webank/wedatasphere/streamis/jobmanager/manager/dao/impl

streamis-jobmanager/streamis-job-manager/streamis-job-manager-base/src/main/java/com/webank/wedatasphere/streamis/jobmanager/manager/dao/impl/StreamAlertMapper.xml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,26 @@
1919

2020
<mapper namespace="com.webank.wedatasphere.streamis.jobmanager.manager.dao.StreamAlertMapper">
2121

22+
<resultMap id="StreamAlertRecordMap" type="com.webank.wedatasphere.streamis.jobmanager.manager.entity.StreamAlertRecord">
23+
<id column="id" property="id" jdbcType="BIGINT"/>
24+
<result column="alert_level" property="alertLevel" jdbcType="VARCHAR"/>
25+
<result column="alert_user" property="alertUser" jdbcType="VARCHAR"/>
26+
<result column="alert_msg" property="alertMsg" jdbcType="VARCHAR"/>
27+
<result column="job_id" property="jobId" jdbcType="VARCHAR"/>
28+
<result column="job_version_id" property="jobVersionId" jdbcType="TIMESTAMP"/>
29+
<result column="task_id" property="taskId" jdbcType="VARCHAR"/>
30+
<result column="create_time" property="createTime" jdbcType="VARCHAR"/>
31+
<result column="status" property="status" jdbcType="VARCHAR"/>
32+
<result column="error_msg" property="errorMsg" jdbcType="VARCHAR"/>
33+
</resultMap>
34+
2235
<insert id="insert">
2336
insert into linkis_stream_alert_record (alert_level,alert_user,alert_msg,job_id,job_version_id,task_id,create_time,status,error_msg) values
24-
(#{alertLevel},#{alertUser},#{alertMsg},#{jobId},#{jobVersionId},#{taskId},#{createTime},#{status},#{error_msg})
37+
(#{alertLevel},#{alertUser},#{alertMsg},#{jobId},#{jobVersionId},#{taskId},#{createTime},#{status},#{errorMsg})
2538
</insert>
2639

2740
<select id="getAlertByJobIdAndVersion"
28-
resultType="com.webank.wedatasphere.streamis.jobmanager.manager.entity.StreamAlertRecord">
41+
resultMap="StreamAlertRecordMap">
2942
select id, alert_level,alert_user,alert_msg,job_id,job_version_id,task_id,create_time,status,error_msg from linkis_stream_alert_record
3043
where alert_user = #{username} and job_id = #{jobId} and job_version_id = #{versionId}
3144
</select>

0 commit comments

Comments
 (0)