Files
assets/controller/stock/inventory_warning_history_controller.go

34 lines
1.2 KiB
Go
Raw Permalink Normal View History

2026-03-18 10:18:03 +08:00
// 库存预警历史控制器
// 职责:预警历史查询、删除(无Create/Update由系统自动归档)
// 调用服务service.InventoryWarningHistory
// 注意Delete返回*beans.ResponseEmpty直接return
package controller
import (
dto "assets/model/dto/stock"
service "assets/service/stock"
"context"
"gitea.com/red-future/common/beans"
)
type inventoryWarningHistory struct{}
var InventoryWarningHistory = new(inventoryWarningHistory)
func init() {
}
func (c *inventoryWarningHistory) GetInventoryWarningHistory(ctx context.Context, req *dto.GetInventoryWarningHistoryReq) (res *dto.GetInventoryWarningHistoryRes, err error) {
return service.InventoryWarningHistory.GetOne(ctx, req)
}
func (c *inventoryWarningHistory) ListInventoryWarningHistories(ctx context.Context, req *dto.ListInventoryWarningHistoryReq) (res *dto.ListInventoryWarningHistoryRes, err error) {
return service.InventoryWarningHistory.List(ctx, req)
}
func (c *inventoryWarningHistory) DeleteInventoryWarningHistory(ctx context.Context, req *dto.DeleteInventoryWarningHistoryReq) (res *beans.ResponseEmpty, err error) {
err = service.InventoryWarningHistory.Delete(ctx, req)
return
}