当前位置:网站首页>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 )
边栏推荐
- Go 访问GBase 8a 数据库的一个方法
- 【MySQL】数据库函数通关教程下篇(窗口函数专题)
- 使用Jmeter进行性能测试的这套步骤,涨薪2次,升职一次
- Exclusive interview with millions of annual salary. What should developers do if they don't fix bugs?
- Stm32cubeide1.9.0\stm32cubemx 6.5 f429igt6 plus lan8720a, configure eth+lwip
- GBase 8a的create database 会被查询耗时很长怀疑卡住的现象分析
- \w和[A-Za-z0-9_],\d和[0-9]等价吗?
- Selenium上传文件有多少种方式?不信你有我全!
- Interval DP of Changyou dynamic programming
- Read write separation master-slave replication of MySQL
猜你喜欢

管理系統-ITclub(下)

Summary of Web testing and app testing by bat testing experts

Professor of Tsinghua University: software testing has gone into a misunderstanding - "code is necessary"
![[LeetCode]动态规划解分割数组I[Red Fox]](/img/b2/df87c3138c28e83a8a58f80b2938b8.png)
[LeetCode]动态规划解分割数组I[Red Fox]

洛谷P5706 再分肥宅水

Système de gestion - itclub (II)

∫(0→1) ln(1+x) / (x ² + 1) dx

Set code exercise

管理系统-ITclub(下)

Codeforces Round #717 (Div. 2)
随机推荐
List of language weaknesses --cwe, a website worth learning
Gbase 8A OLAP analysis function cume_ Example of dist
我想我要开始写我自己的博客了。
Example of using gbase 8A OLAP function group by grouping sets
读写分离-Mysql的主从复制
Summary of Web testing and app testing by bat testing experts
[LeetCode]动态规划解拆分整数I[Silver Fox]
深度学习又有新坑了!悉尼大学提出全新跨模态任务,用文本指导图像进行抠图
Analysis of stone merging
\w和[A-Za-z0-9_],\d和[0-9]等价吗?
It smells good. Since I used Charles, Fiddler has been completely uninstalled by me
Go 访问GBase 8a 数据库的一个方法
[LeetCode]508. 出現次數最多的子樹元素和
MONTHS_BETWEEN函数使用
[LeetCode]100. 相同的树
【Redis】零基础十分钟学会Redis
MONTHS_ Between function use
软件测试自动化测试之——接口测试从入门到精通,每天学习一点点
Interview question 3 of software test commonly used by large factories (with answers)
Gbase 8A OLAP analysis function cume_ Example of dist