表名同步
This commit is contained in:
@@ -133,7 +133,7 @@ class Device extends Controller
|
||||
$order = Request::param('order', 'desc');
|
||||
|
||||
// 添加公司ID过滤条件
|
||||
$where['d.companyId'] = $userInfo['companyId'];
|
||||
$where['d.tenantId'] = $userInfo['companyId'];
|
||||
|
||||
// 根据用户管理员状态调整查询条件
|
||||
if ($userInfo['isAdmin'] == 1) {
|
||||
|
||||
@@ -10,7 +10,7 @@ use think\Db;
|
||||
class Device extends Model
|
||||
{
|
||||
// 设置表名
|
||||
protected $name = 'device';
|
||||
protected $table = 's2_device';
|
||||
|
||||
/**
|
||||
* 获取设备总数
|
||||
|
||||
@@ -10,8 +10,9 @@ use think\model\concern\SoftDelete;
|
||||
*/
|
||||
class Workbench extends Model
|
||||
{
|
||||
|
||||
protected $table = 'ck_workbench';
|
||||
protected $pk = 'id';
|
||||
protected $name = 'workbenches';
|
||||
|
||||
// 自动写入时间戳
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
@@ -9,6 +9,7 @@ use think\Model;
|
||||
*/
|
||||
class WorkbenchAutoLike extends Model
|
||||
{
|
||||
protected $table = 'ck_workbench_auto_like';
|
||||
protected $pk = 'id';
|
||||
protected $name = 'workbench_auto_like';
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use think\Model;
|
||||
|
||||
class WorkbenchGroupCreate extends Model
|
||||
{
|
||||
protected $table = 'ck_workbench_group_create';
|
||||
protected $pk = 'id';
|
||||
protected $name = 'workbench_group_create';
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use think\Model;
|
||||
|
||||
class WorkbenchGroupPush extends Model
|
||||
{
|
||||
protected $table = 'ck_workbench_group_push';
|
||||
protected $pk = 'id';
|
||||
protected $name = 'workbench_group_push';
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use think\Model;
|
||||
|
||||
class WorkbenchMomentsSync extends Model
|
||||
{
|
||||
protected $table = 'ck_workbench_moments_sync';
|
||||
protected $pk = 'id';
|
||||
protected $name = 'workbench_moments_sync';
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class FriendTaskJob
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 更新缓存中的页码,设置10分钟过期
|
||||
Cache::set('friendTaskPage', $pageIndex + 1, 600);
|
||||
Cache::set('friendTaskPage', $pageIndex + 1, 86400);
|
||||
Log::info('更新缓存,下一页页码:' . ($pageIndex + 1) . ',缓存时间:10分钟');
|
||||
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
@@ -93,7 +93,7 @@ class FriendTaskJob
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
} else {
|
||||
// 没有下一页,重置缓存,设置10分钟过期
|
||||
Cache::set('friendTaskPage', 0, 600);
|
||||
Cache::set('friendTaskPage', 0, 86400);
|
||||
Log::info('获取完成,重置缓存,缓存时间:10分钟');
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class WechatChatroomJob
|
||||
// 判断是否有下一页
|
||||
if (!empty($data) && count($data['results']) > 0) {
|
||||
// 更新缓存中的页码,设置10分钟过期
|
||||
Cache::set('chatroomPage', $pageIndex + 1, 600);
|
||||
Cache::set('chatroomPage', $pageIndex + 1, 86400);
|
||||
Log::info('更新缓存,下一页页码:' . ($pageIndex + 1) . ',缓存时间:10分钟');
|
||||
|
||||
// 有下一页,将下一页任务添加到队列
|
||||
@@ -93,7 +93,7 @@ class WechatChatroomJob
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
} else {
|
||||
// 没有下一页,重置缓存,设置10分钟过期
|
||||
Cache::set('chatroomPage', 0, 600);
|
||||
Cache::set('chatroomPage', 0, 86400);
|
||||
Log::info('获取完成,重置缓存,缓存时间:10分钟');
|
||||
}
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@ class WechatFriendJob
|
||||
$lastFriendId = $data[count($data)-1]['id'];
|
||||
|
||||
// 更新缓存中的页码和最后一个好友ID,设置10分钟过期
|
||||
Cache::set('friendsPage', $pageIndex + 1, 600);
|
||||
Cache::set('preFriendId', $lastFriendId, 600);
|
||||
Cache::set('friendsPage', $pageIndex + 1, 86400);
|
||||
Cache::set('preFriendId', $lastFriendId, 86400);
|
||||
|
||||
Log::info('更新缓存,下一页页码:' . ($pageIndex + 1) . ',最后好友ID:' . $lastFriendId . ',缓存时间:10分钟');
|
||||
|
||||
@@ -102,8 +102,8 @@ class WechatFriendJob
|
||||
Log::info('添加下一页任务到队列,页码:' . $nextPageIndex);
|
||||
} else {
|
||||
// 没有下一页,重置缓存,设置10分钟过期
|
||||
Cache::set('friendsPage', 0, 600);
|
||||
Cache::set('preFriendId', '', 600);
|
||||
Cache::set('friendsPage', 0, 86400);
|
||||
Cache::set('preFriendId', '', 86400);
|
||||
Log::info('获取完成,重置缓存,缓存时间:10分钟');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user