feat: 用户徽章与等级体系,积分经济管理重构

- 新增徽章系统:badge 服务与 handler、管理端配置页、BadgeChip/LevelBadge 展示组件
- 新增等级模型:model/level 及前端 levels 元数据
- 管理端经济模块拆分为 points/badges/levels 独立页面,EconomySettings 迁入设置
- 积分、签到、评论等服务适配等级与徽章逻辑
This commit is contained in:
2026-09-25 16:38:29 +08:00
parent 7b327bc8cc
commit 4ae57d9392
57 changed files with 3939 additions and 147 deletions

View File

@@ -209,7 +209,9 @@ func respondAdminUserError(c *gin.Context, err error) {
errors.Is(err, service.ErrInvalidRole),
errors.Is(err, service.ErrCannotAssignRole),
errors.Is(err, service.ErrBoardRequired),
errors.Is(err, service.ErrBoardNotFound):
errors.Is(err, service.ErrBoardNotFound),
errors.Is(err, service.ErrInsufficientPoints),
errors.Is(err, service.ErrInvalidPoints):
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
default:
c.JSON(http.StatusInternalServerError, gin.H{"error": "操作失败"})