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
60b609e8
authored
Mar 12, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-魔方价格体系修改-20250306' into dev
parents
b367efec
830b728c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
service/service_ly.go
service/service_ly.go
View file @
60b609e8
...
...
@@ -169,13 +169,33 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku
.
Moq
=
purchases
}
}
//这里又有一个判断,如果是非猎芯的,目前只有爱智,通过org_id来判断,如果是爱智,不需要走价格体系
//1是猎芯,3是爱智
switch
sku
.
OrgId
{
//case为0是为了兼容价格体系之前的价格
case
0
:
case
1
:
//如果是寄售的,也不走价格体系
if
sku
.
Source
!=
12
{
//这里还有个特殊判断,要兼容华云改价格体系之前的老数据
//判断组织是3并且阶梯价数量为2的就是老数据
if
sku
.
OrgId
==
3
&&
len
(
sku
.
LadderPrice
)
==
2
{
priceService
:=
PriceService
{}
sku
.
LadderPrice
=
priceService
.
GetIEdgePrice
(
sku
.
LadderPrice
)
}
else
{
//这里猎芯和华云都是走同一套的价格体系了
//获取系数和价格
sku
=
ls
.
GetCoefficientAndPrice
(
sku
)
//获取自定义价格后的阶梯价
customPriceService
:=
CustomPrice
{}
sku
.
CustomPriceList
,
_
=
customPriceService
.
getCustomPriceList
(
sku
)
//这里还要针对华云的阶梯价进行一次转换,因为要兼容目前华云的试用方式
if
sku
.
OrgId
==
3
{
sku
.
LadderPrice
=
customPriceService
.
transformIEdgeLadderPrice
(
sku
)
}
}
}
case
3
:
//如果是寄售的,也不走价格体系
if
sku
.
Source
!=
12
{
...
...
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