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
44c63e35
authored
May 21, 2026
by
hcy
Browse files
Options
_('Browse Files')
Download
Plain Diff
PhysicalStock
parents
9ca54863
3013fdc1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
model/ly_sku.go
service/service_ly_common.go
model/ly_sku.go
View file @
44c63e35
...
...
@@ -124,6 +124,7 @@ type Spot struct {
// Stock int `json:"stock"`
// BatchSn string `json:"batch_sn"`
// SinglePrice string `json:"single_price"`
// NewCost string `json:"new_cost"`
}
type
DiscountRatio
struct
{
...
...
service/service_ly_common.go
View file @
44c63e35
...
...
@@ -307,7 +307,10 @@ func (ls *LyService) GetStock(sku model.LySku) (stock_all int64, jd_stock int64,
}
sku
.
PhysicalStock
=
sku
.
Stock
-
int64
(
sku
.
OnwayStock
)
-
(
lockStock
-
skuLockStockOnway
)
//实际库存
sku
.
OnwayStock
=
sku
.
OnwayStock
-
int
(
skuLockStockOnway
)
//在途库存
if
sku
.
PhysicalStock
<
0
{
sku
.
PhysicalStock
=
0
}
sku
.
OnwayStock
=
sku
.
OnwayStock
-
int
(
skuLockStockOnway
)
//在途库存
//获取京东库存
jdStockShiwuStr
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"sku_jd_stock"
,
sku
.
GoodsId
))
// 京东单个sku实物总数量
jdStockLockStr
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"sku_lock_stock_jd"
,
sku
.
GoodsId
))
//京东锁库数量
...
...
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