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
8c5bc7f6
authored
Jan 05, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
活动价都展示
parent
5700d6e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
service/service_ly_common.go
service/service_ly_common.go
View file @
8c5bc7f6
...
@@ -315,17 +315,17 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -315,17 +315,17 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//联营或者专卖 同时 存在活动价格
//联营或者专卖 同时 存在活动价格
if
(
sku
.
GoodsType
==
1
||
sku
.
GoodsType
==
2
||
sku
.
GoodsType
==
6
)
&&
sku
.
AcType
>
1
&&
sku
.
Ratio
>
0
{
if
(
sku
.
GoodsType
==
1
||
sku
.
GoodsType
==
2
||
sku
.
GoodsType
==
6
)
&&
sku
.
AcType
>
1
&&
sku
.
Ratio
>
0
{
if
sku
.
Ratio
==
100
{
if
sku
.
Ratio
==
100
{
sku
.
AcType
=
0
//
sku.AcType = 0
continue
//
continue
}
}
tempAcPrice
:=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
sku
.
Ratio
/
100
),
4
)
tempAcPrice
:=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceCn
,
sku
.
Ratio
/
100
),
4
)
//价格与原价一样
//价格与原价一样
if
data
[
key
]
.
PriceCn
==
tempAcPrice
&&
key
<
2
{
if
data
[
key
]
.
PriceCn
==
tempAcPrice
&&
key
<
2
{
flag
++
//
flag++
if
flag
>=
2
||
(
len
(
ladderPrice
)
<
2
)
{
//
if flag >= 2 || (len(ladderPrice) < 2) {
sku
.
AcType
=
0
//
sku.AcType = 0
continue
//
continue
}
//
}
}
}
data
[
key
]
.
PriceAc
=
tempAcPrice
data
[
key
]
.
PriceAc
=
tempAcPrice
priceAcUs
:=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceUs
,
sku
.
RatioUs
/
100
),
4
)
priceAcUs
:=
c
.
MyRound
(
c
.
MulFloat
(
price
.
PriceUs
,
sku
.
RatioUs
/
100
),
4
)
...
@@ -478,8 +478,8 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -478,8 +478,8 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
if
(
sku
.
GoodsType
==
1
||
sku
.
GoodsType
==
2
||
sku
.
GoodsType
==
6
)
&&
sku
.
AcType
>
1
&&
sku
.
Ratio
>
0
{
if
(
sku
.
GoodsType
==
1
||
sku
.
GoodsType
==
2
||
sku
.
GoodsType
==
6
)
&&
sku
.
AcType
>
1
&&
sku
.
Ratio
>
0
{
if
sku
.
Ratio
==
100
{
if
sku
.
Ratio
==
100
{
sku
.
AcType
=
0
//
sku.AcType = 0
continue
//
continue
}
}
priceAc
:=
c
.
MyRound
(
c
.
MulFloat
(
data
[
key
]
.
PriceCn
,
(
sku
.
Ratio
/
100
)),
4
)
priceAc
:=
c
.
MyRound
(
c
.
MulFloat
(
data
[
key
]
.
PriceCn
,
(
sku
.
Ratio
/
100
)),
4
)
...
@@ -488,16 +488,16 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
...
@@ -488,16 +488,16 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
//活动价都是有样式的和平时不一样,如果价格一样,但是样子是活动价,客户会迷惑,所以不输出即可,保持原来的样式
//活动价都是有样式的和平时不一样,如果价格一样,但是样子是活动价,客户会迷惑,所以不输出即可,保持原来的样式
if
data
[
key
]
.
PriceCn
==
priceAc
&&
key
<
2
{
if
data
[
key
]
.
PriceCn
==
priceAc
&&
key
<
2
{
flag
++
flag
++
if
flag
>=
2
{
//
if flag >= 2 {
sku
.
AcType
=
0
//
sku.AcType = 0
continue
//
continue
}
//
}
if
len
(
data
)
>
1
{
//
if len(data) > 1 {
if
data
[
1
]
.
PriceCn
==
0
{
//
if data[1].PriceCn == 0 {
sku
.
AcType
=
0
//
sku.AcType = 0
continue
//
continue
}
//
}
}
//
}
}
}
data
[
key
]
.
PriceAc
=
priceAc
data
[
key
]
.
PriceAc
=
priceAc
...
...
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