ai.cpws_cause_info
cause_id,level,name,primary_cause,primary_cause_name,secondary_cause,secondary_cause_name,tertiary_cause,tertiary_cause_name,quaternary_cause,quaternary_cause_name,delete_status,create_time,update_time
level = #{entity.level},name = #{entity.name},primary_cause = #{entity.primaryCause},primary_cause_name = #{entity.primaryCauseName},secondary_cause = #{entity.secondaryCause},secondary_cause_name = #{entity.secondaryCauseName},tertiary_cause = #{entity.tertiaryCause},tertiary_cause_name = #{entity.tertiaryCauseName},quaternary_cause = #{entity.quaternaryCause},quaternary_cause_name = #{entity.quaternaryCauseName},delete_status = #{entity.deleteStatus},create_time = #{entity.createTime},update_time = #{entity.updateTime}
and cause_id = #{terms.causeId}
and level = #{terms.level}
and name = #{terms.name}
and primary_cause = #{terms.primaryCause}
and primary_cause_name = #{terms.primaryCauseName}
and secondary_cause = #{terms.secondaryCause}
and secondary_cause_name = #{terms.secondaryCauseName}
and tertiary_cause = #{terms.tertiaryCause}
and tertiary_cause_name = #{terms.tertiaryCauseName}
and quaternary_cause = #{terms.quaternaryCause}
and quaternary_cause_name = #{terms.quaternaryCauseName}
and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
and (DATE_FORMAT(create_time,'%Y-%m-%d') = ]]> #{terms.createStart}
and DATE_FORMAT(create_time,'%Y-%m-%d') #{terms.createEnd})
and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
and (DATE_FORMAT(update_time,'%Y-%m-%d') = ]]> #{terms.updateStart}
and DATE_FORMAT(update_time,'%Y-%m-%d') #{terms.updateEnd})
and delete_status = 0
and delete_status = #{terms.deleteStatus}
update
id = #{entity.id}
update
delete from
where id = #{id}