Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(page-service): refactor service as a microservice #363

Merged
merged 29 commits into from
Sep 24, 2022

Conversation

wibus-wee
Copy link
Member

@wibus-wee wibus-wee commented Sep 18, 2022

# run this microservice in watching mode
nest start -w page-service
# if you want to build this microservice
nest build page-service

此 PR 完成进度

  • 初始化微服务模块
  • 定义分类数据模型
  • 重建分类服务
  • 定义文章数据模型
  • 重建文章服务
  • 定义页面数据模型
  • 重建页面服务
  • 将三个服务的方法公开于控制器
  • 网关层接口公开

此 PR 额外修复的内容

  • 修复 文章设置一旦隐藏则主人都无法从 :category/:slug 接口获取文章详情 的问题
  • 启动 core 核心时在控制台输出为旧名字 NEXT 的问题

此 PR 需要注意的事情

  • 此服务是三个服务的聚合:分类,文章,页面
  • 置顶、图片元数据记录功能没有制作
  • aggregatePaginate 方法由于时间原因,是被阉割了一部分功能的(如置顶重新排序)
  • 分类数据模型新增两个可选字段icon, description
  • 当删除了最后一个分类时,将会默认初始化分类,可选字段将不会被自动填写
  • 初始化默认分类为异步执行
  • 文章服务提供了初始化文章的方法,此方法无法被重复调用,仅在没有文章时有效
  • 加密的密码将不再加密,采取明文传输的方式。
  • 一如既往地,报错返回信息统一储存于 shared/constants/echo.constant.ts
  • 此修改后,加密、RSS输出、隐藏/显示 会出现于 WriteBaseModel 中,即文章和页面的字段都会出现这个,如果后续继续出现某些写作类服务的也会出现这三个字段

API Preview

截屏2022-09-24 16 19 42

截屏2022-09-24 16 19 52

截屏2022-09-24 16 20 00

@wibus-wee wibus-wee added enhancement New feature or request module/posts The question or anything in Posts Module module/pages The question or anything in Pages Module module/category Questions or Anything for Category Module WIP PRs in WIP labels Sep 18, 2022
@wibus-wee wibus-wee self-assigned this Sep 18, 2022
@wibus-wee wibus-wee requested a review from MYXXTS September 24, 2022 08:20
@wibus-wee wibus-wee removed the WIP PRs in WIP label Sep 24, 2022
@wibus-wee wibus-wee changed the title [WIP] refactor(page-service): refactor service as a microservice refactor(page-service): refactor service as a microservice Sep 24, 2022
@wibus-wee wibus-wee marked this pull request as ready for review September 24, 2022 08:23
@MYXXTS MYXXTS merged commit c5342ea into main Sep 24, 2022
@MYXXTS MYXXTS deleted the refactor/page-service branch September 24, 2022 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/category Questions or Anything for Category Module module/pages The question or anything in Pages Module module/posts The question or anything in Posts Module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants