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
77eed07c
authored
Jun 25, 2023
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
价格系数
parent
a516aa21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
service/service_price.go
service/service_price.go
View file @
77eed07c
...
@@ -69,13 +69,16 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
...
@@ -69,13 +69,16 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
//var fixedRatioSlice map[int]float64
//var fixedRatioSlice map[int]float64
switch
{
switch
{
case
sku
.
Moq
<
10
:
case
sku
.
Moq
<
10
:
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.07
,
30
:
1.08
,
100
:
1.09
,
300
:
1.1
,
1000
:
1.11
}
//fixedRatio = map[int]float64{moq: 1.07, 30: 1.08, 100: 1.09, 300: 1.1, 1000: 1.11}
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.11
,
30
:
1.1
,
100
:
1.09
,
300
:
1.08
,
1000
:
1.07
}
break
break
case
sku
.
Moq
<
30
:
case
sku
.
Moq
<
30
:
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.07
,
50
:
1.08
,
200
:
1.09
,
500
:
1.1
,
1000
:
1.11
}
//fixedRatio = map[int]float64{moq: 1.07, 50: 1.08, 200: 1.09, 500: 1.1, 1000: 1.11}
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.11
,
50
:
1.1
,
200
:
1.09
,
500
:
1.08
,
1000
:
1.07
}
break
break
default
:
default
:
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.07
,
200
:
1.08
,
500
:
1.09
,
1000
:
1.1
,
2000
:
1.11
}
//fixedRatio = map[int]float64{moq: 1.07, 200: 1.08, 500: 1.09, 1000: 1.1, 2000: 1.11}
fixedRatio
=
map
[
int
]
float64
{
moq
:
1.11
,
200
:
1.1
,
500
:
1.09
,
1000
:
1.08
,
2000
:
1.07
}
break
break
}
}
...
...
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