| | |
| | | <result column="check_content" property="checkContent"/> |
| | | </resultMap> |
| | | |
| | | <insert id="savePreventRiskControlMeasure" parameterType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure"> |
| | | insert into prevent_risk_control_measure |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="uuid != null ">uuid,</if> |
| | | <if test="deleteStatus != null ">delete_status,</if> |
| | | <if test="gmtCreate != null ">gmt_create,</if> |
| | | <if test="gmtModitify != null ">gmt_moditify,</if> |
| | | <if test="controlType != null ">control_type,</if> |
| | | <if test="classify1 != null and classify1 != ''">classify1,</if> |
| | | <if test="classify2 != null and classify2 != '' ">classify2,</if> |
| | | <if test="riskEventId != null ">risk_event_id,</if> |
| | | <if test="enterpriseId != null ">enterprise_id,</if> |
| | | <if test="riskEventUuid != null ">risk_event_uuid,</if> |
| | | <if test="enterpriseUuid != null ">enterprise_uuid,</if> |
| | | <if test="classify3 != null and classify3 != '' ">classify3,</if> |
| | | <if test="controlMeasureCode != null ">control_measure_code,</if> |
| | | <if test="createByUserName != null and createByUserName != '' ">create_by_user_name,</if> |
| | | <if test="lastEditUserName != null and lastEditUserName != '' ">last_edit_user_name,</if> |
| | | <if test="measureDesc != null and measureDesc != '' ">measure_desc,</if> |
| | | <if test="reportStatus != null ">report_status,</if> |
| | | <if test="reportTime != null ">report_time,</if> |
| | | <if test="updateReportDataTime != null ">update_report_data_time,</if> |
| | | <if test="reportSwitch != null ">report_switch,</if> |
| | | <if test="checkContent != null ">check_content,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="uuid != null ">#{uuid},</if> |
| | | <if test="deleteStatus != null ">#{deleteStatus},</if> |
| | | <if test="gmtCreate != null ">#{gmtCreate},</if> |
| | | <if test="gmtModitify != null ">#{gmtModitify},</if> |
| | | <if test="controlType != null ">#{controlType},</if> |
| | | <if test="classify1 != null and classify1 != ''">#{classify1},</if> |
| | | <if test="classify2 != null and classify2 != '' ">#{classify2},</if> |
| | | <if test="riskEventId != null ">#{riskEventId},</if> |
| | | <if test="enterpriseId != null ">#{enterpriseId},</if> |
| | | <if test="riskEventUuid != null ">#{riskEventUuid},</if> |
| | | <if test="enterpriseUuid != null ">#{enterpriseUuid},</if> |
| | | <if test="classify3 != null and classify3 != '' ">#{classify3},</if> |
| | | <if test="controlMeasureCode != null ">#{controlMeasureCode},</if> |
| | | <if test="createByUserName != null and createByUserName != '' ">#{createByUserName},</if> |
| | | <if test="lastEditUserName != null and lastEditUserName != '' ">#{lastEditUserName},</if> |
| | | <if test="measureDesc != null and measureDesc != '' ">#{measureDesc},</if> |
| | | <if test="reportStatus != null ">#{reportStatus},</if> |
| | | <if test="reportTime != null ">#{reportTime},</if> |
| | | <if test="updateReportDataTime != null ">#{updateReportDataTime},</if> |
| | | <if test="reportSwitch != null ">#{reportSwitch},</if> |
| | | <if test="checkContent != null ">#{checkContent},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | |
| | | <update id="updatePreventRiskControlMeasureById" parameterType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure"> |
| | | update prevent_risk_control_measure |
| | | <set> |
| | | <if test="gmtModitify != null "> |
| | | gmt_moditify = #{gmtModitify} |
| | | </if> |
| | | <if test="controlType != null"> |
| | | control_type = #{controlType} |
| | | </if> |
| | | <if test="classify1 != null"> |
| | | classify1 = #{classify1} |
| | | </if> |
| | | <if test="classify2 != null"> |
| | | classify2 = #{classify2} |
| | | </if> |
| | | <if test="controlMeasureCode != null"> |
| | | control_measure_code = #{controlMeasureCode} |
| | | </if> |
| | | <if test="measureDesc != null"> |
| | | measure_desc = #{measureDesc} |
| | | </if> |
| | | <if test="riskEventId != null"> |
| | | risk_event_id = #{riskEventId} |
| | | </if> |
| | | <if test="riskEventUuid != null"> |
| | | risk_event_uuid = #{riskEventUuid} |
| | | </if> |
| | | <if test="classify3 != null"> |
| | | classify3 = #{classify3} |
| | | </if> |
| | | <if test="lastEditUserName != null"> |
| | | last_edit_user_name = #{lastEditUserName} |
| | | </if> |
| | | <if test="reportTime != null"> |
| | | report_time = #{reportTime} |
| | | </if> |
| | | <if test="updateReportDataTime != null"> |
| | | update_report_data_time = #{updateReportDataTime} |
| | | </if> |
| | | <if test="reportStatus != null"> |
| | | report_status = #{reportStatus} |
| | | </if> |
| | | <if test="reportSwitch != null"> |
| | | report_switch = #{reportSwitch} |
| | | </if> |
| | | <if test="checkContent != null"> |
| | | check_content = #{checkContent} |
| | | </if> |
| | | where id = #{id} and delete_status = 0 |
| | | </set> |
| | | </update> |
| | | |
| | | <update id="deletePreventRiskControlMeasureById"> |
| | | update prevent_risk_control_measure |
| | | <set> |
| | | <if test="preventRiskControlMeasure.gmtModitify != null "> |
| | | gmt_moditify = #{preventRiskControlMeasure.gmtModitify}, |
| | | </if> |
| | | <if test="preventRiskControlMeasure.lastEditUserName != null "> |
| | | last_edit_user_name = #{preventRiskControlMeasure.lastEditUserName}, |
| | | </if> |
| | | delete_status = 1 where id = #{id} |
| | | </set> |
| | | </update> |
| | | |
| | | |
| | | <select id="getPreventRiskControlMeasureById" |
| | | resultType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure"> |
| | | select * from prevent_risk_control_measure |
| | | where id = #{id} and delete_status = 0 |
| | | </select> |
| | | |
| | | </mapper> |