Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

随机查询 #34

Closed
inkss opened this issue May 24, 2022 · 8 comments
Closed

随机查询 #34

inkss opened this issue May 24, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@inkss
Copy link

inkss commented May 24, 2022

Order("random()").

mysql/mariadb 的随机函数是 rand() 吧。

@qwqcode
Copy link
Member

qwqcode commented May 24, 2022

😅😅😅

@inkss
Copy link
Author

inkss commented May 25, 2022

查询类的能给url加个模糊查询吗?随机文章/随机页面的区别。

另外,查评论类的返回的评论内容,后端能做下解析不?现在是直接返回了原始MD内容啦

@inkss
Copy link
Author

inkss commented May 25, 2022

另外能不能加这么一个Api,根据网站名称,用户名,邮件查询当前用户是否存在未读通知,返回数量和通知内容。

拿来实现:访问网站时,欢迎用户并提醒用户查阅未读消息。

@qwqcode
Copy link
Member

qwqcode commented May 25, 2022

OK 😀

qwqcode referenced this issue Jun 6, 2022
Signed-off-by: qwqcode <qwqcode@gmail.com>
@qwqcode qwqcode added the bug Something isn't working label Jun 6, 2022
@qwqcode
Copy link
Member

qwqcode commented Jun 6, 2022

那个模糊查询以后再做了,我决定引入 Graphql,想怎么查怎么查

用户未读信息查询其实有现成的 API:

POST /api/user-get

  • name:用户名
  • email:邮箱
  • site_name:站点名

响应体:

{
  "success": true,
  "data": {
    "is_login": false,
    "unread": [
        {
            "id": 419,
            "user_id": 76,
            "comment_id": 233,
            "is_read": false,
            "is_emailed": true,
            "read_link": "https://artalk.js.org/?atk_comment=233&atk_notify_key=xxxxxxx"
      }
    ],
    "unread_count": 3,
    "user": {
      "id": 233,
      "name": "用户名",
      "email": "邮箱@gmail.com",
      "link": "链接",
      "badge_name": "管理员",
      "badge_color": "#FF6C00",
      "is_admin": true,
      "site_names": null,
      "site_names_raw": "",
      "receive_email": true
    }
}

@qwqcode
Copy link
Member

qwqcode commented Jun 6, 2022

所有 API 查询得到的评论数据在后续版本中增加 content_marked 字段,为后端 Markdown 解析后的 content

@inkss
Copy link
Author

inkss commented Jun 6, 2022

所有 API 查询得到的评论数据在后续版本中增加 content_marked 字段,为后端 Markdown 解析后的 content

👌 感谢

@qwqcode qwqcode closed this as completed Jun 6, 2022
@qwqcode
Copy link
Member

qwqcode commented Jun 7, 2022

新版构建已发布 v2.1.9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants