package com.tofly.feesapi.common.util;

/**
 * Sql转换器
 */
public class SqlConvertor {

    private static final String sqlType = "oracle";

    /**
     * 日期Sql
     */
    public static String toDate(String date) {
        String result = date;
        switch (sqlType) {
            case "oracle":
                result = String.format("to_date('%s','yyyy-MM-dd HH24:mi:ss')", date);
                break;
            default:
                result = String.format("'%s'", date);
                break;
        }

        return result;
    }
}
