Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
bom_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
6d7b368c
authored
Jul 01, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
阶梯价问题
parent
f69088f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
internal/logic/goods.go
internal/logic/goods.go
View file @
6d7b368c
...
...
@@ -201,10 +201,11 @@ func MatchGoodsInfo(goods model.ApiGoods, goodsMap GoodsMap) (bomMatching model.
bomMatching
.
LadderPrice
=
string
(
ladderPriceStr
)
//获取美元和人民币的价格(需要去判断数量)
var
ladder
model
.
LadderPrice
for
_
,
price
:=
range
goods
.
LadderPrice
{
for
key
,
price
:=
range
goods
.
LadderPrice
{
//需要用于获取价格的阶梯价
if
bomMatching
.
Number
<=
price
.
Purchases
{
ladder
=
price
if
bomMatching
.
Number
<
price
.
Purchases
{
//ladder = price
ladder
=
goods
.
LadderPrice
[
key
-
1
]
break
}
}
...
...
@@ -227,7 +228,7 @@ func MatchGoodsInfo(goods model.ApiGoods, goodsMap GoodsMap) (bomMatching model.
return
}
func
UpdateGoodsPriceAndStockQueue
(
goodsName
string
){
func
UpdateGoodsPriceAndStockQueue
(
goodsName
string
)
{
queueExchange
:=
rabbitmq
.
QueueExchange
{
"keyword_search_queue"
,
""
,
...
...
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