def freezen(self,account_id): ''' 冻结 :return: ''' try: info={ "receiver":self._get_account_info(account_id), "senday":self._get_today(), } emailSender=EmailHandle() smsSender=sms() emailSender.freeze(info) smsSender.freeze(info) except Exception as e: pass
def del_resource(self,account_id): ''' 删除资源 :return: ''' try: info={ "receiver":self._get_account_info(account_id),# "senday":self._get_today(), } emailSender=EmailHandle() smsSender=sms() emailSender.del_resource(info) smsSender.del_resource(info) except Exception as e: pass
def update_credit(self,account_id): ''' 调整用户类型额度 :return: ''' try: info={ "receiver":self._get_account_info(account_id),# "senday":self._get_today(), } emailSender=EmailHandle() smsSender=sms() emailSender.update_credit(info) smsSender.update_credit(info) except Exception as e: pass
def _lowcashReminder_3(self,account_id): ''' 当前余额比较低的时候提前三天给客户提醒 :param account_id:客户帐号 :return: ''' try: account=self._get_account_info(account_id) consume_3_day=0 info={} pass emailSender=EmailHandle() smsSender=sms() if consume_3_day>account["available_balance"]: emailSender.lowcash_reminder(info) smsSender.lowcash_reminder(info) except Exception as e: LOG.error(str(e)) LOG.error(traceback.format_exc())
def paySuccess(self,order_no,remark=""): ''' 根据订单号进行判断以下几种情形,并发送邮件与短信 1.赠送用户金额,通知客户 2.用户自己充值完成,通知客户 3.代理给下线充值完成,通知代理与下线 4.客服给用户充值完成,通知客户 order_no:用户号 info:附加信息 :return: ''' try: info={} pass emailSender=EmailHandle() smsSender=sms() emailSender.pay_success(info) smsSender.pay_success(info) except Exception as e: LOG.error(str(e)) LOG.error(traceback.format_exc()) raise e