Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99bee35b
authored
May 19, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善
parent
72e3ae27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
model/ly_sku.go
service/service_ly.go
model/ly_sku.go
View file @
99bee35b
...
...
@@ -100,10 +100,11 @@ type LySku struct {
LabelOp
int
`json:"label_op"`
BrandPack
string
`json:"brand_pack"`
OnwayStock
int
`json:"onway_stock"`
PhysicalStock
int64
`json:"physical_stock"`
// 事物库存:stock - onway_stock
CompareRatio
float64
`json:"compare_ratio"`
//兼容自营下单的字段,取成本价的第一个阶梯的人民币
Cost
float64
`json:"cost"`
CostUs
float64
`json:"cost_us"`
Cost
float64
`json:"cost"`
CostUs
float64
`json:"cost_us"`
IsZiying
int
`json:"is_ziying"`
BatchFormat
interface
{}
`json:"batch_format"`
}
...
...
@@ -256,6 +257,9 @@ func InitSkuData(sku string) (data LySku) {
stock
:=
gjson
.
Get
(
sku
,
"stock"
)
.
Int
()
data
.
Stock
=
stock
onwayStock
:=
gjson
.
Get
(
sku
,
"onway_stock"
)
.
Int
()
data
.
OnwayStock
=
int
(
onwayStock
)
eccn
:=
gjson
.
Get
(
sku
,
"eccn"
)
.
String
()
data
.
Eccn
=
eccn
...
...
service/service_ly.go
View file @
99bee35b
...
...
@@ -207,6 +207,10 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//获取新的在途库存信息
sku
.
OnwayStock
=
ls
.
getOnwayStock
(
sku
.
GoodsId
)
if
sku
.
IsZiying
==
1
{
// 计算实物库存:stock - onway_stock
sku
.
PhysicalStock
=
sku
.
Stock
-
int64
(
sku
.
OnwayStock
)
}
//格式化为对象返回
if
sku
.
StockInfo
==
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment