feat(tenant): 增加双站共享货架与跨站下单
This commit is contained in:
@@ -205,3 +205,34 @@ func (h *Handler) UpdateScreenshots(c *gin.Context) {
|
||||
}
|
||||
response.OK(c, item)
|
||||
}
|
||||
|
||||
func (h *Handler) FindTenantOffer(c *gin.Context) {
|
||||
id, ok := parseID(c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
item, err := h.service.FindTenantOffer(c.Request.Context(), id)
|
||||
if err != nil {
|
||||
writeListingError(c, err)
|
||||
return
|
||||
}
|
||||
response.OK(c, item)
|
||||
}
|
||||
|
||||
func (h *Handler) UpdateTenantOffer(c *gin.Context) {
|
||||
id, ok := parseID(c)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
var req UpdateTenantListingOfferRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
response.BadRequest(c, "货架配置参数不正确")
|
||||
return
|
||||
}
|
||||
item, err := h.service.UpdateTenantOffer(c.Request.Context(), id, req)
|
||||
if err != nil {
|
||||
writeListingError(c, err)
|
||||
return
|
||||
}
|
||||
response.OK(c, item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user