package com.weaver.seconddev.interfaces.workflow.util;

import com.weaver.common.i18n.tool.util.I18nContextUtil;
import com.weaver.verupgrade.conn.CONN_TYPE;
import com.weaver.verupgrade.conn.RecordSet;
import io.protostuff.Service;
import org.springframework.stereotype.Component;

@Component
public class CommonDevUtil {

    public Long getObjId(String tableName){
        String sql = "select id from e10_common.dbo.ebdf_obj where table_name= '"+tableName+"' and delete_type=0";
        RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
        String poolname = CONN_TYPE.ebuilder.getType();
        rs.executeQuery(sql,poolname);
        Long id = -1L;
        if(rs.next()){
            id = Long.parseLong(rs.getString("id"));
        }
        return id;

    }
}
