Files
assets/controller/stock/stock_manage_controller.go
2026-06-10 15:40:17 +08:00

32 lines
941 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 库存管理控制器(Stock公共库存)
// 职责:获取库存操作表单字段、入库/出库操作(StockOperation)
// 调用服务service.StockManage
// 注意StockOperation返回*beans.ResponseEmpty直接return
package controller
import (
dto "assets/model/dto/stock"
service "assets/service/stock"
"context"
"gitea.redpowerfuture.com/red-future/common/beans"
)
type stockManage struct{}
// StockManage 库存控制器
var StockManage = new(stockManage)
func init() {
}
// GetStockFormFields 获取库存操作表单字段
func (c *stockManage) GetStockFormFields(ctx context.Context, req *dto.GetStockFormFieldsReq) (res *dto.GetStockFormFieldsRes, err error) {
return service.StockManage.GetStockFormFields(ctx, req)
}
func (c *stockManage) StockOperation(ctx context.Context, req *dto.StockOperationReq) (res *beans.ResponseEmpty, err error) {
err = service.StockManage.StockOperation(ctx, req)
return
}