Browse Source

给好友设置备注

lizhen_gitee 3 tháng trước cách đây
mục cha
commit
7eccf963b3
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      application/common/model/UserRemark.php

+ 3 - 3
application/common/model/UserRemark.php

@@ -35,9 +35,9 @@ class UserRemark extends Model
         }
 
         if ($info = $this->where(['user_id' => $user_id, 'to_user_id' => $to_user_id])->find()) {
-            $res = $this->where('id', $info['id'])->update(['remark' => $remark, 'updated_time' => time()]);
+            $res = $this->where('id', $info['id'])->update(['nickname_remark' => $remark, 'updatetime' => time()]);
         } else {
-            $res = $this->insert(['user_id' => $user_id, 'to_user_id' => $to_user_id, 'remark' => $remark, 'updated_time' => time()]);
+            $res = $this->insert(['user_id' => $user_id, 'to_user_id' => $to_user_id, 'nickname_remark' => $remark, 'updatetime' => time()]);
         }
         if (!$res) {
             return [false, '设置失败'];
@@ -54,7 +54,7 @@ class UserRemark extends Model
     public function delRemark(int $user_id, int $to_user_id)
     {
         if ($info = $this->where(['user_id' => $user_id, 'to_user_id' => $to_user_id])->find()) {
-            $res = $this->where('id', $info['id'])->update(['remark' => '', 'updated_time' => time()]);
+            $res = $this->where('id', $info['id'])->update(['nickname_remark' => '', 'updatetime' => time()]);
             if (!$res) {
                 return [false, '设置失败'];
             }