1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-06 00:41:09 +08:00
jacky huang a93ce8e293
v1.2.3 (#19)
* 去除无用的auth_url

* 修改readme

* 修复计划任务生成sitemap.xml失败问题

* 增加课程推荐

* 增加后台刷新首页缓存小工具

* 调整公众号模板消息

* 增加刷新首页推荐课程缓存逻辑

* 更新课程综合评分算法

* 修复在线用户并发重复记录问题

* 增加限制共享帐号功能

* 修复数据迁移中无符号整型问题

* 更新版本为v1.2.3
2021-01-03 15:13:40 +08:00

29 lines
660 B
PHP

<?php
namespace App\Repos;
use App\Models\Online as OnlineModel;
use Phalcon\Mvc\Model\Resultset;
use Phalcon\Mvc\Model\ResultsetInterface;
class Online extends Repository
{
/**
* @param int $userId
* @param string $activeDate
* @return ResultsetInterface|Resultset|OnlineModel[]
*/
public function findByUserDate($userId, $activeDate)
{
$startTime = strtotime($activeDate);
$endTime = $startTime + 86400;
return OnlineModel::query()
->where('user_id = :user_id:', ['user_id' => $userId])
->betweenWhere('active_time', $startTime, $endTime)
->execute();
}
}