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
eec49b35
authored
Nov 12, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新客家
parent
9072e86e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
service/request_params.go
service/service_ly.go
service/request_params.go
View file @
eec49b35
...
...
@@ -17,7 +17,7 @@ type RequestParams struct {
// 用户权限相关参数
Power
PowerParams
//是否展示新客价格
ShowNewCustomerPrice
string
NewCustomer
string
}
// PowerParams 用户权限参数
...
...
@@ -51,5 +51,6 @@ func ExtractRequestParams(ctx *gin.Context) RequestParams {
Invoice
:
ctx
.
Request
.
FormValue
(
"power[invoice]"
),
SpecialInvoice
:
ctx
.
Request
.
FormValue
(
"power[special_invoice]"
),
},
NewCustomer
:
ctx
.
Request
.
FormValue
(
"new_customer"
),
}
}
service/service_ly.go
View file @
eec49b35
...
...
@@ -68,8 +68,7 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//是否展示spu额外信息
showSpuExtra
:=
params
.
ShowSpuExtra
//是否展示新客价格
showNewCustomerPrice
:=
params
.
ShowNewCustomerPrice
newCustomer
:=
params
.
NewCustomer
//批量获取商品详情
skuArr
:=
gredis
.
Hmget
(
"default_r"
,
"sku"
,
goodsIds
)
//为了性能着想,这边也先去批量获取spu的信息
...
...
@@ -211,9 +210,8 @@ func (ls *LyService) LyGoodsDetail(ctx context.Context, params RequestParams, go
//处理活动
sku
.
AcType
=
0
sku
.
AllowCoupon
=
1
//这里获取活动价格和活动类型(折扣打折活动)
sku
=
ls
.
GetActivity
(
sku
)
sku
=
ls
.
GetActivity
(
sku
,
newCustomer
)
priceService
:=
PriceService
{}
//这里又有一个判断,如果是非猎芯的,目前只有爱智,通过org_id来判断
...
...
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