用户装扮详情 修改
This commit is contained in:
@@ -379,52 +379,43 @@ class Decorate extends Model
|
|||||||
public function user_decorate_detail($id, $type){
|
public function user_decorate_detail($id, $type){
|
||||||
//根据$type 组装查询条件
|
//根据$type 组装查询条件
|
||||||
$reslut = "";
|
$reslut = "";
|
||||||
|
$map = [
|
||||||
|
'user_id' => $room['user_id']??0,
|
||||||
|
'type' => $type,
|
||||||
|
'is_using' => 1
|
||||||
|
];
|
||||||
|
$user_decorate = db::name('vs_user_decorate')->where($map)->order('id', 'desc')->find();
|
||||||
|
if(empty($user_decorate)){
|
||||||
|
return $reslut;
|
||||||
|
}
|
||||||
|
if($user_decorate['end_time']==2 && $user_decorate['end_time'] < time()){
|
||||||
|
return $reslut;
|
||||||
|
}
|
||||||
if($type == 7){//7房间靓号 8工会靓号
|
if($type == 7){//7房间靓号 8工会靓号
|
||||||
$room = db::name('vs_room')->where('id', $id)->field('user_id,room_number')->find();
|
$room = db::name('vs_room')->where('id', $id)->field('user_id,room_number')->find();
|
||||||
if(empty($room)){
|
if(empty($room)){
|
||||||
return $reslut;
|
return $reslut;
|
||||||
}
|
}
|
||||||
$map = [
|
$reslut = $user_decorate['special_num'] ?? $room['room_number'];
|
||||||
'user_id' => $room['user_id']??0,
|
|
||||||
'type' => $type,
|
|
||||||
'is_using' => 1
|
|
||||||
];
|
|
||||||
$reslut = db::name('vs_user_decorate')->where($map)->where('end_time',['>=',time()],'or')->value('special_num') ?? $room['room_number'];
|
|
||||||
}elseif($type == 8){
|
}elseif($type == 8){
|
||||||
$guild = db::name('vs_guild')->where('id', $id)->field('user_id,guild_special_id')->find();
|
$guild = db::name('vs_guild')->where('id', $id)->field('user_id,guild_special_id')->find();
|
||||||
$map = [
|
if(empty($guild)){
|
||||||
'user_id' => $guild['user_id']??0,
|
return $reslut;
|
||||||
'type' => $type,
|
}
|
||||||
'is_using' => 1
|
$reslut = $user_decorate['special_num'] ?? $guild['guild_special_id'];
|
||||||
];
|
|
||||||
$reslut = db::name('vs_user_decorate')->where($map)->where('end_time',['>=',time()],'or')->value('special_num') ?? $guild['guild_special_id'];
|
|
||||||
}elseif($type == 6){
|
}elseif($type == 6){
|
||||||
$map = [
|
|
||||||
'user_id' => $id??0,
|
|
||||||
'type' => $type,
|
|
||||||
'is_using' => 1
|
|
||||||
];
|
|
||||||
$user_code = db::name('user')->where('id', $id)->value('user_code');
|
$user_code = db::name('user')->where('id', $id)->value('user_code');
|
||||||
$reslut = db::name('vs_user_decorate')->where($map)->where('end_time',['>=',time()],'or')->value('special_num') ?? $user_code;
|
if(empty($user_code)){
|
||||||
|
return $reslut;
|
||||||
|
}
|
||||||
|
$reslut = $user_decorate['special_num'] ?? $user_code;
|
||||||
}else{
|
}else{
|
||||||
$map = [
|
if($type == 9 || $type == 10 || $type == 11){
|
||||||
'user_id' => $id??0,
|
$reslut = db::name('vs_decorate')->where('did', $user_decorate['did'])->value('base_image');
|
||||||
'type' => $type,
|
|
||||||
'is_using' => 1
|
|
||||||
];
|
|
||||||
$did = db::name('vs_user_decorate')->where($map)->where('end_time',['>=',time()],'or')->value('did');
|
|
||||||
if(empty($did)){
|
|
||||||
$reslut = '';//返回数据
|
|
||||||
}else{
|
}else{
|
||||||
if($type == 9){
|
$reslut = db::name('vs_decorate')->where('did', $user_decorate['did'])->value('play_image');
|
||||||
$reslut = db::name('vs_decorate')->where('did', $did)->value('base_image');
|
|
||||||
}else{
|
|
||||||
$reslut = db::name('vs_decorate')->where('did', $did)->value('play_image');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $reslut;
|
return $reslut;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user