34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
|
|
// 库存预警历史控制器
|
|||
|
|
// 职责:预警历史查询、删除(无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
|
|||
|
|
}
|