fix: 批量改进 (#2/#23/#38/#39/#40/#47)
- Web: 隐藏 ICP 备案号(条件渲染),联系入口改为微信咨询(条件渲染,配置 wechat 字段后生效) - backend: 拼音回填抽取为独立 cmd/backfill-pinyin 工具,不再在启动时运行 - backend: DB 连接池参数(max_idle_conns/max_open_conns)改为配置可控,默认 10/100 - backend: Inventory 反范式字段添加注释说明快照语义 - backend: 全量 handler 采用 util.RespondSuccess/RespondCreated 统一响应格式(51 处) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -178,7 +178,7 @@ func (h *InventoryHandler) CreateCheck(c *gin.Context) {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusCreated, gin.H{"data": req})
|
||||
util.RespondCreated(c, req)
|
||||
}
|
||||
|
||||
// GetCheck GET /api/v1/inventory/checks/:id
|
||||
@@ -191,7 +191,7 @@ func (h *InventoryHandler) GetCheck(c *gin.Context) {
|
||||
c.JSON(http.StatusNotFound, gin.H{"error": "not found"})
|
||||
return
|
||||
}
|
||||
c.JSON(http.StatusOK, gin.H{"data": check})
|
||||
util.RespondSuccess(c, check)
|
||||
}
|
||||
|
||||
// CompleteCheck PUT /api/v1/inventory/checks/:id/complete
|
||||
|
||||
Reference in New Issue
Block a user