feat: #13 公开商品 API 补充 code/barcode/batch.quantity,报错反馈携带商品和门店信息
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,7 @@ func (h *PublicHandler) GetProduct(c *gin.Context) {
|
||||
"production_date": pdStr,
|
||||
"batch_no": inv.BatchNo,
|
||||
"in_stock_date": inv.CreatedAt.Format("2006-01-02"),
|
||||
"quantity": inv.Quantity,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +101,8 @@ func (h *PublicHandler) GetProduct(c *gin.Context) {
|
||||
"data": gin.H{
|
||||
"id": product.ID,
|
||||
"name": product.Name,
|
||||
"code": product.Code,
|
||||
"barcode": product.Barcode,
|
||||
"series": product.Series,
|
||||
"spec": product.Spec,
|
||||
"brand": product.Brand,
|
||||
|
||||
Reference in New Issue
Block a user