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
3b61fdee
authored
Jun 01, 2021
by
hcy001
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
ssh://119.23.72.7:22611/q578953158/go_sku_server
parents
8d7b618c
07fde388
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
service/service_ly.go
service/service_ly_common.go
service/service_ly.go
View file @
3b61fdee
...
...
@@ -162,6 +162,11 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
//判断是否可以购买
sku
.
IsBuy
=
ls
.
GetIsBuy
(
sku
)
////过期修改库存为0
//if sku.IsExpire == 1 {
// sku.Stock = 0
//}
//用spuInfo补全信息
sku
=
ls
.
CombineSup
(
sku
,
spu
)
//最后一步,将sku的全部信息放到有序map里面
...
...
service/service_ly_common.go
View file @
3b61fdee
...
...
@@ -318,8 +318,19 @@ func (ls *LyService) GetDelivery(supplierId int64, canal string) (delivery map[s
if
canal
!=
""
{
supplierRatio
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"supp_ratio"
,
canal
))
if
supplierRatio
!=
""
{
cnDeliveryTime
:=
gjson
.
Get
(
supplierRatio
,
"cn_delivery_time"
)
.
String
()
usDeliveryTime
:=
gjson
.
Get
(
supplierRatio
,
"us_delivery_time"
)
.
String
()
//为了兼容供应商修改的问题
if
cnDeliveryTime
!=
"周"
&&
cnDeliveryTime
!=
"天"
{
delivery
[
"cn_delivery"
]
=
gjson
.
Get
(
supplierRatio
,
"cn_delivery_time"
)
.
String
()
}
else
{
delivery
[
"cn_delivery"
]
=
""
}
if
usDeliveryTime
!=
"周"
&&
usDeliveryTime
!=
"天"
{
delivery
[
"hk_delivery"
]
=
gjson
.
Get
(
supplierRatio
,
"us_delivery_time"
)
.
String
()
}
else
{
delivery
[
"hk_delivery"
]
=
""
}
}
return
}
...
...
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