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
b0f270d1
authored
Dec 26, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
f6f91ad9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
service/service_ly_common.go
service/service_ly_common.go
View file @
b0f270d1
...
@@ -319,13 +319,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -319,13 +319,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//这里要获取一个第一个阶梯的未税成本价
//这里要获取一个第一个阶梯的未税成本价
// L0003270 这个供应商的话,两种情况都会有
// L0003270 这个供应商的话,两种情况都会有
var
costNoTax
float64
var
costNoTax
float64
if
sku
.
Canal
==
"L0018319"
||
sku
.
Canal
==
"L0003270"
{
if
sku
.
Canal
==
"L0018319"
{
for
index
,
price
:=
range
sku
.
OriginalPrice
{
for
index
,
price
:=
range
sku
.
OriginalPrice
{
if
index
==
0
{
if
index
==
0
{
costNoTax
=
price
.
PriceCn
costNoTax
=
price
.
PriceCn
if
costNoTax
==
0
{
continue
}
}
}
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
Purchases
:
price
.
Purchases
,
Purchases
:
price
.
Purchases
,
...
@@ -338,7 +336,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -338,7 +336,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
}
}
}
}
if
sku
.
Canal
==
"L0018562"
||
sku
.
Canal
==
"L0003270"
{
if
sku
.
Canal
==
"L0018562"
{
redisCon
:=
gredis
.
Conn
(
"default_r"
)
redisCon
:=
gredis
.
Conn
(
"default_r"
)
defer
redisCon
.
Close
()
defer
redisCon
.
Close
()
usdRatio
,
_
:=
redis
.
Float64
(
redisCon
.
Do
(
"HGET"
,
"erp_rate"
,
2
))
usdRatio
,
_
:=
redis
.
Float64
(
redisCon
.
Do
(
"HGET"
,
"erp_rate"
,
2
))
...
@@ -346,9 +344,6 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -346,9 +344,6 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
priceCnNoTax
:=
c
.
MulFloat
(
price
.
PriceUs
,
usdRatio
)
priceCnNoTax
:=
c
.
MulFloat
(
price
.
PriceUs
,
usdRatio
)
if
index
==
0
{
if
index
==
0
{
costNoTax
=
priceCnNoTax
costNoTax
=
priceCnNoTax
if
costNoTax
==
0
{
continue
}
}
}
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
Purchases
:
price
.
Purchases
,
Purchases
:
price
.
Purchases
,
...
...
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