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
836a8ec3
authored
Dec 09, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调试
parent
8c15ab3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
service/service_ly.go
service/service_ly.go
View file @
836a8ec3
...
@@ -6,6 +6,7 @@ import (
...
@@ -6,6 +6,7 @@ import (
"github.com/syyongx/php2go"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/model"
"go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
"go_sku_server/pkg/gredis"
"sort"
"sort"
"sync"
"sync"
...
@@ -33,7 +34,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -33,7 +34,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
//wg.Done()
//wg.Done()
redisConn
.
Close
()
redisConn
.
Close
()
}()
}()
fast
:=
ctx
.
Request
.
FormValue
(
"power[fast]"
)
fast
:=
ctx
.
Request
.
FormValue
(
"power[fast]"
)
isNewCustomer
:=
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
isNewCustomer
:=
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
power
:=
Power
{
power
:=
Power
{
...
@@ -45,7 +45,7 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -45,7 +45,7 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
SpecialInvoice
:
ctx
.
Request
.
FormValue
(
"power[special_invoice]"
),
SpecialInvoice
:
ctx
.
Request
.
FormValue
(
"power[special_invoice]"
),
VerifyBlacklist
:
ctx
.
Request
.
FormValue
(
"power[verify_blacklist]"
),
VerifyBlacklist
:
ctx
.
Request
.
FormValue
(
"power[verify_blacklist]"
),
}
}
common
.
PrintDebugHtml
(
ctx
,
power
)
//批量获取商品详情
//批量获取商品详情
skuArr
:=
gredis
.
Hmget
(
"default_r"
,
"sku"
,
goodsIds
)
skuArr
:=
gredis
.
Hmget
(
"default_r"
,
"sku"
,
goodsIds
)
//为了性能着想,这边也先去批量获取spu的信息
//为了性能着想,这边也先去批量获取spu的信息
...
@@ -136,9 +136,11 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -136,9 +136,11 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
hasActivity
=
true
hasActivity
=
true
}
}
}
}
common
.
PrintDebugHtml
(
ctx
,
power
.
Member
)
//获取会员价
//获取会员价
if
!
hasActivity
&&
(
power
.
Member
==
"true"
||
power
.
Member
==
"1"
)
{
if
!
hasActivity
&&
(
power
.
Member
==
"true"
||
power
.
Member
==
"1"
)
{
common
.
PrintDebugHtml
(
ctx
,
power
.
Member
)
sku
=
ls
.
GetActivityPrice
(
sku
,
"_Member"
,
power
)
sku
=
ls
.
GetActivityPrice
(
sku
,
"_Member"
,
power
)
if
sku
.
AcType
>
0
{
if
sku
.
AcType
>
0
{
hasActivity
=
true
hasActivity
=
true
...
...
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