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
c965d06e
authored
Oct 21, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://git.ichunt.net/q578953158/go_sku_server
parents
849ba111
b01fac9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
service/service_ly_common.go
service/service_zy.go
service/service_ly_common.go
View file @
c965d06e
...
@@ -262,7 +262,7 @@ func (ls *LyService) GetStock(sku model.LySku) (stock int64) {
...
@@ -262,7 +262,7 @@ func (ls *LyService) GetStock(sku model.LySku) (stock int64) {
}
}
//这里还有一个逻辑
//这里还有一个逻辑
//如果是寄售的数据(source=12),获取的库存还要减去锁库的库存
//如果是寄售的数据(source=12),获取的库存还要减去锁库的库存
if
sku
.
Source
==
12
{
if
sku
.
Source
==
12
||
php2go
.
InArray
(
sku
.
Canal
,
[]
string
{
"L0018319"
,
"L0013521"
,
"L0018562"
})
{
//获取锁库库存
//获取锁库库存
redisCon
:=
gredis
.
Conn
(
"search_r"
)
redisCon
:=
gredis
.
Conn
(
"search_r"
)
stockStr
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"sku_lock_stock"
,
sku
.
GoodsId
))
stockStr
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"sku_lock_stock"
,
sku
.
GoodsId
))
...
...
service/service_zy.go
View file @
c965d06e
...
@@ -133,7 +133,7 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context, goodsIds []string, ch c
...
@@ -133,7 +133,7 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context, goodsIds []string, ch c
A
.
Set
(
"packing"
,
gjson
.
Get
(
info
,
"packing"
)
.
Int
())
//
A
.
Set
(
"packing"
,
gjson
.
Get
(
info
,
"packing"
)
.
Int
())
//
A
.
Set
(
"goods_unit"
,
gjson
.
Get
(
info
,
"goods_unit"
)
.
Int
())
//
A
.
Set
(
"goods_unit"
,
gjson
.
Get
(
info
,
"goods_unit"
)
.
Int
())
//
A
.
Set
(
"goods_brief"
,
gjson
.
Get
(
info
,
"goods_brief"
)
.
String
())
//
A
.
Set
(
"goods_brief"
,
gjson
.
Get
(
info
,
"goods_brief"
)
.
String
())
//
A
.
Set
(
"ability_level"
,
2
)
A
.
Set
(
"ability_level"
,
2
)
moq
:=
gjson
.
Get
(
info
,
"moq"
)
.
Int
()
moq
:=
gjson
.
Get
(
info
,
"moq"
)
.
Int
()
mpq
:=
gjson
.
Get
(
info
,
"mpq"
)
.
Int
()
mpq
:=
gjson
.
Get
(
info
,
"mpq"
)
.
Int
()
...
@@ -178,11 +178,11 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context, goodsIds []string, ch c
...
@@ -178,11 +178,11 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context, goodsIds []string, ch c
A
.
Set
(
"self_supplier_type"
,
gjson
.
Get
(
info
,
"self_supplier_type"
)
.
Int
())
//
A
.
Set
(
"self_supplier_type"
,
gjson
.
Get
(
info
,
"self_supplier_type"
)
.
Int
())
//
//处理货期
//处理货期
cnDeliveryTime
:=
gjson
.
Get
(
info
,
"cn_delivery_time"
)
.
String
()
//
cnDeliveryTime := gjson.Get(info, "cn_delivery_time").String()
if
cnDeliveryTime
==
""
{
//
if cnDeliveryTime == "" {
cnDeliveryTime
=
"3-7工作日"
//
cnDeliveryTime = "3-7工作日"
}
//
}
A
.
Set
(
"cn_delivery_time"
,
cnDeliveryTime
)
// 货期
A
.
Set
(
"cn_delivery_time"
,
"1-3工作日"
)
// 货期
//查询品牌名称(作废,现在改成读联营的品牌库,之前有关联自营商品到spu_id)
//查询品牌名称(作废,现在改成读联营的品牌库,之前有关联自营商品到spu_id)
brand_id
:=
gjson
.
Get
(
info
,
"brand_id"
)
.
Int
()
brand_id
:=
gjson
.
Get
(
info
,
"brand_id"
)
.
Int
()
...
...
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