更新
This commit is contained in:
@@ -109,7 +109,7 @@ class RoomAuction extends Model
|
||||
|
||||
|
||||
//参与竞拍
|
||||
public function room_auction_join($auction_id,$user_id,$gift_id,$num,$type)
|
||||
public function room_auction_join($auction_id,$user_id,$gift_id,$num,$type,$ext=[])
|
||||
{
|
||||
if(!$auction_id){
|
||||
return ['code' => 0, 'msg' => '拍卖已经结束','data' => null];
|
||||
@@ -127,7 +127,7 @@ class RoomAuction extends Model
|
||||
}
|
||||
|
||||
//走送礼流程
|
||||
$ree = model('GiveGift')->give_gift($user_id,$auction['user_id'],$gift_id,$num,2,$type,$auction['room_id'],0,0);
|
||||
$ree = model('GiveGift')->give_gift($user_id,$auction['user_id'],$gift_id,$num,2,$type,$auction['room_id'],0,0,$ext);
|
||||
if($ree['code'] != 1){
|
||||
return ['code' => $ree['code'], 'msg' => $ree['msg'],'data' => null];
|
||||
}
|
||||
@@ -137,7 +137,7 @@ class RoomAuction extends Model
|
||||
'auction_id' => $auction_id,
|
||||
'user_id' => $user_id,
|
||||
'gift_id' => $gift_id,
|
||||
'gift_price' => $num * $gift_price,
|
||||
'gift_price' => $ree['data']['gift_total'],
|
||||
'createtime' => time()
|
||||
]);
|
||||
if(!$res){
|
||||
@@ -167,7 +167,7 @@ class RoomAuction extends Model
|
||||
->where(['auction_id' => $auction_id])
|
||||
->group('user_id')
|
||||
->having('gift_prices >= ' . $auction['gift_price'])
|
||||
->order('gift_prices DESC')
|
||||
->order('gift_prices DESC, id ASC')
|
||||
->limit(6)
|
||||
->select();
|
||||
if($list){
|
||||
@@ -292,9 +292,11 @@ class RoomAuction extends Model
|
||||
//查询是否有电影房
|
||||
$cp_movie = $this->movie_room_create_or_add($list['user_id'],$res['user_id'],$res['relation_id'],$res['time_day']);
|
||||
if($cp_movie['code'] != 1){
|
||||
return ['code' => 0, 'msg'=>$cp_movie['msg'], 'data'=>$cp_movie['data']];
|
||||
// return ['code' => 0, 'msg'=>$cp_movie['msg'], 'data'=>$cp_movie['data']];
|
||||
}else{
|
||||
$cp_room_id = $cp_movie['data']['cp_room_id'];
|
||||
}
|
||||
$cp_room_id = $cp_movie['data']['cp_room_id'];
|
||||
|
||||
}
|
||||
$texts = '恭喜'.$auction['nickname'].' 和 '.$recipient['nickname'].',获得'.$auction['relation_name'].' 关系'.$auction['time_day'].'小时';
|
||||
}else{//拍得无关系
|
||||
|
||||
Reference in New Issue
Block a user