Example #1
0
 def save(self, user_profile, commit=False):
     user_bank_info = super(UserBanknInfoForm, self).save(commit=False)
     user_bank_info.userProfile = user_profile
     # 修改用户状态码
     user_profile.addState(BitStatesUtils.GET_OP_BIND_BANKINFO())
     user_profile.save()
     user_bank_info.save()
     #开通账户
     account = Account.objects.create(userProfile=user_profile)
     account.save()
     #添加一万元授信
     account.remainBorrowLimit = Decimal('10000.0000')
     #最大授信额度
     account.borrowLimit = Decimal('10000.0000')
     account.save()
     return user_bank_info
Example #2
0
 def isBindBankInfo(self):
     return BitStatesUtils.hasState(self.bitState,
                                    BitStatesUtils.GET_OP_BIND_BANKINFO())