首页| 版块| 我的| 发帖| 消息
主题:关于帖子收藏排行Top50
zhangjingyu 
备份一段相关代码(重点应该是12,14行):
apps/collection/action/ajax.php
    if ($collectionService->insert($collectionDate)) {
        if ($type == 'tucool' && $threads[tid]) {
            $tucoolService = L::loadClass('tucool', 'forum');
            $tucoolService->updateCollectNum($threads[tid]);
        }
    if($type == 'postfavor'){
        $fid = $db->get_value('SELECT fid FROM pw_threads WHERE tid = '.S::sqlEscape($id));
        L::loadClass('elementupdate', '', false);
        $elementupdate = new ElementUpdate();
        $elementupdate->newfavorUpdate($id, $fid);
        if ($db_ifpwcache & 1024) {
        $elementupdate->hotfavorUpdate($id, $fid);
        }
        updateDatanalyse($id, 'threadFav', 1);
    }
        Showmsg('job_favor_success');ajax_footer();
    } else {
        Showmsg('data_error');
    }
}
zhangjingyu回帖于2018-08-10 17:17[查看电脑版]
下一楼»:继续楼上查看(以“hotfavor”搜索),果然是和第12行hotfavorUpdate有关,这里应该是重点。(zhangjingyu)
«上一楼:往后研究什么?缓存数据表里就这一条数据,调用正确,更新时间正确。还研究什么?怎么写入数据的 ..

查看全部回帖(77)
«返回主帖