stanley-king 8 yıl önce
ebeveyn
işleme
d42a5fb678

+ 1 - 1
helper/account_helper.php

@@ -109,7 +109,7 @@ class account_helper
     {
         $last_type = bonus_helper::last_invite_type($relay_id);
         if(is_null($last_type) == false) {
-            $type = bonus_helper::create_type($last_type);
+            $type = bonus_helper::create_by_paramer($last_type);
             if($type->binded_over() == false && $type->isEnd() == false) {
                 return $type->getType_sn();
             }

+ 4 - 1
helper/bonus_helper.php

@@ -69,9 +69,12 @@ class bonus_helper
         return ($send_type == \bonus\type::SendType_Random);
     }
 
-    static public function create_type($param) {
+    static public function create_type_input($param) {
         return \bonus\type::crate_by_input($param);
     }
+    static public function create_by_paramer($param) {
+        return \bonus\type::create_by_paramer($param);
+    }
     static public function create_type_sn($type_sn) {
         return \bonus\type::create_by_sn($type_sn);
     }

+ 1 - 1
mobile/control/admin_oper.php

@@ -149,7 +149,7 @@ class admin_operControl extends mbMemberControl
 
         $param = $_GET;
         $this->add_system($param);
-        $type = bonus_helper::create_type($param);
+        $type = bonus_helper::create_type_input($param);
 
         $pre_helper = new predeposit_helper($_SESSION['member_id']);
         $ret = $pre_helper->admin_make_bonus($type->get_param(),$rate_moneys);

+ 3 - 3
mobile/control/member_bonus.php

@@ -76,7 +76,7 @@ class member_bonusControl extends mbMemberControl
             $bonus_rate = -1;
         }
         $param = $this->fill_param($_GET,$bonus_rate);
-        $type = bonus_helper::create_type($param);
+        $type = bonus_helper::create_type_input($param);
 
         if(!$this->mPred->person_enough($type->getTotal_amount(),$bonus_rate)) {
             return self::outerr(errcode::ErrBonusNotEnough,'余额不够发送红包');
@@ -117,7 +117,7 @@ class member_bonusControl extends mbMemberControl
 
         $bonus  = \bonus\user_bonus::create_by_sn($_GET['bonus_sn']);
         $param = $this->fill_param($_GET,$bonus->bonus_rate());
-        $type = bonus_helper::create_type($param);
+        $type = bonus_helper::create_type_input($param);
 
         $type_amount  = intval($type->getTotal_amount() * 100 + 0.5);
         $bonus_amount = intval($bonus->remain_amount()  * 100 + 0.5);
@@ -155,7 +155,7 @@ class member_bonusControl extends mbMemberControl
     {
         $type_sn = account_helper::invite_bonus($_SESSION['member_id'],$err);
         if($type_sn == false) {
-            return self::outerr($err['code'],$err['msg']);
+            return self::outerr(errcode::ErrBonus,"生成邀请红包失败.");
         }
         else
         {