add article

This commit is contained in:
2025-09-01 18:29:59 +08:00
parent 34ff6ce916
commit 5d5372e359
59 changed files with 45435 additions and 1535 deletions

33
test_article_simple.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# 文章系统API简单测试脚本
# 使用方法: ./test_article_simple.sh
BASE_URL="http://localhost:8080/api/v1"
echo "=== 文章系统API测试 ==="
echo ""
# 测试1: 获取文章列表
echo "1. 测试获取文章列表..."
curl -s -X GET "$BASE_URL/articles?page=1&page_size=5" \
-H "Content-Type: application/json" | jq .
echo ""
echo ""
# 测试2: 获取文章统计
echo "2. 测试获取文章统计..."
curl -s -X GET "$BASE_URL/articles/stats" \
-H "Content-Type: application/json" | jq .
echo ""
echo ""
# 测试3: 搜索文章
echo "3. 测试搜索文章..."
curl -s -X GET "$BASE_URL/articles/search?keyword=技术&page=1&page_size=5" \
-H "Content-Type: application/json" | jq .
echo ""
echo ""
echo "=== 测试完成 ==="
echo "注意: 需要认证的接口需要JWT token请先登录获取token"