package cn.gtmap.estateplat.config.core.service.impl;

import cn.gtmap.estateplat.config.core.mapper.config.TableMapper;
import cn.gtmap.estateplat.config.core.service.TableService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @version 1.0, 2017/6/27.
 * @auto <a href="mailto:zhouwanqing@gtmap.cn">zhouwanqing</a>
 * @description
 */
@Service
public class TableServiceImpl implements TableService {
    @Autowired
    TableMapper tableMapper;

    @Override
    public List<String> getFiledName(String tableName) {
        List<String> tableNameList = null;
        if (StringUtils.isNotBlank(tableName))
            tableNameList = tableMapper.getFiledName(tableName);
        return tableNameList;
    }

    @Override
    public List<Map> runSql(String sql) {
        return tableMapper.runSql(sql);
    }

}
