巡乐会抽奖接口提交.-后台巡乐会列表提交
This commit is contained in:
@@ -209,7 +209,7 @@ class BlindBox extends adminApi
|
|||||||
$data = [];
|
$data = [];
|
||||||
$data['quantity'] = $quantity;
|
$data['quantity'] = $quantity;
|
||||||
$data['remaining_number'] = $quantity;
|
$data['remaining_number'] = $quantity;
|
||||||
$data['$is_world_show'] = $is_world_show;
|
$data['is_world_show'] = $is_world_show;
|
||||||
$data['weight'] = $weight;
|
$data['weight'] = $weight;
|
||||||
if(!empty($gift_id)){
|
if(!empty($gift_id)){
|
||||||
$data['foreign_id'] = $gift_id;
|
$data['foreign_id'] = $gift_id;
|
||||||
@@ -547,6 +547,7 @@ class BlindBox extends adminApi
|
|||||||
$lists[$key]['is_public_screen'] = $gift_data['is_public_screen'];
|
$lists[$key]['is_public_screen'] = $gift_data['is_public_screen'];
|
||||||
$lists[$key]['is_public_server'] = $gift_data['is_public_server'];
|
$lists[$key]['is_public_server'] = $gift_data['is_public_server'];
|
||||||
$lists[$key]['is_world_show'] = $value['is_world_show'];
|
$lists[$key]['is_world_show'] = $value['is_world_show'];
|
||||||
|
$lists[$key]['weight'] = $value['weight'];
|
||||||
$lists[$key]['createtime'] = date('Y-m-d H:i:s', $value['createtime']);
|
$lists[$key]['createtime'] = date('Y-m-d H:i:s', $value['createtime']);
|
||||||
}
|
}
|
||||||
//统计
|
//统计
|
||||||
@@ -723,7 +724,7 @@ class BlindBox extends adminApi
|
|||||||
$page_limit = input('page_limit', 30);
|
$page_limit = input('page_limit', 30);
|
||||||
$gift_id = input('gift_id', '');
|
$gift_id = input('gift_id', '');
|
||||||
$user_id = input('user_id', '');
|
$user_id = input('user_id', '');
|
||||||
$room_id = input('room_id', '');
|
$room_id = input('room_id', 0);
|
||||||
$periods = input('periods', '');
|
$periods = input('periods', '');
|
||||||
$where = [];
|
$where = [];
|
||||||
$where['b.room_id'] = $room_id;
|
$where['b.room_id'] = $room_id;
|
||||||
@@ -737,17 +738,42 @@ class BlindBox extends adminApi
|
|||||||
if($periods){
|
if($periods){
|
||||||
$where['b.periods'] = $periods;
|
$where['b.periods'] = $periods;
|
||||||
}
|
}
|
||||||
$count = db::name('vs_room_pan_xlh_log')
|
|
||||||
->alias('a')
|
|
||||||
->join('vs_room_pan_xlh b', 'a.xlh_id = b.id', 'left')
|
|
||||||
->join('user c', 'a.user_id = c.id', 'left')
|
|
||||||
|
|
||||||
|
$count = db::name('vs_room_pan_xlh_log')->alias('a')
|
||||||
|
->join('vs_room_pan_xlh b', 'a.xlh_id = b.id')
|
||||||
->where($where)->count();
|
->where($where)->count();
|
||||||
$lists_data = db::name('vs_room_pan_xlh_log')
|
$lists_data = db::name('vs_room_pan_xlh_log')->alias('a')
|
||||||
|
->join('vs_room_pan_xlh b', 'a.xlh_id = b.id')
|
||||||
|
->field('a.id,b.periods as periods,a.user_id,a.createtime,b.user_id,b.room_id,b.gift_id,b.num,a.is_send,b.pay_price,b.locking_gift_id')
|
||||||
->where($where)
|
->where($where)
|
||||||
->page($page, $page_limit)
|
->page($page, $page_limit)
|
||||||
->order("id desc")
|
->order("id desc")
|
||||||
->select();
|
->select();
|
||||||
$lists = [];
|
$lists = [];
|
||||||
|
foreach ($lists_data as $key => $value) {
|
||||||
|
$lists[$key]['id'] = $value['id'];
|
||||||
|
$lists[$key]['periods'] = $value['periods'];
|
||||||
|
$lists[$key]['user'] = $value['user_id']."-".db::name('user')->where('id',$value['user_id'])->value('nickname');
|
||||||
|
//支付价格
|
||||||
|
$lists[$key]['pay_price'] = $value['pay_price'];
|
||||||
|
$gift = db::name('vs_gift')->field('gid,gift_name,gift_price')->where('gid',$value['locking_gift_id'])->find();
|
||||||
|
$lists[$key]['gift_id'] = $value['locking_gift_id'];
|
||||||
|
$lists[$key]['gift_name'] = $gift['gift_name']??"";
|
||||||
|
$lists[$key]['gift_price'] = $gift['gift_price']??0;
|
||||||
|
$lists[$key]['locking_num'] = $value['num'];
|
||||||
|
$lists[$key]['is_send'] = $value['is_send'];
|
||||||
|
$lists[$key]['is_send_str'] = $value['is_send']==1?"已发送":"未发送";
|
||||||
|
$lists[$key]['createtime'] = date('Y-m-d H:i:s',$value['createtime']);
|
||||||
|
}
|
||||||
|
//今日锁定礼物数量
|
||||||
|
$return_data = [
|
||||||
|
'page' =>$page,
|
||||||
|
'page_limit' => $page_limit,
|
||||||
|
'count' => count($lists_data),
|
||||||
|
'lists' => $lists,
|
||||||
|
'locking_num' => $count
|
||||||
|
];
|
||||||
|
return V(1,"成功", $return_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -538,6 +538,8 @@ class BlindBoxTurntableGift extends Model
|
|||||||
}
|
}
|
||||||
db::name('vs_room_pan_xlh')->where('id',$pan_xlh['id'])->update([
|
db::name('vs_room_pan_xlh')->where('id',$pan_xlh['id'])->update([
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
|
'pay_price' =>$ext['xlh_box_price'],
|
||||||
|
'locking_gift_id' =>$gift_bag_detail['foreign_id'],
|
||||||
'num' => $pan_xlh_num,
|
'num' => $pan_xlh_num,
|
||||||
'end_time' => $end_time,
|
'end_time' => $end_time,
|
||||||
'updatetime' => time()
|
'updatetime' => time()
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ class RoomPan
|
|||||||
$res = db::name('vs_room_pan_xlh')->where('id',$value['id'])->update([
|
$res = db::name('vs_room_pan_xlh')->where('id',$value['id'])->update([
|
||||||
'send_time' => time()
|
'send_time' => time()
|
||||||
]);
|
]);
|
||||||
|
$xlh_log = db::name('vs_room_pan_xlh_log')->where(['xlh_id'=>$value['id'],'user_id'=>$value['user_id']])->order('id desc')->find();
|
||||||
|
$res = db::name('vs_room_pan_xlh_log')->where('id',$xlh_log)->update([
|
||||||
|
'is_send' => 1
|
||||||
|
]);
|
||||||
if ($res === false) {
|
if ($res === false) {
|
||||||
echo "处理发放记录失败 \n";
|
echo "处理发放记录失败 \n";
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user