足迹排序

This commit is contained in:
2025-12-05 22:07:17 +08:00
parent eb15a69649
commit 76af99f47e
4 changed files with 4 additions and 25 deletions

View File

@@ -544,6 +544,7 @@ class User extends Model
public function add_user_visit_log($type,$from_uid,$to_uid){
$visit = db::name('user_visit_log')->where(['from_uid' => $from_uid,'to_id' => $to_uid,'type' => $type])->find();
if($visit){
db::name('user_visit_log')->where(['id' => $visit['id']])->update(['updatetime' => time()]);
return true;
}
$data = [
@@ -551,6 +552,7 @@ class User extends Model
'from_uid' => $from_uid,
'to_id' => $to_uid,
'createtime' => time(),
'updatetime' => time(),
];
db::name('user_visit_log')->insert($data);
return true;