表情包类型接口提交
This commit is contained in:
@@ -236,23 +236,26 @@ class BlindBoxTurntableGift extends Model
|
||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['send_time'=>0,'end_time'=>['>',time()]])->order('id desc')->find();
|
||||
$xlh_periods_num = Cache::get("xlh_periods_num") ?? 0;
|
||||
if(empty($pan_xlh)){
|
||||
if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
|
||||
$xlh_periods = Cache::get("this_xlh_periods") ?? 0;
|
||||
$pan_xlh_id = db::name('vs_room_pan_xlh')->insertGetId([
|
||||
'room_id' => $room_id,
|
||||
'gift_id' => $xlh_ext['locking_condition']['locking_gift_id'],
|
||||
'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
|
||||
'periods' => $xlh_periods+1,
|
||||
'num' => 0,
|
||||
'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
|
||||
'createtime' => time()
|
||||
]);
|
||||
Cache::set("this_xlh_periods", $xlh_periods+1, 0);//修改巡乐会期数
|
||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['id'=>$pan_xlh_id])->find();
|
||||
}else{
|
||||
return ['code' => 0, 'msg' => '巡乐会已结束', 'data' => null];
|
||||
}
|
||||
return ['code' => 0, 'msg' => '巡乐会已结束', 'data' => null];
|
||||
}
|
||||
// if(empty($pan_xlh)){
|
||||
// if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
|
||||
// $xlh_periods = Cache::get("this_xlh_periods") ?? 0;
|
||||
// $pan_xlh_id = db::name('vs_room_pan_xlh')->insertGetId([
|
||||
// 'room_id' => $room_id,
|
||||
// 'gift_id' => $xlh_ext['locking_condition']['locking_gift_id'],
|
||||
// 'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
|
||||
// 'periods' => $xlh_periods+1,
|
||||
// 'num' => 0,
|
||||
// 'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
|
||||
// 'createtime' => time()
|
||||
// ]);
|
||||
// Cache::set("this_xlh_periods", $xlh_periods+1, 0);//修改巡乐会期数
|
||||
// $pan_xlh = db::name('vs_room_pan_xlh')->where(['id'=>$pan_xlh_id])->find();
|
||||
// }else{
|
||||
// return ['code' => 0, 'msg' => '巡乐会已结束', 'data' => null];
|
||||
// }
|
||||
// }
|
||||
$xlh_user_data= null;
|
||||
$room_user_data = null;
|
||||
if($pan_xlh && $pan_xlh['user_id']){
|
||||
|
||||
@@ -28,8 +28,8 @@ class Guild extends Model
|
||||
->field('id,guild_special_id,user_id,guild_name,cover,num,intro,createtime,income')
|
||||
->where(['is_show'=>1,'delete_time'=>0])
|
||||
->where($where)
|
||||
->order('num desc')
|
||||
->page($page, $page_limit)
|
||||
->order('num desc')
|
||||
->select();
|
||||
$count = Db::name('vs_guild')
|
||||
->where(['is_show'=>1,'delete_time'=>0])
|
||||
@@ -758,7 +758,7 @@ class Guild extends Model
|
||||
* 工会流水查询
|
||||
* @return array
|
||||
*/
|
||||
public function get_guild_transaction($guild_id,$start_time=0,$end_time=0,$page=1,$page_limit=20){
|
||||
public function get_guild_transaction($guild_id,$seach_start_time,$seach_end_time,$page,$page_limit){
|
||||
$guild_info = db::name('vs_guild')->where(['id'=>$guild_id,'delete_time'=>0])->find();
|
||||
if(empty($guild_info)){
|
||||
return ['code' => 0, 'msg' => '公会不存在!', 'data' => null];
|
||||
@@ -767,6 +767,8 @@ class Guild extends Model
|
||||
$all_guild_room = db::name('vs_guild_user')->where(['guild_id' => $guild_id,'status'=>1,"delete_time"=>0])->select();
|
||||
$total_transaction = 0;
|
||||
foreach ($all_guild_room as $key => $value) {
|
||||
$start_time = $seach_start_time;
|
||||
$end_time = $seach_end_time;
|
||||
if(!$start_time){
|
||||
$start_time_all = $value['createtime'];
|
||||
$end_time_all = time();
|
||||
@@ -788,7 +790,7 @@ class Guild extends Model
|
||||
}
|
||||
//查询工会所有房间流水
|
||||
$list = db::name('vs_guild_user')->where(['guild_id'=>$guild_id,'delete_time'=>0,'status'=>1,'room_id'=>['<>',0]])
|
||||
->order('coin desc')
|
||||
->order('id asc')
|
||||
->page($page, $page_limit)
|
||||
->select();
|
||||
|
||||
@@ -796,6 +798,8 @@ class Guild extends Model
|
||||
$room_data = [];
|
||||
$i=0;
|
||||
foreach ($list as $k=>$v){
|
||||
$start_time = $seach_start_time;
|
||||
$end_time = $seach_end_time;
|
||||
if(!$start_time){
|
||||
$start_time_seach = $value['createtime'];
|
||||
$end_time_seach = time();
|
||||
|
||||
Reference in New Issue
Block a user