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
91d78a1e
authored
Aug 18, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-价格体系修改-20230815' into dev
parents
4a12e44f
ed01d0ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
service/service_price.go
service/service_price.go
View file @
91d78a1e
...
...
@@ -360,14 +360,14 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku {
}
//fmt.Println(costMapIndex)
priceRatio
:=
priceRatioList
[
costMapIndex
]
fmt
.
Println
(
"获取到的阶梯系数为 : "
,
priceRatio
)
priceCnRatio
:=
priceRatio
.
Ratio
priceUsRatio
:=
priceRatio
.
RatioUsd
// 阶梯价格系数正序取
fmt
.
Println
(
"价格:"
,
c
.
MulFloat
(
ladder
.
PriceCn
,
priceCnRatio
))
generatedLadderPrice
=
append
(
generatedLadderPrice
,
model
.
LadderPrice
{
Purchases
:
ladder
.
Purchases
,
PriceCn
:
c
.
MyRound
(
c
.
MulFloat
(
ladder
.
PriceCn
,
priceCnRatio
),
4
),
PriceUs
:
c
.
MyRound
(
c
.
MulFloat
(
ladder
.
PriceUs
,
priceUsRatio
),
4
),
PriceCn
:
c
.
MyRound
(
c
.
MulFloat
(
ladder
.
PriceCn
,
priceCnRatio
),
5
),
PriceUs
:
c
.
MyRound
(
c
.
MulFloat
(
ladder
.
PriceUs
,
priceUsRatio
),
5
),
})
showPriceRatioList
=
append
(
showPriceRatioList
,
model
.
PriceRatio
{
Ratio
:
priceCnRatio
,
...
...
@@ -375,7 +375,6 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) model.LySku {
Purchases
:
int64
(
ladder
.
Purchases
),
})
}
}
else
{
//价格阶梯数量超过最利润点的层级的情况
for
i
:=
0
;
i
<
9
;
i
++
{
...
...
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