def addMoneyBL(self, account, isio, happentime, money, currency, description, user): moneybl = MoneyBL(account = account, isio = isio, happentime = happentime, money = money, currency = currency, description = description, user = user) moneybl.put() AccountService().updateAccountMoney(account, money, isio)
def addMoneyBL(self, account, isio, happentime, money, currency, description, user): moneybl = MoneyBL(account=account, isio=isio, happentime=happentime, money=money, currency=currency, description=description, user=user) moneybl.put() AccountService().updateAccountMoney(account, money, isio)
def getMoneyBL(self, id, user): moneybl = None try: moneybl = MoneyBL.get_by_id(int(id)) if moneybl.user.id <> user.id: moneybl = None except: moneybl = None return moneybl
def getMoneyBLCount(self, filter_dict, user): moneybl_list = MoneyBL.all() if filter_dict: for filter_key in filter_dict.keys(): moneybl_list = moneybl_list.filter(filter_key, filter_dict[filter_key]) if user: moneybl_list = moneybl_list.filter('user', user) return moneybl_list.count()
def getMoneyBLList(self, filter_dict, orderby, pagesize, pagecount, user): moneybl_list = MoneyBL.all() if filter_dict: for filter_key in filter_dict.keys(): moneybl_list = moneybl_list.filter(filter_key, filter_dict[filter_key]) if user: moneybl_list = moneybl_list.filter('user', user) total_records = moneybl_list.count() if orderby: moneybl_list = moneybl_list.order(orderby) if pagesize > 0: moneybl_list = moneybl_list.fetch(pagesize, pagesize * (pagecount-1)) return moneybl_list, total_records
def getMoneyBLList(self, filter_dict, orderby, pagesize, pagecount, user): moneybl_list = MoneyBL.all() if filter_dict: for filter_key in filter_dict.keys(): moneybl_list = moneybl_list.filter(filter_key, filter_dict[filter_key]) if user: moneybl_list = moneybl_list.filter('user', user) total_records = moneybl_list.count() if orderby: moneybl_list = moneybl_list.order(orderby) if pagesize > 0: moneybl_list = moneybl_list.fetch(pagesize, pagesize * (pagecount - 1)) return moneybl_list, total_records