2026-02-28 15:29:16 +08:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
|
|
info (
|
|
|
|
|
title: "Muyu WMS Gateway API"
|
|
|
|
|
desc: "Warehouse Management System API Gateway"
|
|
|
|
|
author: "muyu"
|
|
|
|
|
version: "1.0"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Common Types ====================
|
|
|
|
|
type IdResp {
|
|
|
|
|
Id string `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PageReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ==================== Auth Types ====================
|
|
|
|
|
type (
|
|
|
|
|
LoginReq {
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
2026-03-30 02:53:55 +00:00
|
|
|
TenantId string `json:"tenantId,optional"`
|
2026-02-28 15:29:16 +08:00
|
|
|
}
|
|
|
|
|
LoginResp {
|
|
|
|
|
Token string `json:"token"`
|
|
|
|
|
UserInfo UserInfo `json:"userInfo"`
|
|
|
|
|
}
|
|
|
|
|
ChangePasswordReq {
|
|
|
|
|
OldPassword string `json:"oldPassword"`
|
|
|
|
|
NewPassword string `json:"newPassword"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== User Types ====================
|
|
|
|
|
type (
|
|
|
|
|
UserInfo {
|
|
|
|
|
UserId string `json:"userId"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
RealName string `json:"realName"`
|
|
|
|
|
Phone string `json:"phone"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
RoleId string `json:"roleId"`
|
|
|
|
|
RoleName string `json:"roleName"`
|
2026-03-30 02:53:55 +00:00
|
|
|
TenantId string `json:"tenantId"`
|
2026-02-28 15:29:16 +08:00
|
|
|
LastLoginTime string `json:"lastLoginTime"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
CreateUserReq {
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Password string `json:"password"`
|
|
|
|
|
RealName string `json:"realName"`
|
|
|
|
|
Phone string `json:"phone,optional"`
|
|
|
|
|
Email string `json:"email,optional"`
|
|
|
|
|
RoleId string `json:"roleId"`
|
|
|
|
|
}
|
|
|
|
|
UpdateUserReq {
|
|
|
|
|
RealName string `json:"realName,optional"`
|
|
|
|
|
Phone string `json:"phone,optional"`
|
|
|
|
|
Email string `json:"email,optional"`
|
|
|
|
|
RoleId string `json:"roleId,optional"`
|
|
|
|
|
Avatar string `json:"avatar,optional"`
|
|
|
|
|
}
|
|
|
|
|
UpdateUserStatusReq {
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
}
|
|
|
|
|
ListUserReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
Username string `form:"username,optional"`
|
|
|
|
|
RealName string `form:"realName,optional"`
|
|
|
|
|
Phone string `form:"phone,optional"`
|
|
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
}
|
|
|
|
|
ListUserResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []UserInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Role Types ====================
|
|
|
|
|
type (
|
|
|
|
|
RoleInfo {
|
|
|
|
|
RoleId string `json:"roleId"`
|
|
|
|
|
RoleName string `json:"roleName"`
|
|
|
|
|
RoleKey string `json:"roleKey"`
|
|
|
|
|
RoleDesc string `json:"roleDesc"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
MenuIds []string `json:"menuIds"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
CreateRoleReq {
|
|
|
|
|
RoleName string `json:"roleName"`
|
|
|
|
|
RoleKey string `json:"roleKey"`
|
|
|
|
|
RoleDesc string `json:"roleDesc,optional"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder,optional"`
|
|
|
|
|
}
|
|
|
|
|
UpdateRoleReq {
|
|
|
|
|
RoleName string `json:"roleName,optional"`
|
|
|
|
|
RoleKey string `json:"roleKey,optional"`
|
|
|
|
|
RoleDesc string `json:"roleDesc,optional"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder,optional"`
|
|
|
|
|
}
|
|
|
|
|
SetRolePermissionsReq {
|
|
|
|
|
MenuIds []string `json:"menuIds"`
|
|
|
|
|
}
|
|
|
|
|
ListRoleReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
RoleName string `form:"roleName,optional"`
|
|
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
}
|
|
|
|
|
ListRoleResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []RoleInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Menu Types ====================
|
|
|
|
|
type (
|
|
|
|
|
MenuInfo {
|
|
|
|
|
MenuId string `json:"menuId"`
|
|
|
|
|
ParentId string `json:"parentId"`
|
|
|
|
|
MenuName string `json:"menuName"`
|
|
|
|
|
MenuType int64 `json:"menuType"`
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
Component string `json:"component"`
|
|
|
|
|
Permission string `json:"permission"`
|
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder"`
|
|
|
|
|
Visible int64 `json:"visible"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
Children []MenuInfo `json:"children"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
CreateMenuReq {
|
|
|
|
|
ParentId string `json:"parentId,optional"`
|
|
|
|
|
MenuName string `json:"menuName"`
|
|
|
|
|
MenuType int64 `json:"menuType"`
|
|
|
|
|
Path string `json:"path,optional"`
|
|
|
|
|
Component string `json:"component,optional"`
|
|
|
|
|
Permission string `json:"permission,optional"`
|
|
|
|
|
Icon string `json:"icon,optional"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder,optional"`
|
|
|
|
|
}
|
|
|
|
|
UpdateMenuReq {
|
|
|
|
|
ParentId string `json:"parentId,optional"`
|
|
|
|
|
MenuName string `json:"menuName,optional"`
|
|
|
|
|
MenuType int64 `json:"menuType,optional"`
|
|
|
|
|
Path string `json:"path,optional"`
|
|
|
|
|
Component string `json:"component,optional"`
|
|
|
|
|
Permission string `json:"permission,optional"`
|
|
|
|
|
Icon string `json:"icon,optional"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder,optional"`
|
|
|
|
|
Visible int64 `json:"visible,optional"`
|
|
|
|
|
}
|
|
|
|
|
ListMenuResp {
|
|
|
|
|
List []MenuInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Operation Log Types ====================
|
|
|
|
|
type (
|
|
|
|
|
OperationLogInfo {
|
|
|
|
|
LogId string `json:"logId"`
|
|
|
|
|
UserId string `json:"userId"`
|
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
Module string `json:"module"`
|
|
|
|
|
Operation string `json:"operation"`
|
|
|
|
|
Method string `json:"method"`
|
|
|
|
|
Path string `json:"path"`
|
|
|
|
|
Ip string `json:"ip"`
|
|
|
|
|
Duration int64 `json:"duration"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
}
|
|
|
|
|
ListLogReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
Username string `form:"username,optional"`
|
|
|
|
|
Module string `form:"module,optional"`
|
|
|
|
|
Operation string `form:"operation,optional"`
|
|
|
|
|
StartTime string `form:"startTime,optional"`
|
|
|
|
|
EndTime string `form:"endTime,optional"`
|
|
|
|
|
}
|
|
|
|
|
ListLogResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []OperationLogInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Config Types ====================
|
|
|
|
|
type (
|
|
|
|
|
ConfigInfo {
|
|
|
|
|
ConfigId string `json:"configId"`
|
|
|
|
|
ConfigKey string `json:"configKey"`
|
|
|
|
|
ConfigValue string `json:"configValue"`
|
|
|
|
|
ConfigName string `json:"configName"`
|
|
|
|
|
ConfigGroup string `json:"configGroup"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
UpdateConfigReq {
|
|
|
|
|
ConfigValue string `json:"configValue"`
|
|
|
|
|
}
|
|
|
|
|
ListConfigResp {
|
|
|
|
|
List []ConfigInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Product Types ====================
|
|
|
|
|
type (
|
|
|
|
|
ProductInfo {
|
2026-06-14 15:24:02 +08:00
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
ImageUrl string `json:"imageUrl"`
|
|
|
|
|
Spec string `json:"spec"`
|
|
|
|
|
Color string `json:"color"`
|
2026-07-05 08:06:28 +09:00
|
|
|
ColorNo string `json:"colorNo"`
|
|
|
|
|
ProductCode string `json:"productCode"`
|
2026-06-14 15:24:02 +08:00
|
|
|
SalesPrice string `json:"salesPrice"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
2026-02-28 15:29:16 +08:00
|
|
|
}
|
|
|
|
|
CreateProductReq {
|
2026-06-14 15:24:02 +08:00
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
ImageUrl string `json:"imageUrl,optional"`
|
|
|
|
|
Spec string `json:"spec,optional"`
|
|
|
|
|
Color string `json:"color,optional"`
|
2026-07-05 08:06:28 +09:00
|
|
|
ColorNo string `json:"colorNo,optional"`
|
|
|
|
|
ProductCode string `json:"productCode,optional"`
|
2026-06-14 15:24:02 +08:00
|
|
|
SalesPrice string `json:"salesPrice,optional"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
Pans []PanInput `json:"pans,optional"`
|
2026-07-05 08:06:28 +09:00
|
|
|
InitialBatch ProductBatchInput `json:"initialBatch,optional"`
|
2026-02-28 15:29:16 +08:00
|
|
|
}
|
|
|
|
|
UpdateProductReq {
|
2026-06-14 15:24:02 +08:00
|
|
|
ProductName string `json:"productName,optional"`
|
|
|
|
|
ImageUrl string `json:"imageUrl,optional"`
|
|
|
|
|
Spec string `json:"spec,optional"`
|
|
|
|
|
Color string `json:"color,optional"`
|
2026-07-05 08:06:28 +09:00
|
|
|
ColorNo string `json:"colorNo,optional"`
|
2026-06-14 15:24:02 +08:00
|
|
|
SalesPrice string `json:"salesPrice,optional"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
2026-02-28 15:29:16 +08:00
|
|
|
}
|
|
|
|
|
ListProductReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
ProductName string `form:"productName,optional"`
|
|
|
|
|
Spec string `form:"spec,optional"`
|
|
|
|
|
Color string `form:"color,optional"`
|
2026-07-05 08:06:28 +09:00
|
|
|
ColorNo string `form:"colorNo,optional"`
|
|
|
|
|
ProductCode string `form:"productCode,optional"`
|
2026-02-28 15:29:16 +08:00
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
}
|
|
|
|
|
ListProductResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []ProductInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
ImportProductResp {
|
|
|
|
|
TotalCount int64 `json:"totalCount"`
|
|
|
|
|
SuccessCount int64 `json:"successCount"`
|
|
|
|
|
FailCount int64 `json:"failCount"`
|
|
|
|
|
ErrorMsg string `json:"errorMsg"`
|
|
|
|
|
ImportId string `json:"importId"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2026-06-14 15:24:02 +08:00
|
|
|
// ==================== Pan / Bolt Types ====================
|
|
|
|
|
type (
|
|
|
|
|
BoltInfo {
|
|
|
|
|
BoltId string `json:"boltId"`
|
|
|
|
|
PanId string `json:"panId"`
|
|
|
|
|
LengthM string `json:"lengthM"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder"`
|
|
|
|
|
}
|
|
|
|
|
PanInfo {
|
|
|
|
|
PanId string `json:"panId"`
|
|
|
|
|
ProductId string `json:"productId"`
|
2026-07-05 08:06:28 +09:00
|
|
|
BatchId string `json:"batchId"`
|
|
|
|
|
BatchNo string `json:"batchNo"`
|
2026-06-14 15:24:02 +08:00
|
|
|
Name string `json:"name"`
|
|
|
|
|
Position string `json:"position"`
|
|
|
|
|
SortOrder int64 `json:"sortOrder"`
|
|
|
|
|
Bolts []BoltInfo `json:"bolts"`
|
|
|
|
|
BoltCount int64 `json:"boltCount"`
|
|
|
|
|
TotalLength string `json:"totalLength"`
|
|
|
|
|
}
|
|
|
|
|
PanInput {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Position string `json:"position,optional"`
|
|
|
|
|
BoltLengths []string `json:"boltLengths,optional"`
|
2026-07-05 08:06:28 +09:00
|
|
|
BatchId string `json:"batchId,optional"`
|
2026-06-14 15:24:02 +08:00
|
|
|
}
|
|
|
|
|
ListPanResp {
|
|
|
|
|
List []PanInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
SavePansReq {
|
|
|
|
|
Pans []PanInput `json:"pans"`
|
|
|
|
|
}
|
|
|
|
|
ListBoltResp {
|
|
|
|
|
List []BoltInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
SaveBoltsReq {
|
|
|
|
|
Lengths []string `json:"lengths"`
|
|
|
|
|
}
|
|
|
|
|
ProductTreeResp {
|
|
|
|
|
Product ProductInfo `json:"product"`
|
|
|
|
|
Pans []PanInfo `json:"pans"`
|
|
|
|
|
TotalPanCount int64 `json:"totalPanCount"`
|
|
|
|
|
TotalBoltCount int64 `json:"totalBoltCount"`
|
|
|
|
|
TotalLengthM string `json:"totalLengthM"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Panel Types ====================
|
|
|
|
|
type (
|
|
|
|
|
ProductSummaryItem {
|
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
Spec string `json:"spec"`
|
|
|
|
|
ColorCount int64 `json:"colorCount"`
|
|
|
|
|
TotalPanCount int64 `json:"totalPanCount"`
|
|
|
|
|
TotalBoltCount int64 `json:"totalBoltCount"`
|
|
|
|
|
TotalLengthM string `json:"totalLengthM"`
|
|
|
|
|
Colors string `json:"colors"`
|
|
|
|
|
Locations string `json:"locations"`
|
|
|
|
|
}
|
|
|
|
|
ProductSummaryResp {
|
|
|
|
|
List []ProductSummaryItem `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
ColorDetailItem {
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
Color string `json:"color"`
|
2026-07-05 08:06:28 +09:00
|
|
|
ColorNo string `json:"colorNo"`
|
|
|
|
|
ProductCode string `json:"productCode"`
|
2026-06-14 15:24:02 +08:00
|
|
|
Spec string `json:"spec"`
|
|
|
|
|
ImageUrl string `json:"imageUrl"`
|
|
|
|
|
PanCount int64 `json:"panCount"`
|
|
|
|
|
BoltCount int64 `json:"boltCount"`
|
|
|
|
|
TotalLengthM string `json:"totalLengthM"`
|
|
|
|
|
Locations string `json:"locations"`
|
|
|
|
|
SalesPrice string `json:"salesPrice"`
|
2026-07-05 08:06:28 +09:00
|
|
|
BatchCount int64 `json:"batchCount"`
|
2026-06-14 15:24:02 +08:00
|
|
|
}
|
|
|
|
|
ListColorDetailReq {
|
|
|
|
|
ProductName string `form:"productName"`
|
|
|
|
|
}
|
|
|
|
|
ColorDetailResp {
|
|
|
|
|
List []ColorDetailItem `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2026-07-05 08:06:28 +09:00
|
|
|
// ==================== Yarn & Batch Types ====================
|
|
|
|
|
type (
|
|
|
|
|
YarnInfo {
|
|
|
|
|
YarnId string `json:"yarnId"`
|
|
|
|
|
YarnName string `json:"yarnName"`
|
|
|
|
|
Color string `json:"color"`
|
|
|
|
|
WeightGM string `json:"weightGM"`
|
|
|
|
|
SupplierId string `json:"supplierId"`
|
|
|
|
|
SupplierName string `json:"supplierName"`
|
|
|
|
|
DyeFactory string `json:"dyeFactory"`
|
|
|
|
|
ImageUrl string `json:"imageUrl"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
CreateYarnReq {
|
|
|
|
|
YarnName string `json:"yarnName"`
|
|
|
|
|
Color string `json:"color,optional"`
|
|
|
|
|
WeightGM string `json:"weightGM"`
|
|
|
|
|
SupplierId string `json:"supplierId"`
|
|
|
|
|
DyeFactory string `json:"dyeFactory,optional"`
|
|
|
|
|
ImageUrl string `json:"imageUrl,optional"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
}
|
|
|
|
|
UpdateYarnReq {
|
|
|
|
|
YarnName string `json:"yarnName,optional"`
|
|
|
|
|
Color string `json:"color,optional"`
|
|
|
|
|
WeightGM string `json:"weightGM,optional"`
|
|
|
|
|
SupplierId string `json:"supplierId,optional"`
|
|
|
|
|
DyeFactory string `json:"dyeFactory,optional"`
|
|
|
|
|
ImageUrl string `json:"imageUrl,optional"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
Status int64 `json:"status,optional,default=1"`
|
|
|
|
|
}
|
|
|
|
|
ListYarnReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
YarnName string `form:"yarnName,optional"`
|
|
|
|
|
SupplierId string `form:"supplierId,optional"`
|
|
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
}
|
|
|
|
|
ListYarnResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []YarnInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
ProductBatchInput {
|
|
|
|
|
BatchNo string `json:"batchNo,optional"`
|
|
|
|
|
YarnRatio string `json:"yarnRatio,optional"`
|
|
|
|
|
WarpWeightGM string `json:"warpWeightGM,optional"`
|
|
|
|
|
WeftWeightGM string `json:"weftWeightGM,optional"`
|
|
|
|
|
ProductionProcess string `json:"productionProcess,optional"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
}
|
|
|
|
|
ProductBatchInfo {
|
|
|
|
|
BatchId string `json:"batchId"`
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
BatchNo string `json:"batchNo"`
|
|
|
|
|
YarnRatio string `json:"yarnRatio"`
|
|
|
|
|
WarpWeightGM string `json:"warpWeightGM"`
|
|
|
|
|
WeftWeightGM string `json:"weftWeightGM"`
|
|
|
|
|
ProductionProcess string `json:"productionProcess"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
}
|
|
|
|
|
CreateProductBatchReq {
|
|
|
|
|
Batch ProductBatchInput `json:"batch"`
|
|
|
|
|
}
|
|
|
|
|
UpdateProductBatchReq {
|
|
|
|
|
Batch ProductBatchInput `json:"batch"`
|
|
|
|
|
Status int64 `json:"status,optional,default=1"`
|
|
|
|
|
}
|
|
|
|
|
ListProductBatchResp {
|
|
|
|
|
List []ProductBatchInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-28 15:29:16 +08:00
|
|
|
// ==================== Stock Statistics Types ====================
|
|
|
|
|
type (
|
|
|
|
|
StockSummaryResp {
|
|
|
|
|
ProductCount int64 `json:"productCount"`
|
|
|
|
|
TotalPieces int64 `json:"totalPieces"`
|
2026-06-14 15:24:02 +08:00
|
|
|
TotalPans int64 `json:"totalPans"`
|
|
|
|
|
TotalLengthM string `json:"totalLengthM"`
|
2026-02-28 15:29:16 +08:00
|
|
|
TotalSalesValue string `json:"totalSalesValue"`
|
|
|
|
|
}
|
|
|
|
|
StockGroupItem {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Count int64 `json:"count"`
|
|
|
|
|
Quantity string `json:"quantity"`
|
|
|
|
|
}
|
|
|
|
|
StockGroupResp {
|
|
|
|
|
List []StockGroupItem `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Stock Check Types ====================
|
|
|
|
|
type (
|
|
|
|
|
StockCheckInfo {
|
|
|
|
|
CheckId string `json:"checkId"`
|
|
|
|
|
CheckNo string `json:"checkNo"`
|
|
|
|
|
CheckDate string `json:"checkDate"`
|
|
|
|
|
Checker string `json:"checker"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
Details []StockCheckDetailInfo `json:"details"`
|
|
|
|
|
}
|
|
|
|
|
StockCheckDetailInfo {
|
|
|
|
|
DetailId string `json:"detailId"`
|
|
|
|
|
CheckId string `json:"checkId"`
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
SystemQuantity string `json:"systemQuantity"`
|
|
|
|
|
ActualQuantity string `json:"actualQuantity"`
|
|
|
|
|
DiffQuantity string `json:"diffQuantity"`
|
|
|
|
|
DiffAmount string `json:"diffAmount"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
}
|
|
|
|
|
CreateStockCheckReq {
|
|
|
|
|
CheckDate string `json:"checkDate"`
|
|
|
|
|
Checker string `json:"checker"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
Details []StockCheckDetailReq `json:"details"`
|
|
|
|
|
}
|
|
|
|
|
StockCheckDetailReq {
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
ActualQuantity string `json:"actualQuantity"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
}
|
|
|
|
|
UpdateStockCheckReq {
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
Details []StockCheckDetailReq `json:"details"`
|
|
|
|
|
}
|
|
|
|
|
ListStockCheckReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
CheckNo string `form:"checkNo,optional"`
|
|
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
StartDate string `form:"startDate,optional"`
|
|
|
|
|
EndDate string `form:"endDate,optional"`
|
|
|
|
|
}
|
|
|
|
|
ListStockCheckResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []StockCheckInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// ==================== Stock Adjust Types ====================
|
|
|
|
|
type (
|
|
|
|
|
StockAdjustInfo {
|
|
|
|
|
AdjustId string `json:"adjustId"`
|
|
|
|
|
AdjustNo string `json:"adjustNo"`
|
|
|
|
|
AdjustDate string `json:"adjustDate"`
|
|
|
|
|
AdjustReason string `json:"adjustReason"`
|
|
|
|
|
Operator string `json:"operator"`
|
|
|
|
|
Approver string `json:"approver"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
CreatedAt string `json:"createdAt"`
|
|
|
|
|
UpdatedAt string `json:"updatedAt"`
|
|
|
|
|
Details []StockAdjustDetailInfo `json:"details"`
|
|
|
|
|
}
|
|
|
|
|
StockAdjustDetailInfo {
|
|
|
|
|
DetailId string `json:"detailId"`
|
|
|
|
|
AdjustId string `json:"adjustId"`
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
ProductName string `json:"productName"`
|
|
|
|
|
BeforeQuantity string `json:"beforeQuantity"`
|
|
|
|
|
AdjustQuantity string `json:"adjustQuantity"`
|
|
|
|
|
AfterQuantity string `json:"afterQuantity"`
|
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
}
|
|
|
|
|
CreateStockAdjustReq {
|
|
|
|
|
AdjustDate string `json:"adjustDate"`
|
|
|
|
|
AdjustReason string `json:"adjustReason"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
Details []StockAdjustDetailReq `json:"details"`
|
|
|
|
|
}
|
|
|
|
|
StockAdjustDetailReq {
|
|
|
|
|
ProductId string `json:"productId"`
|
|
|
|
|
AdjustQuantity string `json:"adjustQuantity"`
|
|
|
|
|
Remark string `json:"remark,optional"`
|
|
|
|
|
}
|
|
|
|
|
ApproveStockAdjustReq {
|
|
|
|
|
Action int64 `json:"action"`
|
|
|
|
|
}
|
|
|
|
|
ListStockAdjustReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
AdjustNo string `form:"adjustNo,optional"`
|
|
|
|
|
AdjustReason string `form:"adjustReason,optional"`
|
|
|
|
|
Status int64 `form:"status,optional,default=-1"`
|
|
|
|
|
StartDate string `form:"startDate,optional"`
|
|
|
|
|
EndDate string `form:"endDate,optional"`
|
|
|
|
|
}
|
|
|
|
|
ListStockAdjustResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []StockAdjustInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2026-03-30 02:53:55 +00:00
|
|
|
// ==================== CRM Relation Types ====================
|
|
|
|
|
type (
|
|
|
|
|
CrmRelationInfo {
|
|
|
|
|
RelationshipId string `json:"relationshipId"`
|
|
|
|
|
FromTenantId string `json:"fromTenantId"`
|
|
|
|
|
FromTenantName string `json:"fromTenantName"`
|
|
|
|
|
ToTenantId string `json:"toTenantId"`
|
|
|
|
|
ToTenantName string `json:"toTenantName"`
|
|
|
|
|
RelationType string `json:"relationType"`
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
ValidFrom string `json:"validFrom"`
|
|
|
|
|
ValidTo string `json:"validTo,optional"`
|
|
|
|
|
}
|
|
|
|
|
CrmListRelationsReq {
|
|
|
|
|
Depth int64 `form:"depth,default=1"`
|
|
|
|
|
}
|
|
|
|
|
CrmListRelationsResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []CrmRelationInfo `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
CrmCreateRelationReq {
|
|
|
|
|
FromTenantId string `json:"fromTenantId"`
|
|
|
|
|
ToTenantId string `json:"toTenantId"`
|
|
|
|
|
RelationType string `json:"relationType"`
|
|
|
|
|
ValidFrom string `json:"validFrom,optional"`
|
|
|
|
|
ValidTo string `json:"validTo,optional"`
|
|
|
|
|
}
|
|
|
|
|
CrmUpdateRelationReq {
|
|
|
|
|
Status int64 `json:"status"`
|
|
|
|
|
ValidFrom string `json:"validFrom,optional"`
|
|
|
|
|
ValidTo string `json:"validTo,optional"`
|
|
|
|
|
}
|
|
|
|
|
CrmRelationHistoryReq {
|
|
|
|
|
Page int64 `form:"page,default=1"`
|
|
|
|
|
PageSize int64 `form:"pageSize,default=20"`
|
|
|
|
|
}
|
|
|
|
|
CrmRelationHistoryItem {
|
|
|
|
|
RelationshipId string `json:"relationshipId"`
|
|
|
|
|
ChangeType string `json:"changeType"`
|
|
|
|
|
BeforeJson string `json:"beforeJson"`
|
|
|
|
|
AfterJson string `json:"afterJson"`
|
|
|
|
|
ChangedBy string `json:"changedBy"`
|
|
|
|
|
ChangedAt string `json:"changedAt"`
|
|
|
|
|
}
|
|
|
|
|
CrmRelationHistoryResp {
|
|
|
|
|
Total int64 `json:"total"`
|
|
|
|
|
List []CrmRelationHistoryItem `json:"list"`
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
|
2026-02-28 15:29:16 +08:00
|
|
|
// ==================== Services ====================
|
|
|
|
|
// Auth - No JWT required
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/auth
|
|
|
|
|
group: auth
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler LoginHandler
|
|
|
|
|
post /login (LoginReq) returns (LoginResp)
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-30 02:53:55 +00:00
|
|
|
// CRM - Graph & Relations
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/crm
|
|
|
|
|
group: crm/relation
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListUpstreamHandler
|
|
|
|
|
get /graph/upstream (CrmListRelationsReq) returns (CrmListRelationsResp)
|
|
|
|
|
|
|
|
|
|
@handler ListDownstreamHandler
|
|
|
|
|
get /graph/downstream (CrmListRelationsReq) returns (CrmListRelationsResp)
|
|
|
|
|
|
|
|
|
|
@handler CreateRelationHandler
|
|
|
|
|
post /relationships (CrmCreateRelationReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateRelationHandler
|
|
|
|
|
put /relationships/:id (CrmUpdateRelationReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler ListRelationHistoryHandler
|
|
|
|
|
get /relationships/history (CrmRelationHistoryReq) returns (CrmRelationHistoryResp)
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 15:29:16 +08:00
|
|
|
// Auth - JWT required
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/auth
|
|
|
|
|
group: auth
|
|
|
|
|
jwt: Auth
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler LogoutHandler
|
|
|
|
|
post /logout returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler GetUserInfoHandler
|
|
|
|
|
get /info returns (UserInfo)
|
|
|
|
|
|
|
|
|
|
@handler ChangePasswordHandler
|
|
|
|
|
put /password (ChangePasswordReq) returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// System - User Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/system
|
|
|
|
|
group: system/user
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListUserHandler
|
|
|
|
|
get /users (ListUserReq) returns (ListUserResp)
|
|
|
|
|
|
|
|
|
|
@handler GetUserHandler
|
|
|
|
|
get /users/:id returns (UserInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateUserHandler
|
|
|
|
|
post /users (CreateUserReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateUserHandler
|
|
|
|
|
put /users/:id (UpdateUserReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteUserHandler
|
|
|
|
|
delete /users/:id returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateUserStatusHandler
|
|
|
|
|
put /users/:id/status (UpdateUserStatusReq) returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// System - Role Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/system
|
|
|
|
|
group: system/role
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListRoleHandler
|
|
|
|
|
get /roles (ListRoleReq) returns (ListRoleResp)
|
|
|
|
|
|
|
|
|
|
@handler GetRoleHandler
|
|
|
|
|
get /roles/:id returns (RoleInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateRoleHandler
|
|
|
|
|
post /roles (CreateRoleReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateRoleHandler
|
|
|
|
|
put /roles/:id (UpdateRoleReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteRoleHandler
|
|
|
|
|
delete /roles/:id returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler SetRolePermissionsHandler
|
|
|
|
|
put /roles/:id/permissions (SetRolePermissionsReq) returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// System - Menu Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/system
|
|
|
|
|
group: system/menu
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListMenuHandler
|
|
|
|
|
get /menus returns (ListMenuResp)
|
|
|
|
|
|
|
|
|
|
@handler GetMenuHandler
|
|
|
|
|
get /menus/:id returns (MenuInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateMenuHandler
|
|
|
|
|
post /menus (CreateMenuReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateMenuHandler
|
|
|
|
|
put /menus/:id (UpdateMenuReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteMenuHandler
|
|
|
|
|
delete /menus/:id returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// System - Operation Logs
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/system
|
|
|
|
|
group: system/log
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListLogHandler
|
|
|
|
|
get /logs (ListLogReq) returns (ListLogResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// System - Config
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/system
|
|
|
|
|
group: system/config
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListConfigHandler
|
|
|
|
|
get /configs returns (ListConfigResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateConfigHandler
|
|
|
|
|
put /configs/:key (UpdateConfigReq) returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inventory - Product Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/product
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListProductHandler
|
|
|
|
|
get /products (ListProductReq) returns (ListProductResp)
|
|
|
|
|
|
|
|
|
|
@handler GetProductHandler
|
|
|
|
|
get /products/:id returns (ProductInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateProductHandler
|
|
|
|
|
post /products (CreateProductReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateProductHandler
|
|
|
|
|
put /products/:id (UpdateProductReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteProductHandler
|
|
|
|
|
delete /products/:id returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler ImportProductHandler
|
|
|
|
|
post /products/import returns (ImportProductResp)
|
|
|
|
|
|
|
|
|
|
@handler ExportProductHandler
|
|
|
|
|
get /products/export
|
2026-06-14 15:24:02 +08:00
|
|
|
|
|
|
|
|
@handler GetProductSummaryHandler
|
|
|
|
|
get /products/summary returns (ProductSummaryResp)
|
|
|
|
|
|
|
|
|
|
@handler GetColorDetailHandler
|
|
|
|
|
get /products/colors (ListColorDetailReq) returns (ColorDetailResp)
|
|
|
|
|
|
|
|
|
|
@handler GetProductTreeHandler
|
|
|
|
|
get /products/:id/tree returns (ProductTreeResp)
|
|
|
|
|
|
|
|
|
|
@handler ListPansHandler
|
|
|
|
|
get /products/:id/pans returns (ListPanResp)
|
|
|
|
|
|
|
|
|
|
@handler SavePansHandler
|
|
|
|
|
put /products/:id/pans (SavePansReq) returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-05 08:06:28 +09:00
|
|
|
// Inventory - Yarn Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/yarn
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListYarnHandler
|
|
|
|
|
get /yarns (ListYarnReq) returns (ListYarnResp)
|
|
|
|
|
|
|
|
|
|
@handler GetYarnHandler
|
|
|
|
|
get /yarns/:id returns (YarnInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateYarnHandler
|
|
|
|
|
post /yarns (CreateYarnReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateYarnHandler
|
|
|
|
|
put /yarns/:id (UpdateYarnReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteYarnHandler
|
|
|
|
|
delete /yarns/:id returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inventory - Product Batch Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/productbatch
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListProductBatchHandler
|
|
|
|
|
get /products/:id/batches returns (ListProductBatchResp)
|
|
|
|
|
|
|
|
|
|
@handler CreateProductBatchHandler
|
|
|
|
|
post /products/:id/batches (CreateProductBatchReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateProductBatchHandler
|
|
|
|
|
put /products/:id/batches/:batchId (UpdateProductBatchReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler DeleteProductBatchHandler
|
|
|
|
|
delete /products/:id/batches/:batchId returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-14 15:24:02 +08:00
|
|
|
// Inventory - Pan/Bolt Management
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/panbolt
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListBoltsHandler
|
|
|
|
|
get /pans/:id/bolts returns (ListBoltResp)
|
|
|
|
|
|
|
|
|
|
@handler SaveBoltsHandler
|
|
|
|
|
put /pans/:id/bolts (SaveBoltsReq) returns (IdResp)
|
2026-02-28 15:29:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inventory - Stock Query & Statistics
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/stock
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListStockHandler
|
|
|
|
|
get /stocks (ListProductReq) returns (ListProductResp)
|
|
|
|
|
|
|
|
|
|
@handler GetStockSummaryHandler
|
|
|
|
|
get /stocks/summary returns (StockSummaryResp)
|
|
|
|
|
|
|
|
|
|
@handler GetStockByColorHandler
|
|
|
|
|
get /stocks/by-color returns (StockGroupResp)
|
|
|
|
|
|
|
|
|
|
@handler GetStockByLocationHandler
|
|
|
|
|
get /stocks/by-location returns (StockGroupResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inventory - Stock Check
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/check
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListStockCheckHandler
|
|
|
|
|
get /checks (ListStockCheckReq) returns (ListStockCheckResp)
|
|
|
|
|
|
|
|
|
|
@handler GetStockCheckHandler
|
|
|
|
|
get /checks/:id returns (StockCheckInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateStockCheckHandler
|
|
|
|
|
post /checks (CreateStockCheckReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler UpdateStockCheckHandler
|
|
|
|
|
put /checks/:id (UpdateStockCheckReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler ConfirmStockCheckHandler
|
|
|
|
|
post /checks/:id/confirm returns (IdResp)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inventory - Stock Adjust
|
|
|
|
|
@server (
|
|
|
|
|
prefix: /api/v1/inventory
|
|
|
|
|
group: inventory/adjust
|
|
|
|
|
jwt: Auth
|
|
|
|
|
middleware: AuthorityMiddleware
|
|
|
|
|
)
|
|
|
|
|
service gateway-api {
|
|
|
|
|
@handler ListStockAdjustHandler
|
|
|
|
|
get /adjusts (ListStockAdjustReq) returns (ListStockAdjustResp)
|
|
|
|
|
|
|
|
|
|
@handler GetStockAdjustHandler
|
|
|
|
|
get /adjusts/:id returns (StockAdjustInfo)
|
|
|
|
|
|
|
|
|
|
@handler CreateStockAdjustHandler
|
|
|
|
|
post /adjusts (CreateStockAdjustReq) returns (IdResp)
|
|
|
|
|
|
|
|
|
|
@handler ApproveStockAdjustHandler
|
|
|
|
|
post /adjusts/:id/approve (ApproveStockAdjustReq) returns (IdResp)
|
|
|
|
|
}
|