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
cd7e8d90
authored
Apr 22, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复问题
parent
d7953134
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
service/service_ly_common.go
service/service_price.go
service/service_ly_common.go
View file @
cd7e8d90
...
@@ -568,6 +568,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
...
@@ -568,6 +568,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
if
len
(
sku
.
LadderPrice
)
==
0
{
if
len
(
sku
.
LadderPrice
)
==
0
{
return
sku
return
sku
}
}
//判断场地是否是美国,是美国的话,输出关税率以及转换价格
//判断场地是否是美国,是美国的话,输出关税率以及转换价格
//https://cf.ichunt.net/pages/viewpage.action?pageId=35326045
//https://cf.ichunt.net/pages/viewpage.action?pageId=35326045
usLabelList
:=
[]
string
{
usLabelList
:=
[]
string
{
...
@@ -578,7 +579,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
...
@@ -578,7 +579,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
usSupplierIdList
:=
[]
int
{
usSupplierIdList
:=
[]
int
{
6
,
6
,
19
,
19
,
//
7,
7
,
1675
,
1675
,
}
}
//先判断供应商对不对
//先判断供应商对不对
...
@@ -591,12 +592,18 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
...
@@ -591,12 +592,18 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X 2.25
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X 2.25
var
transformedLadderPrice
[]
model
.
LadderPrice
var
transformedLadderPrice
[]
model
.
LadderPrice
transformedLadderPrice
=
sku
.
LadderPrice
transformedLadderPrice
=
sku
.
LadderPrice
for
index
,
price
:=
range
sku
.
LadderPrice
{
//digikey暂时不处理
transformedLadderPrice
[
index
]
.
PriceCn
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
2.25
),
4
)
if
sku
.
SupplierId
!=
7
{
transformedLadderPrice
[
index
]
.
PriceAc
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceAc
,
2.25
),
4
)
for
index
,
price
:=
range
sku
.
LadderPrice
{
transformedLadderPrice
[
index
]
.
PriceCn
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
2.25
),
4
)
transformedLadderPrice
[
index
]
.
PriceAc
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceAc
,
2.25
),
4
)
}
}
}
sku
.
Tariff
=
2.25
sku
.
Tariff
=
2.25
sku
.
TariffFormat
=
"125%"
sku
.
TariffFormat
=
"125%"
}
else
{
sku
.
Coo
=
""
}
}
return
sku
return
sku
...
...
service/service_price.go
View file @
cd7e8d90
...
@@ -707,7 +707,7 @@ func (ps *PriceService) TransformSpecialSupplierPrice(sku model.LySku) model.LyS
...
@@ -707,7 +707,7 @@ func (ps *PriceService) TransformSpecialSupplierPrice(sku model.LySku) model.LyS
//这里面还要判断,如果是usToCn为true代表也要走美金转人民币的逻辑(前提是没有人民币价格)
//这里面还要判断,如果是usToCn为true代表也要走美金转人民币的逻辑(前提是没有人民币价格)
if
price
.
PriceCn
==
0
&&
usToCn
==
true
{
if
price
.
PriceCn
==
0
&&
usToCn
==
true
{
rmbRatio
,
_
:=
redis
.
Float64
(
redisCon
.
Do
(
"HGET"
,
"erp_rate"
,
currency
))
rmbRatio
,
_
:=
redis
.
Float64
(
redisCon
.
Do
(
"HGET"
,
"erp_rate"
,
currency
))
priceCn
:=
c
.
MyRound
(
c
.
MulFloat
(
priceUs
,
rmbRatio
),
4
)
priceCn
:=
c
.
MyRound
(
c
.
MulFloat
(
priceUs
,
rmbRatio
,
1.13
),
4
)
sku
.
LadderPrice
[
index
]
.
PriceCn
=
priceCn
sku
.
LadderPrice
[
index
]
.
PriceCn
=
priceCn
}
}
}
}
...
...
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