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