package com.persagy.revit.dao

import org.apache.ibatis.jdbc.SQL







/**
 *
 *
 * @author jxing
 */
class FloorDAO {
    fun dynamicUpdate(floorId: String, oldModelId: String?, modelId: String?) : String{
        return object : SQL() {
            init {
                UPDATE("revit.model_floor")
                SET("current_model_id = #{modelId}")
                if(oldModelId == null)
                    WHERE("id =#{floorId} and current_model_id is null")
                else
                    WHERE("id =#{floorId} and current_model_id = #{oldModelId}")

            }
        }.toString()
    }
}