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
767de537
authored
Apr 25, 2023
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-美金活动价-20230420'
parents
8e720d08
cbf75e8d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
service/service_ladder_price.go
service/service_ladder_price.go
View file @
767de537
...
...
@@ -2,11 +2,12 @@ package service
import
(
"encoding/json"
"github.com/gogf/gf/util/gconv"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/pkg/common"
"go_sku_server/pkg/e"
"github.com/gogf/gf/util/gconv"
"github.com/tidwall/gjson"
)
type
LadderPriceService
struct
{
...
...
@@ -44,7 +45,14 @@ func (LP *LadderPriceService) GetPriceInfoByNum(ladderPriceRequest model.LadderP
if
(
goodsType
==
1
||
goodsType
==
2
)
&&
acType
!=
1
&&
ladderPriceRequest
.
Currency
!=
1
{
//美元
res
[
"price_us"
]
=
ladderPriceOne
.
Get
(
"price_us"
)
.
Float
()
res
[
"price_us_total"
]
=
common
.
MyRound
(
gconv
.
Float64
(
res
[
"price_us"
])
*
gconv
.
Float64
(
num
),
4
)
priceAcUs
:=
ladderPriceOne
.
Get
(
"price_ac_us"
)
.
Float
()
if
priceAcUs
==
0
{
goodsInfo
[
"ac_type"
]
=
0
}
if
priceAcUs
!=
0
{
res
[
"price_ac_us"
]
=
priceAcUs
res
[
"price_ac_us_total"
]
=
common
.
MyRound
(
priceAcUs
*
gconv
.
Float64
(
num
),
4
)
}
}
else
{
//人民币
res
[
"price_cn"
]
=
ladderPriceOne
.
Get
(
"price_cn"
)
.
Float
()
...
...
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