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
849ba111
authored
Oct 21, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
判断逻辑 修改
parent
7ce618a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
service/service_ly.go
service/service_ly.go
View file @
849ba111
...
@@ -191,17 +191,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -191,17 +191,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku
.
AcType
=
0
sku
.
AcType
=
0
sku
.
AllowCoupon
=
1
sku
.
AllowCoupon
=
1
//最小起订量要大于阶梯价的最小阶梯数量
if
len
(
sku
.
LadderPrice
)
>
0
{
//排序
sort
.
Sort
(
sorter
.
LadderPriceSorter
(
sku
.
LadderPrice
))
//取出第一个阶梯价
purchases
:=
sku
.
LadderPrice
[
0
]
.
Purchases
if
purchases
>
sku
.
Moq
{
sku
.
Moq
=
purchases
}
}
//这里获取活动价格和活动类型(折扣打折活动)
//这里获取活动价格和活动类型(折扣打折活动)
sku
=
ls
.
GetActivity
(
sku
)
sku
=
ls
.
GetActivity
(
sku
)
...
@@ -274,6 +263,17 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -274,6 +263,17 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
}
}
//最小起订量要大于阶梯价的最小阶梯数量
if
len
(
sku
.
LadderPrice
)
>
0
{
//排序
sort
.
Sort
(
sorter
.
LadderPriceSorter
(
sku
.
LadderPrice
))
//取出第一个阶梯价
purchases
:=
sku
.
LadderPrice
[
0
]
.
Purchases
if
purchases
>
sku
.
Moq
{
sku
.
Moq
=
purchases
}
}
//处理是否可以购买
//处理是否可以购买
if
sku
.
Mpq
==
0
{
if
sku
.
Mpq
==
0
{
sku
.
Mpq
=
1
sku
.
Mpq
=
1
...
...
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