rabin 3 yıl önce
ebeveyn
işleme
cda7e23989
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5 5
      app/shop/lib/Record.php

+ 5 - 5
app/shop/lib/Record.php

@@ -48,10 +48,10 @@ class Record
     	return $ids;
     }
     public function insertRecord($id,$name,$data){
-        $sid= Dever::param('sid',$data);
+        $shop_id= Dever::param('shop_id',$data);
         $type = Dever::param('type',$data);
         $price = Dever::param('price',$data);
-        $shop = Dever::db('shop/info')->find(array('sid'=>$sid));
+        $shop = Dever::db('shop/info')->find($shop_id);
         
         if($type && $type == 2 && $price){
             if($shop['price']<$price){
@@ -62,11 +62,11 @@ class Record
     #充值和提现
     public function updateRecord($id,$name,$data){
     	$audit = Dever::input('audit',$data);
-    	$sid = Dever::input('sid',$data);
+    	$shop_id = Dever::input('shop_id',$data);
         $type = Dever::input('type',$data);
         $price = Dever::input('price',$data);
         $info = Dever::db('shop/record')->find($id);
-       	$shop = Dever::db('shop/info')->find(array('sid'=>$info['sid']));        
+       	$shop = Dever::db('shop/info')->find($shop_id);        
         if ($info) {
             $where['where_id'] = $shop['id'];
             $where['price'] = $info['price'];
@@ -84,7 +84,7 @@ class Record
                 
             }
             Dever::db('shop/info')->upCash($where);
-            $ids = Dever::db('shop/info')->find(array('sid'=>$info['sid'],'s'=>1));
+            $ids = Dever::db('shop/info')->find(array('id'=>$shop_id,'s'=>1));
             if($info['type'] == 1){
             	$insert['yue'] = $ids['price'];
             }