Dockerfile

This commit is contained in:
2026-03-18 10:18:03 +08:00
parent 5c5dbc7420
commit b65f3439f3
189 changed files with 19027 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
// 库位控制器
// 职责库位CRUD接口、状态更新接口
// 调用服务service.Location
// 注意Update/Delete/UpdateStatus返回*beans.ResponseEmpty直接return
package controller
import (
dto "assets/model/dto/stock"
service "assets/service/stock"
"context"
"gitea.com/red-future/common/beans"
)
type location struct{}
var Location = new(location)
func init() {
}
func (c *location) CreateLocation(ctx context.Context, req *dto.CreateLocationReq) (res *dto.CreateLocationRes, err error) {
return service.Location.Create(ctx, req)
}
func (c *location) UpdateLocation(ctx context.Context, req *dto.UpdateLocationReq) (res *beans.ResponseEmpty, err error) {
err = service.Location.Update(ctx, req)
return
}
func (c *location) DeleteLocation(ctx context.Context, req *dto.DeleteLocationReq) (res *beans.ResponseEmpty, err error) {
err = service.Location.Delete(ctx, req)
return
}
func (c *location) UpdateLocationStatus(ctx context.Context, req *dto.UpdateLocationStatusReq) (res *beans.ResponseEmpty, err error) {
err = service.Location.UpdateStatus(ctx, req)
return
}
func (c *location) GetLocation(ctx context.Context, req *dto.GetLocationReq) (res *dto.GetLocationRes, err error) {
return service.Location.GetOne(ctx, req)
}
func (c *location) ListLocations(ctx context.Context, req *dto.ListLocationReq) (res *dto.ListLocationRes, err error) {
return service.Location.List(ctx, req)
}