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
cbf75e8d
authored
Apr 20, 2023
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
阶梯价接口修改
parent
81bc8b8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
service/service_ladder_price.go
service/service_ladder_price.go
View file @
cbf75e8d
...
...
@@ -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
)
goodsInfo
[
"ac_type"
]
=
0
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