package com.ruoyi.ext.api.db;

public class DBTool {
    public static String getDbSystemDateTime(String dataFormat) {
        String sql = "select DATE_FORMAT(SYSDATE(),'" + dataFormat + "') time";
        String retStr = "";
        DBImpl db1= DBFactory.getDBImpl("master") ;
        try {
            DBResult dbset=db1.getDataBySql(sql);
            retStr=dbset.getString(0,0);
        } catch (Exception var4) {
            System.out.println("取数据库系统时间失败" + var4 + sql);

        }

        return retStr;
    }
    public static String getDbUUID() {
        String retStr = "";
        DBImpl db1= DBFactory.getDBImpl("master") ;
        try {
            DBResult dbset=db1.getDataBySql("select getuuid() ");
            retStr=dbset.getString(0,0);
        } catch (Exception var4) {
            System.out.println("取数据库uuid失败" + var4 );

        }

        return retStr;
    }
}
