当前位置: 首页>>代码示例>>Python>>正文


Python Bank.fetchTime方法代码示例

本文整理汇总了Python中bank.Bank.fetchTime方法的典型用法代码示例。如果您正苦于以下问题:Python Bank.fetchTime方法的具体用法?Python Bank.fetchTime怎么用?Python Bank.fetchTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bank.Bank的用法示例。


在下文中一共展示了Bank.fetchTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getBankList

# 需要导入模块: from bank import Bank [as 别名]
# 或者: from bank.Bank import fetchTime [as 别名]
def getBankList(whereDict, city="all"):
    conn = getConnection();
    c = conn.cursor();
    where = buildWhereClause(whereDict);
    if city and city != "all":
        where += " and ct_name = '%s'" % city;

    c.execute("SELECT * FROM " + BankTable.TABLE_NAME 
            + " LEFT OUTER JOIN " 
            + " (SELECT _id AS ct_id, name AS ct_name FROM city) "  
            + " ON ct_id == " + BankTable.COL_CITY_ID + " "
            + where + "ORDER BY _id DESC", list(whereDict.viewvalues()))

    conn.commit();

    banks = [];
    for row in c.fetchall():
        bank = Bank();
        bank.name = row[BankTable.COL_NAME];
        bank.title = row[BankTable.COL_TITLE];
        bank.fetchTime = row[BankTable.COL_FETCH_TIME];
        bank.accepted = row[BankTable.COL_ACCEPTED];
        bank.url = row[BankTable.COL_URL];
        bank.id = row[BankTable.COL_ID];
        city = row["ct_name"];
        if city:
            bank.city = city;
        banks.append(bank);
    return banks;
开发者ID:ufo22940268,项目名称:PromotionScrachServer,代码行数:31,代码来源:db.py

示例2: inflateBank

# 需要导入模块: from bank import Bank [as 别名]
# 或者: from bank.Bank import fetchTime [as 别名]
    def inflateBank(self, jo):
        b = Bank();
        url = jo["LinkUrl"].encode("utf-8");
        if url.find("http:") == -1:
            b.url = "http://cc.cmbchina.com" + url;
        else:
            b.url = url;

        b.title = jo["Title"].encode("utf-8");
        b.name = "招商银行";
        b.fetchTime = strftime("%Y-%m-%d %H:%M:%S", gmtime());
        return b;
开发者ID:ufo22940268,项目名称:PromotionScrachServer,代码行数:14,代码来源:cmb.py


注:本文中的bank.Bank.fetchTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。