This commit is contained in:
vipg
2025-11-17 17:43:32 +08:00
parent 8bedb4681f
commit f13a58e116
3 changed files with 11 additions and 4 deletions

7
backend/README.md Normal file
View File

@@ -0,0 +1,7 @@
curl -X POST "127.0.0.1:20000/user/register" \
-H "Content-Type: application/json" \
-d '{
"account": "test",
"password": "test12341234"
}'
---

View File

@@ -73,8 +73,8 @@ BEGIN
CREATE OR REPLACE VIEW user_info_view AS
SELECT
u.id AS user_id,
ua.account AS user_account,
up.password AS user_password,
ua.account AS account,
up.password AS password,
u.deleted AS deleted
FROM
"user" u

View File

@@ -171,7 +171,7 @@ func RegisterHandler(c *gin.Context) {
// 7. 插入account表
insertAccountQuery := `
INSERT INTO account (user_id, account)
INSERT INTO user_account (user_id, account)
VALUES ($1, $2)
`
zap.L().Info("💡 执行账号插入",
@@ -196,7 +196,7 @@ func RegisterHandler(c *gin.Context) {
// 8. 插入password表
insertPasswordQuery := `
INSERT INTO password (user_id, password)
INSERT INTO user_password (user_id, password)
VALUES ($1, $2)
`
zap.L().Info("💡 执行密码插入",