Closed iRuxu closed 3 years ago
Q1.团队主页 https://www.jx3box.com/team/#/org/view/483 用来给团队留言或点评这个团队 Q2.一个团队可以理解成就是一篇文章,team_id Q3.不做查看权限了,但是团队创始人有删除的权利
Q1.不用管图,评论是任何人可以发,相当于别人来点评这个团队,或者询问这个团队一些事情。团队创建人就是这个帖子的作者。 Q2.没有那么复杂,就是怎么来设定,知道这个短消息是发给某个人。比如这里,是发给团队创建人。如果还有些别的栏目,是希望发给另外的人,怎么实现,比如剑三百科,就希望发给百科词条的创建人。 https://www.jx3box.com/wiki/#/
通过设置
// 通过设置 category来支持发送不同的消息。
<Comment id="100" category="post" />
<Comment id="100" category="wiki" />
<Comment id="100" category="team" />
每增加一种类型,如果需要发送消息给对应的创建者 ,需要更新代码一次,因为每种类型的获取创建者的表都不一致
由于每种评论都需要进行点击跳转:请确认每种类型的message相关字段的值
类型 | source_id | source_type | type | subtype | 消息模板 |
---|---|---|---|---|---|
post | id 的值 | 根据post id查询数据得到的type | comment | comment_post | %s 评论了你的文章 |
wiki | id 的值 | ? | ? | ? | ? |
team | id 的值 | org | team | comment_org | 你的团队有一条新的留言 |
wiki等下个月再弄,可能需要重构。 team见上表
新增一种评论类型
类型 | source_id | source_type | type | subtype | 消息模板 |
---|---|---|---|---|---|
collection | id 的值 | collection | collection | comment_collection | 你的小册有一条新的评论 |
通知的用户为 jx3box/post_collections表的user_id字段,传入的id对应该表的id
新增一种评论类型
类型 | source_id | source_type | type | subtype | 消息模板 |
---|---|---|---|---|---|
item_plan | id 的值 | item_plan | item_plan | comment_item_plan | 你的清单有一条新的评论 |
通知的用户为jx3box_helper/helper_item_plans表的user_id字段,传入的id对应该表的id
新增一种评论类型
类型 source_id source_type type subtype 消息模板 item_plan id 的值 item_plan item_plan comment_item_plan 你的清单有一条新的评论 通知的用户为jx3box_helper/helper_item_plans表的user_id字段,传入的id对应该表的id
我没有jx3box_helper的权限。
或者给我一个线上接口 让我可以根据id 会哦去到 user_id的值。 避免跨库读取
item类型 通过接口 https://github.com/JX3BOX/apidocs/blob/master/helper/post.md 直接根据id查询得到作者的uid,然后直接操作message表,不再去查helper库。
item类型 通过接口 https://github.com/JX3BOX/apidocs/blob/master/helper/post.md 直接根据id查询得到作者的uid,然后直接操作message表,不再去查helper库。
需求已完成 待测试
为实现团队留言板功能,考虑一下评论的延展性 可以传递一个参数,有对应的评论时,则短消息发送给对应的人。
团队格式的模板为: 你的团队留言板有一条新的留言。