time(),'use_type' => $this->mUsedType,'rate' => $rate,'amount' => $used / 100,'member_id' => $this->member_id] public static function onUseBonus($param) { if(empty($param) || is_array($param) == false) { return false; } try { $time = intval($param['time']); $stat = new statistics\stbonus($time); $use_type = intval($param['use_type']); $rate = intval($param['rate']); $amount = $param['amount']; if($use_type == bonus_helper::pay_order_withold) { $stat->add_paied($rate,$amount); } elseif (($use_type == bonus_helper::send_bonus_withold)) { $stat->add_send($rate,$amount); } } catch (Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } return true; } public static function onDaiyBonus($time) { try { $stat = new statistics\stbonus($time); $stat->daily(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onInitSelfDiscount() { try { $stat = new statistics\stbonus(time()); $stat->init_discount_self(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onInitInviteesDiscount() { try { $stat = new statistics\stbonus(time()); $stat->init_discount_invitee(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onDailySelfDiscount($time) { try { $stat = new statistics\stbonus($time); $stat->discount_self(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onDailyInviteeDiscount($time) { try { $stat = new statistics\stbonus($time); $stat->discount_invitee(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onInvite() { try { $stat = new statistics\stmember(time()); $stat->onInvite(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onDaiyMember($time) { try { $stat = new statistics\stmember($time); $stat->daily(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onDaiyOrder($time) { try { $stat = new statistics\statorder($time); $stat->daily(); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } public static function onDaiyBehavior($time) { try { $stat = new statistics\behavior(); $stat->analyse($time); } catch(Exception $ex) { Log::record($ex->getMessage(),Log::ERR); } } }