幸运币 不参与各种礼物设置
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\common\controller\BaseCom;
|
||||
use think\Db;
|
||||
|
||||
class RoomAuction extends BaseCom
|
||||
{
|
||||
@@ -18,6 +19,10 @@ class RoomAuction extends BaseCom
|
||||
public function room_auction_time()
|
||||
{
|
||||
$gift_id = input('gift_id');
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$reslut = model('RoomAuction')->room_auction_time($gift_id);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
@@ -34,6 +39,10 @@ class RoomAuction extends BaseCom
|
||||
if (in_array($gift_id, $cp_gift_ids)) {
|
||||
return V( 0, '礼物不能是CP礼物,请重新选择');
|
||||
}
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$relation_id = input('relation_id','');
|
||||
$auction_type = input('auction_type',1);//1真爱拍 2 亲密拍
|
||||
$time_day = input('time_day', 0);//小时
|
||||
@@ -59,7 +68,10 @@ class RoomAuction extends BaseCom
|
||||
$gift_id = input('gift_id');
|
||||
$num = input('num');
|
||||
$type = input('type',1);//1金币购买 2送背包礼物
|
||||
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$reslut = model('RoomAuction')->room_auction_join($auction_id,$user_id,$gift_id,$num,$type);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,10 @@ class RoomPit extends BaseCom
|
||||
$room_id = input('room_id', 0);
|
||||
$gift_id = input('gift_id', 0);
|
||||
$gift_price = input('gift_price', 0);
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$reslut = model('RoomPit')->set_room_pit_apply_help_gift($this->uid, $room_id, $gift_id, $gift_price);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ class SingerSong extends BaseCom
|
||||
if (!$gift_id) {
|
||||
return V(0, '请选择礼物');
|
||||
}
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$gift_num = input('gift_num', 1);
|
||||
$reslut = model('SingerSong')->singerAddSong($this->uid, $song_name, $gift_id, $gift_num);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
@@ -71,6 +75,10 @@ class SingerSong extends BaseCom
|
||||
if (!$gift_id) {
|
||||
return V(0, '请选择礼物');
|
||||
}
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$gift_num = input('gift_num', 1);
|
||||
$reslut = db::name('vs_singer_song')->insert([
|
||||
'user_id' => $this->uid,
|
||||
|
||||
@@ -185,6 +185,10 @@ class UserZone extends BaseCom
|
||||
$gift_id = input('gift_id', 0);
|
||||
$num = input('num', 1);
|
||||
$is_pack = input('is_pack', 1);//2背包 1金币
|
||||
$pool_gift_id = db::name('bb_lottery_config')->where(['key' => 'pool_gift_id'])->value('value');
|
||||
if($gift_id == $pool_gift_id){
|
||||
return V(0, '此礼物不能进行此操作');
|
||||
}
|
||||
$reslut = model('GiveGift')->reward_zone($this->uid, $zid, $gift_id, $num, $is_pack);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user