package com.persagy.server.mappers

import org.apache.ibatis.jdbc.SQL

/**
 * 关系计算-建筑
 *
 * @author 邓婷婷
 */
open class IRelationCountProvider {

    fun getSql(map: Map<String,String>): String{
        val sql = SQL()
        sql.SELECT("count(*)")
        if(map["tableName"] != null&& map["tableName"] !=""){
            sql.FROM(map["tableName"])
        }

        if(map["projectId"] != null&& map["projectId"] !=""){
            sql.WHERE("project_id = '" + map["projectId"] + "'")
        }



        println("----------------$sql")
        return sql.toString()
    }

} // IRelationCountProvider