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
50adaeee
authored
Jun 19, 2023
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
起订量小于50的排序问题
parent
6e11526b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
service/service_price.go
service/service_price.go
View file @
50adaeee
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
"go_sku_server/model"
"go_sku_server/model"
c
"go_sku_server/pkg/common"
c
"go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
"go_sku_server/pkg/gredis"
"sort"
"strconv"
"strconv"
)
)
...
@@ -86,6 +87,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
...
@@ -86,6 +87,9 @@ func (ps *PriceService) GenerateLadderPrice(sku model.LySku) (generatedLadderPri
PriceUs
:
c
.
MyRound
(
c
.
MulFloat
(
costPriceUs
,
ratio
),
4
),
PriceUs
:
c
.
MyRound
(
c
.
MulFloat
(
costPriceUs
,
ratio
),
4
),
})
})
}
}
sort
.
Slice
(
generatedLadderPrice
,
func
(
i
,
j
int
)
bool
{
return
generatedLadderPrice
[
i
]
.
Purchases
<
generatedLadderPrice
[
j
]
.
Purchases
})
return
generatedLadderPrice
return
generatedLadderPrice
}
}
//判断最小起订量是属于哪个范围
//判断最小起订量是属于哪个范围
...
...
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