当前位置:网站首页>Management system itclub (medium)
Management system itclub (medium)
2022-06-27 22:07:00 【Big eye (◉ ɷ ◉) cute】
Management system -ITclub( in )
author : Xianda egg
The goal is : Complete the project
describe :ITclub It is a platform for programmers to share life dynamics
List of articles
- Management system -ITclub( in )
- Publish and modify dynamic content
- Define delete and query dynamic content
- Post and revise comments
- Delete and query comments
- √ Complete the dynamic and comment interface (2022-05-31)
Publish and modify dynamic content
Create a new table moment
Create table statement :
CREATE TABLE IF NOT EXISTS `moment`(
id INT PRIMARY KEY AUTO_INCREMENT,
content VARCHAR(1000) NOT NULL,
user_id INT NOT NULL,
createAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updateAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY(user_id) REFERENCES user(id)
);
Define interfaces for publishing dynamic content
1. Define the routing interface

2. Verify user login

3. Controller and Service Processing content in


√ Complete the release of dynamic interfaces (2022-5-27)
Define interfaces for modifying dynamic content
1. Define the routing interface

2. Verify user login (verifyAuth)
PS: A lot of content needs to be verified : modify / Delete dynamic , modify / Delete comments
Interface : Business interface system / Back end management system
- One to many :user—>role
- Many to many :role—>menu( Delete dynamic and modify dynamic )

3. Verify user rights (verifyPermission)


4. Controller and Service Processing in

Define delete and query dynamic content
Define an interface for deleting dynamic content
1. Define the routing interface

2. Verify user login and verify user permissions
See above (verifyAuth) and (verifyPermission)
3. Controller and Service Processing in

Define the interface of query content ( Single )



Define the interface for querying multiple contents ( list )



to update :2022-5-30

Post and revise comments
Create a new table comment
CREATE TABLE IF NOT EXISTS `comment`(
id INT PRIMARY KEY AUTO_INCREMENT,
content VARCHAR(1000) NOT NULL,
moment_id INT NOT NULL,
user_id INT NOT NULL,
comment_id INT DEFAULT NULL,
createAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updateAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY(moment_id) REFERENCES moment(id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE ON UPDATE CASCADE,
FOREIGN KEY(comment_id) REFERENCES comment(id) ON DELETE CASCADE ON UPDATE CASCADE
);
Define the interface for publishing comments
1. Define the routing interface –> Verify user login

2. Controller and Service Processing content in


Define and modify the comment content interface
1. Define reason interface

2. Verify user login ( to update verifyPermission)
See above (verifyAuth)
3. Verify user rights
PS: It was originally encapsulated verifyPermission middleware , Now make some changes
The definition is more in line with RESTful Style interface code


4. Controller and Service Processing content in


Define the interface for replying to comments
1. Define the routing interface

2. Verify user login
See above (verifyAuth)
3. Controller and Service Processing content in


Delete and query comments
Define the interface for deleting comments
1. Define the routing interface

2. Verify user login and verify user permissions

3. Controller and Service Processing content in

When querying dynamic , Also show comments
1. When querying multiple dynamic , Show the number of comments

2. When querying a single dynamic , Show a list of comments



√ Complete the dynamic and comment interface (2022-05-31)
PS: The article will continue in the future ( Next )
边栏推荐
- [LeetCode]508. 出現次數最多的子樹元素和
- 使用sqlite3语句后出现省略号 ... 的解决方法
- "Apprendre cette image" apparaît sur le Bureau win11 comment supprimer
- 开源技术交流丨一站式全自动化运维管家ChengYing入门介绍
- [LeetCode]508. 出现次数最多的子树元素和
- 如何做好功能测试?你确定不想知道吗?
- 正则表达式
- [leetcode] dynamic programming solution partition array i[red fox]
- Matlab finds the position of a row or column in the matrix
- 【MySQL】数据库函数通关教程下篇(窗口函数专题)
猜你喜欢

Read write separation master-slave replication of MySQL

This set of steps for performance testing using JMeter includes two salary increases and one promotion

Go from introduction to practice - error mechanism (note)

读写分离-Mysql的主从复制

Stm32cubeide1.9.0\stm32cubemx 6.5 f429igt6 plus lan8720a, configure eth+lwip

Bit. Store: long bear market, stable stacking products may become the main theme

YOLOv6:又快又准的目标检测框架开源啦

Knowledge sorting of exception handling

AQS SOS AQS with me

Remote invocation of microservices
随机推荐
MYSQL和MongoDB的分析
[LeetCode]动态规划解分割数组II[Arctic Fox]
如何做好功能测试?你确定不想知道吗?
[LeetCode]30. 串联所有单词的子串
软件缺陷管理——测试人员必会
软件测试自动化测试之——接口测试从入门到精通,每天学习一点点
軟件測試自動化測試之——接口測試從入門到精通,每天學習一點點
Common problems encountered by burp Suite
BAT测试专家对web测试和APP测试的总结
Burp suite遇到的常见问题
[LeetCode]30. Concatenate substrings of all words
Gbase 8A OLAP analysis function cume_ Example of dist
[LeetCode]100. 相同的树
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
真香,自从用了Charles,Fiddler已经被我彻底卸载了
[LeetCode]动态规划解分割数组I[Red Fox]
Go from introduction to actual combat - task cancellation (note)
Stm32f107+lan8720a use stm32subemx to configure network connection +tcp master-slave +udp app
开源技术交流丨一站式全自动化运维管家ChengYing入门介绍
[LeetCode]572. 另一棵树的子树