Example #1
0
    def get_day_amount(self, channel: ChannelConfigEnum):
        value = self.hget(channel.name)
        if not value:
            return 0

        value = int(value.decode('utf8'))
        return BalanceKit.divide_hundred(value)
Example #2
0
 def limit_day_max(self):
     if not self._limit_day_max:
         return 0
     return BalanceKit.divide_hundred(self._limit_day_max)
Example #3
0
 def limit_per_max(self):
     return BalanceKit.divide_hundred(self._limit_per_max)
Example #4
0
 def fee(self):
     return BalanceKit.divide_hundred(self._fee)
Example #5
0
 def tx_amount(self):
     if not self._tx_amount:
         return 0
     return BalanceKit.divide_hundred(self._tx_amount)
Example #6
0
 def amount(self):
     return BalanceKit.divide_hundred(self._amount)
Example #7
0
 def offer(self):
     if not self._offer:
         return 0
     return BalanceKit.divide_hundred(self._offer)
Example #8
0
 def balance_frozen(self):
     """
     冻结余额,浮点显示
     :return:
     """
     return BalanceKit.divide_hundred(self.bl_fro)
Example #9
0
 def cost(self):
     if not self._cost:
         return 0
     return BalanceKit.divide_hundred(self._cost)
Example #10
0
 def profit(self):
     if not self._profit:
         return 0
     return BalanceKit.divide_hundred(self._profit)
Example #11
0
 def balance_income(self):
     """
     在途余额,浮点显示
     :return:
     """
     return BalanceKit.divide_hundred(self.bl_inc)
Example #12
0
 def balance_available(self):
     """
     可用余额,浮点显示
     :return:
     """
     return BalanceKit.divide_hundred(self.bl_ava)
Example #13
0
 def value(self):
     return BalanceKit.divide_hundred(self._value)
Example #14
0
 def value_real(self):
     return BalanceKit.divide_hundred(self.value)
Example #15
0
 def amount_min(self):
     if self._amount_min:
         return BalanceKit.divide_hundred(self._amount_min)
     return 0
Example #16
0
 def fee(self):
     if not self._fee:
         return 0
     return BalanceKit.divide_hundred(self._fee)
Example #17
0
 def amount_max(self):
     if self._amount_max:
         return BalanceKit.divide_hundred(self._amount_max)
     return 0
Example #18
0
 def real_balance(self):
     return BalanceKit.divide_hundred(self.balance)