feat: 内容管理深度优化 (03-07~03-09)
- 排名算法权重可配置,排行榜显示点击量/付款数/热度 - 富文本编辑器升级(TipTap),支持@提及/#链接标签/图片/表格 - 「主人公」Tab → 「链接AI」Tab,AI列表+链接标签管理 - 链接标签新增存客宝(ckb)类型,存客宝绑定配置面板 - 人物ID改为可选,名称必填 - 排行榜操作改为「编辑文章」,付款记录移入编辑弹窗 - 章节ID修改支持(originalId/newId机制) - 付款记录用户ID/订单ID可点击跳转 - 项目推进表补充14-15节(03-07~09改动记录+存客宝技术方案) Made-with: Cursor
This commit is contained in:
@@ -332,6 +332,7 @@ func DBBookAction(c *gin.Context) {
|
||||
TargetPartTitle string `json:"targetPartTitle"`
|
||||
TargetChapterTitle string `json:"targetChapterTitle"`
|
||||
ID string `json:"id"`
|
||||
NewID string `json:"newId"`
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Price *float64 `json:"price"`
|
||||
@@ -444,6 +445,9 @@ func DBBookAction(c *gin.Context) {
|
||||
if body.HotScore != nil {
|
||||
updates["hot_score_override"] = *body.HotScore
|
||||
}
|
||||
if body.NewID != "" && body.NewID != body.ID {
|
||||
updates["id"] = body.NewID
|
||||
}
|
||||
err := db.Model(&model.Chapter{}).Where("id = ?", body.ID).Updates(updates).Error
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{"success": false, "error": err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user