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
c70c6bdd
authored
Jan 14, 2026
by
hcy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
label_op 操作按钮
parent
1270a276
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
service/service_activity.go
service/service_activity.go
View file @
c70c6bdd
...
...
@@ -45,6 +45,8 @@ todo 2 加入询价池、立即询价
todo 3 联系销售
规则1 且 规则2 不符合
return label_op 操作按钮,1加入购物车(立即购买) 2 加入询价池 3联系销售
*/
func
(
as
*
ActivityService
)
GetLabelOp
(
sku
model
.
LySku
)
(
op
int
)
{
var
taxCheck
map
[
string
]
map
[
string
]
string
...
...
@@ -53,15 +55,24 @@ func (as *ActivityService) GetLabelOp(sku model.LySku) (op int) {
}
forbidStatus
,
_
:=
Supplier
.
GetSkuForbidStatus
(
sku
.
SupplierId
,
sku
.
StandardBrand
.
StandardBrandId
,
sku
.
GoodsName
,
sku
.
GoodsId
,
sku
.
Eccn
,
sku
.
SpuId
,
sku
.
Canal
,
gconv
.
String
(
sku
.
ClassID1
),
gconv
.
String
(
sku
.
ClassID2
),
taxCheck
)
op
=
3
//联系销售
if
sku
.
GoodsStatus
==
1
&&
sku
.
IsExpire
==
0
&&
forbidStatus
==
0
&&
sku
.
Stock
>
0
&&
sku
.
LadderPrice
!=
nil
&&
sku
.
Stock
>
sku
.
Moq
{
if
sku
.
AbilityLevel
==
2
{
return
1
//可购买
}
else
{
return
2
//立即询价
switch
sku
.
AbilityLevel
{
//履约级别:-1 无 0:弱履约,1:中履约;2:强履约
case
-
1
:
op
=
3
break
case
0
:
op
=
2
break
case
1
:
op
=
2
break
case
2
:
op
=
1
//可购买
break
}
}
else
{
return
3
//联系销售
}
return
op
}
// 获取活动信息,目前是包括促销活动(系数打折)以及满赠活动
...
...
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