优化:Give_Gift 表查询处理
This commit is contained in:
@@ -72,9 +72,9 @@ class Room extends Model
|
||||
*/
|
||||
public function getRoomFlow($room_id,$stime='',$etime=''){
|
||||
$give_where = [];
|
||||
$give_where['from_id'] = $room_id;
|
||||
$give_where['room_id'] = $room_id;
|
||||
// $give_where['from'] = ["in",[2,3,6]];
|
||||
$give_where['from'] = 2;
|
||||
// $give_where['from'] = 2;
|
||||
if(!empty($stime)){
|
||||
$give_where['createtime'] = ['>=',strtotime($stime)];
|
||||
}
|
||||
@@ -85,8 +85,8 @@ class Room extends Model
|
||||
// $give_where['createtime'] = ['between',[strtotime($stime),strtotime($etime)]];
|
||||
$give_where['createtime'] = [['>=',strtotime($stime)],['<',strtotime($etime)]];
|
||||
}
|
||||
$total_price = db::name('vs_give_gift')->where($give_where)
|
||||
->sum('total_price');
|
||||
$total_price = db::name('vs_guild_flow')->where($give_where)
|
||||
->sum('flow_price');
|
||||
return $total_price;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user