| | |
| | | update prevent_risk_control_measure |
| | | <set> |
| | | <if test="gmtModitify != null "> |
| | | gmt_moditify = #{gmtModitify} |
| | | gmt_moditify = #{gmtModitify}, |
| | | </if> |
| | | <if test="controlType != null"> |
| | | control_type = #{controlType} |
| | | control_type = #{controlType}, |
| | | </if> |
| | | <if test="classify1 != null"> |
| | | classify1 = #{classify1} |
| | | classify1 = #{classify1}, |
| | | </if> |
| | | <if test="classify2 != null"> |
| | | classify2 = #{classify2} |
| | | classify2 = #{classify2}, |
| | | </if> |
| | | <if test="controlMeasureCode != null"> |
| | | control_measure_code = #{controlMeasureCode} |
| | | control_measure_code = #{controlMeasureCode}, |
| | | </if> |
| | | <if test="measureDesc != null"> |
| | | measure_desc = #{measureDesc} |
| | | measure_desc = #{measureDesc}, |
| | | </if> |
| | | <if test="riskEventId != null"> |
| | | risk_event_id = #{riskEventId} |
| | | risk_event_id = #{riskEventId}, |
| | | </if> |
| | | <if test="riskEventUuid != null"> |
| | | risk_event_uuid = #{riskEventUuid} |
| | | risk_event_uuid = #{riskEventUuid}, |
| | | </if> |
| | | <if test="classify3 != null"> |
| | | classify3 = #{classify3} |
| | | classify3 = #{classify3}, |
| | | </if> |
| | | <if test="lastEditUserName != null"> |
| | | last_edit_user_name = #{lastEditUserName} |
| | | last_edit_user_name = #{lastEditUserName}, |
| | | </if> |
| | | <if test="reportTime != null"> |
| | | report_time = #{reportTime} |
| | | report_time = #{reportTime}, |
| | | </if> |
| | | <if test="updateReportDataTime != null"> |
| | | update_report_data_time = #{updateReportDataTime} |
| | | update_report_data_time = #{updateReportDataTime}, |
| | | </if> |
| | | <if test="reportStatus != null"> |
| | | report_status = #{reportStatus} |
| | | report_status = #{reportStatus}, |
| | | </if> |
| | | <if test="reportSwitch != null"> |
| | | report_switch = #{reportSwitch} |
| | | report_switch = #{reportSwitch}, |
| | | </if> |
| | | <if test="checkContent != null"> |
| | | check_content = #{checkContent} |
| | | check_content = #{checkContent}, |
| | | </if> |
| | | where id = #{id} and delete_status = 0 |
| | | </set> |
| | | where id = #{id} and delete_status = 0 |
| | | </update> |
| | | |
| | | <update id="deletePreventRiskControlMeasureById"> |
| | | update prevent_risk_control_measure |
| | | <set> |
| | | <if test="preventRiskControlMeasure.gmtModitify != null "> |
| | | gmt_moditify = #{preventRiskControlMeasure.gmtModitify}, |
| | | <if test="gmtModitify != null "> |
| | | gmt_moditify = #{gmtModitify}, |
| | | </if> |
| | | <if test="preventRiskControlMeasure.lastEditUserName != null "> |
| | | last_edit_user_name = #{preventRiskControlMeasure.lastEditUserName}, |
| | | <if test="lastEditUserName != null "> |
| | | last_edit_user_name = #{lastEditUserName}, |
| | | </if> |
| | | delete_status = 1 where id = #{id} |
| | | <if test="updateReportDataTime != null"> |
| | | update_report_data_time = #{updateReportDataTime}, |
| | | </if> |
| | | delete_status = 1 where id = #{id} and delete_status = 0 |
| | | </set> |
| | | </update> |
| | | |
| | |
| | | select * from prevent_risk_control_measure |
| | | where id = #{id} and delete_status = 0 |
| | | </select> |
| | | <select id="getPreventRiskControlMeasureByControlMeasureCode" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | <where> |
| | | delete_status = 0 |
| | | <if test="controlMeasureCode != null"> |
| | | and control_measure_code = #{controlMeasureCode} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="listRiskEvenByCondition" resultMap="BaseResultMap"> |
| | | select * from prevent_risk_control_measure |
| | | <where> |
| | | delete_status = 0 |
| | | <if test="controlType != null"> |
| | | and control_type = #{controlType} |
| | | </if> |
| | | <if test="riskEventId != null"> |
| | | and risk_event_id = #{riskEventId} |
| | | </if> |
| | | order by gmt_moditify desc |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |