|
19 | 19 |
|
20 | 20 | <mapper namespace="com.webank.wedatasphere.streamis.jobmanager.manager.dao.StreamAlertMapper"> |
21 | 21 |
|
| 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 | + |
22 | 35 | <insert id="insert"> |
23 | 36 | 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}) |
25 | 38 | </insert> |
26 | 39 |
|
27 | 40 | <select id="getAlertByJobIdAndVersion" |
28 | | - resultType="com.webank.wedatasphere.streamis.jobmanager.manager.entity.StreamAlertRecord"> |
| 41 | + resultMap="StreamAlertRecordMap"> |
29 | 42 | 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 |
30 | 43 | where alert_user = #{username} and job_id = #{jobId} and job_version_id = #{versionId} |
31 | 44 | </select> |
|
0 commit comments