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
0bb017b1
authored
Sep 03, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-自营库存特殊价格处理-20250903' into dev
parents
f24c6b26
86ea8bda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
service/service_ly_common.go
service/service_ly_common.go
View file @
0bb017b1
...
...
@@ -2,6 +2,7 @@ package service
import
(
"encoding/json"
"fmt"
"go_sku_server/model"
c
"go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
...
...
@@ -305,7 +306,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//这里是存了一些特殊供应商价格的判断,数据库里不是所有供应商都是存的人民币/美金
sku
=
priceService
.
TransformSpecialSupplierPrice
(
sku
)
//这里还有
一
个特殊判断
//这里还有
两个
个特殊判断
//猎芯自营 L0018319 WMS同步过来的未税成本单价(人民币),需乘以关税,再填入到基石该SKU的 成本价——国内含税(¥)
// 香港自营(L0018562)WMS同步过来的未税成本单价(美金)
//需更新到 基石该SKU的 成本价——香港交货($)且也需乘美金转人民币汇率, 再乘以关税,填入到基石该SKU的 成本价——国内含税(¥)价
...
...
@@ -314,6 +315,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
originalPrice
=
append
(
originalPrice
,
model
.
OriginPrice
{
Purchases
:
price
.
Purchases
,
PriceCn
:
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
tax
),
4
),
PriceUs
:
price
.
PriceUs
,
})
}
for
index
,
price
:=
range
sku
.
LadderPrice
{
...
...
@@ -346,7 +348,7 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
ladderPrice
=
sku
.
LadderPrice
}
}
fmt
.
Println
(
"原始价格"
,
sku
.
OriginalPrice
)
//获取折扣系数
sku
=
priceService
.
GetDiscountRatio
(
sku
)
data
=
make
([]
model
.
LadderPrice
,
len
(
ladderPrice
))
...
...
@@ -373,10 +375,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
data
[
key
]
.
PriceCostUs
=
price
.
PriceCostUs
data
[
key
]
.
PriceCostCn
=
price
.
PriceCostCn
//判断原始价格有变化,那就要覆盖
if
len
(
originalPrice
)
>
0
{
sku
.
OriginalPrice
=
originalPrice
}
}
//判断原始价格有变化,那就要覆盖
if
len
(
originalPrice
)
>
0
{
sku
.
OriginalPrice
=
originalPrice
}
}
else
{
data
=
make
([]
model
.
LadderPrice
,
len
(
sku
.
LadderPrice
))
...
...
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