|
|
@@ -435,6 +435,45 @@ class Index extends Controller
|
|
|
return $uuid ;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 彩蛋中奖列表
|
|
|
+ * @return mixed|Json
|
|
|
+ * @throws DataNotFoundException
|
|
|
+ * @throws DbException
|
|
|
+ * @throws ModelNotFoundException
|
|
|
+ */
|
|
|
+ public function easterEggDrawList()
|
|
|
+ {
|
|
|
+ $orders = Db::table('awards_order')->alias('o')
|
|
|
+ ->leftJoin('awards_user_info u', 'o.uid = u.uid')
|
|
|
+ ->leftJoin('awards_gift g', 'o.gift_id = g.id')
|
|
|
+ ->field(['u.nickname', 'g.name as giftName'])
|
|
|
+ ->where('o.type', 1)
|
|
|
+ ->select();
|
|
|
+
|
|
|
+ return $this->successResponse($orders);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function rankingDrawList()
|
|
|
+ {
|
|
|
+ $activity = Db::table('awards_activity')->where('end_at', '<', time())->find();
|
|
|
+ $isBeginActivity = 1;
|
|
|
+ if ($activity) {
|
|
|
+ $isBeginActivity = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ $orders = [];
|
|
|
+ if ($isBeginActivity == 0) {
|
|
|
+ $orders = Db::query("select u.nickname, u.portrait, l.uid, l.duration, l.number from awards_user_task_log as l left join awards_user_info as u on l.uid = u.uid
|
|
|
+where u.portrait != '' and u.portrait is not null and l.number >= 15 group by l.uid order by l.id desc limit 50");
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this->successResponse([
|
|
|
+ 'isBeginActivity' => $isBeginActivity,
|
|
|
+ 'list' => $orders
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 头号排行接口
|
|
|
* @throws FuncNotFoundException
|