feat: 入库单/商品详情展示产地保质期储存方式,商品详情显示建议零售价

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-08 07:57:10 +08:00
parent 1ec1d4209a
commit 4e64e5eb47
6 changed files with 87 additions and 3 deletions
+1
View File
@@ -165,6 +165,7 @@ func (h *ProductHandler) Detail(c *gin.Context) {
var product model.Product
if err := h.db.Where("id = ? AND shop_id = ? AND deleted_at IS NULL", id, shopID).
Preload("Category").Preload("Images").
Preload("Origin").Preload("ShelfLife").Preload("Storage").
First(&product).Error; err != nil {
c.JSON(http.StatusNotFound, gin.H{"error": "not found"})
return