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
c48bfc38
authored
May 19, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' into dev
parents
d1b6f109
78194c2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
model/ly_sku.go
service/service_ly.go
service/service_ly_common.go
model/ly_sku.go
View file @
c48bfc38
...
...
@@ -162,6 +162,7 @@ type SpuExtra struct {
TransformedWeight
float64
`json:"weight"`
Width
string
`json:"width" bson:"width"`
Length
string
`json:"length" bson:"length"`
BrandPack
string
`json:"brand_pack" bson:"brand_pack"`
}
type
CustomPrice
struct
{
...
...
@@ -284,7 +285,8 @@ func InitSkuData(sku string) (data LySku) {
data
.
Coo
=
gjson
.
Get
(
sku
,
"coo"
)
.
String
()
data
.
AbilityLevel
=
int
(
gjson
.
Get
(
sku
,
"ability_level"
)
.
Int
())
data
.
AbilityLevel
=
int
(
gjson
.
Get
(
sku
,
"ability_level"
)
.
Int
())
return
}
...
...
service/service_ly.go
View file @
c48bfc38
...
...
@@ -137,6 +137,12 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku
.
SpuExtra
=
ls
.
GetSpuExtra
(
sku
.
SpuId
)
}
brandPack
:=
gjson
.
Get
(
spu
,
"brand_pack"
)
.
String
()
if
brandPack
!=
""
{
sku
.
SpuExtra
.
BrandPack
=
brandPack
}
//获取供应链标准品牌
//什么是供应链的标准品牌 供应链那边报关的时候要求他们的标准品牌,所以要吧自己的品牌映射上去
//继来那边对接的标准品牌(下单的时候)
...
...
service/service_ly_common.go
View file @
c48bfc38
...
...
@@ -578,6 +578,7 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
}
usSupplierIdList
:=
[]
int
{
1
,
6
,
19
,
7
,
...
...
@@ -591,19 +592,19 @@ func (ls *LyService) GetTariffAndPrice(sku model.LySku) model.LySku {
if
php2go
.
InArray
(
sku
.
Coo
,
usLabelList
)
{
//转换价格
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X
2.25
//判断原始人民币有没有价格,没有的话,那就是最终的人民币价格 X
1.10
var
transformedLadderPrice
[]
model
.
LadderPrice
transformedLadderPrice
=
sku
.
LadderPrice
//digikey暂时不处理
if
sku
.
SupplierId
!=
7
{
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
)
transformedLadderPrice
[
index
]
.
PriceCn
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
1.10
),
4
)
transformedLadderPrice
[
index
]
.
PriceAc
=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceAc
,
1.10
),
4
)
}
}
sku
.
Tariff
=
2.25
sku
.
TariffFormat
=
"1
25
%"
sku
.
Tariff
=
1.10
sku
.
TariffFormat
=
"1
0
%"
}
else
{
sku
.
Coo
=
""
}
...
...
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