Beispiel #1
0
def create_statement_main():
    """
    卡对账单初始化模块,从卡数据库文件中加载所有卡号,对所有卡调用生成对账单模块
    :return:
    """
    _database = "{0}.db".format(os.path.join(settings.DATABASE['dbpath'], settings.DATABASE["tables"]["creditcard"]))
    card_list = dbapi.load_data_from_db(_database)
    cards = list(card_list.keys())
    for cardno in cards:
        create_card_statement(cardno)
Beispiel #2
0
def create_statement_main():
    """
    卡对账单初始化模块,从卡数据库文件中加载所有卡号,对所有卡调用生成对账单模块
    :return:
    """
    _database = "{0}.db".format(os.path.join(settings.DATABASE['dbpath'], settings.DATABASE["tables"]["creditcard"]))
    card_list = dbapi.load_data_from_db(_database)
    cards = list(card_list.keys())
    for cardno in cards:

        create_card_statement(cardno)
Beispiel #3
0
    def _load_card_info(self):
        """
        根据用户输入的卡号获取信用卡信息,如果卡号不存在就返回False
        :return: 信用卡对象
        """
        exists_flag = False
        self.credit_card = dbapi.load_data_from_db(self.__database)
        for key, items in self.credit_card.items():
            if key == self.cardno:
                self.password = self.credit_card[self.cardno]['password']
                self.credit_total = self.credit_card[self.cardno]['credit_total']
                self.credit_balance = self.credit_card[self.cardno]['credit_balance']
                self.owner = self.credit_card[self.cardno]['owner']
                self.frozenstatus = self.credit_card[self.cardno]['frozenstatus']

                exists_flag = True
                break
Beispiel #4
0
    def _load_card_info(self):
        """
        根据用户输入的卡号获取信用卡信息,如果卡号不存在就返回False
        :return: 信用卡对象
        """
        exists_flag = False
        self.credit_card = dbapi.load_data_from_db(self.__database)
        for key, items in self.credit_card.items():
            if key == self.cardno:
                self.password = self.credit_card[self.cardno]['password']
                self.credit_total = self.credit_card[
                    self.cardno]['credit_total']
                self.credit_balance = self.credit_card[
                    self.cardno]['credit_balance']
                self.owner = self.credit_card[self.cardno]['owner']
                self.frozenstatus = self.credit_card[
                    self.cardno]['frozenstatus']

                exists_flag = True
                break
Beispiel #5
0
 def _get_shop_market(self):
     """
     获取购物商城所有商品信息,存入类字段(shop_market)
     :return:  self.shop_market
     """
     self.shop_market = dbapi.load_data_from_db(self.__database)
Beispiel #6
0
 def _get_shop_market(self):
     """
     获取购物商城所有商品信息,存入类字段(shop_market)
     :return:  self.shop_market
     """
     self.shop_market = dbapi.load_data_from_db(self.__database)
Beispiel #7
0
 def db_load(self):
     self.dict_user = dbapi.load_data_from_db(self.__database)
Beispiel #8
0
 def get_load_usertoken(self):
       self.dic_user_token = dbapi.load_data_from_db(self._database_1)
       return self.dic_user_token
Beispiel #9
0
 def get_load_user(self):
        return dbapi.load_data_from_db(self._database)
Beispiel #10
0
 def db_load(self):
     self.dict_user = dbapi.load_data_from_db(self.__database)