连线传奇 搬移。

This commit is contained in:
2026-01-27 20:13:04 +08:00
parent 31181d74c7
commit 9fbf23279b
3 changed files with 35 additions and 9 deletions

View File

@@ -64,6 +64,13 @@ class Monster extends BaseCom
return V($reslut['code'],$reslut['msg'], $reslut['data']);
}
//奖池
public function get_monster_box_list(){
$reslut = model('Monster')->get_monster_box_list();
return V($reslut['code'],$reslut['msg'], $reslut['data']);
}
//开奖记录
public function get_monster_log(){
$uid = $this->uid;

View File

@@ -624,21 +624,23 @@ class Monster extends Model
}
//我的列表
public function get_user_monster_log($mid, $order, $sort, $page = 1, $limit = 20)
{
public function get_user_monster_log($uid, $page, $page_limit){
$user_info = db::name('user')->where('id', $uid)->find();
if(!$user_info){
return ['code' => 201, 'msg' => '参数错误', 'data' => null];
}
$list = db::name('user_monster_log')->where('mid', $mid)->order($order, $sort)->page($page, $limit)->select();
foreach ($list as $k => &$v) {
// $map = [];
// $map[] = ['a.uid', '=', $uid];
$user_monster_log = db::name('user_monster_win_log')->alias('a')->join('yy_user b', 'a.uid = b.uid')->join('yy_monster c', 'a.win_type = c.type')->join('yy_gift d', 'd.gid = a.win_gid')->field('a.id,a.mid,b.uid,b.nick_name,b.base64_nick_name,b.head_pic,a.win_type,c.type_name,d.gift_name,d.base_image,d.gift_price,a.num,a.add_time')->order('a.id desc')->page($page, $page_limit)->select();
foreach ($user_monster_log as $k => &$v){
$user_info = db::name('user')->where('id', $v['uid'])->field('id,nickname,avatar')->find();
$v['nick_name'] = $user_info['nickname'];
$v['head_pic'] = $user_info['avatar'];
$v['type_name'] = db::name('Monster')->where('type', $v['type'])->value('type_name');
}
$data = [];
$data['count'] = db::name('user_monster_log')->where('mid', $mid)->count();
$data['list'] = $list;
return ['code' => 1, 'msg' => '获取成功', 'data' => $data];
return ['code' => 200, 'msg' => '获取成功', 'data' => $user_monster_log];
}
//中奖次数榜单

View File

@@ -55,6 +55,10 @@ class PerformPerSecond
$this->bar_room_time_end();
echo "\n";
echo "炼仙传说监控:\n";
$this->create_monster_log();
echo "\n";
}
@@ -390,4 +394,17 @@ class PerformPerSecond
}
echo "酒吧房间时间结束处理完成\n";
}
//监控练仙传说
public function create_monster_log(){
$key_name = "admin:cli:create_monster_log";
redis_lock_exit($key_name,1,1);
$reslut = model('api/Monster')->create_monster_log();
redis_unlock($key_name);
if($reslut['code'] == 0){
echo date('Y-m-d H:i:s') . "监控练仙传说 执行失败" . $reslut['msg'] . "\r\n";
}else{
echo date('Y-m-d H:i:s') . "监控练仙传说 执行成功" . $reslut['data'] . "\r\n";
}
}
}