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
c182125f
authored
Dec 09, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
750ceea8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
service/service_zy_common.go
service/service_zy_common.go
View file @
c182125f
...
...
@@ -39,9 +39,21 @@ func (qs *ZiyingService) skuLockNum(c *redis.Conn,goodsId string) int64{
获取自营活动价
*/
func
(
qs
*
ZiyingService
)
ActivityPrice
(
ctx
*
gin
.
Context
,
SkuInfo
string
,
c
*
redis
.
Conn
)
*
orderedmap
.
OrderedMap
{
goodsId
:=
gjson
.
Get
(
SkuInfo
,
"goods_id"
)
.
String
()
//团购价
//assemble := ctx.Request.FormValue("power[assemble]")
//if php2go.InArray(assemble,[]string{"true","1",""}) {
// teamAc,_ := gredis.String((*c).Do("get","Self_activity_assemble_list"))
// if teamAc != "" && goodsId == gjson.Get(teamAc,"goods_id").String() {
// data := qs.HDActivityPrice(ctx,teamAc,SkuInfo,"7")
// if data != nil {
// return data
// }
// }
//}
//新客价处理
if
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
==
"true"
||
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
==
"1"
{
if
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
==
"true"
||
ctx
.
Request
.
FormValue
(
"power[newCustomer]"
)
==
"1"
{
goodsActivityPrice
,
_
:=
gredis
.
String
((
*
c
)
.
Do
(
"get"
,
"Self_ActivityPrice_10000_NewCustomer"
))
if
goodsActivityPrice
!=
""
{
data
:=
qs
.
HDActivityPrice
(
ctx
,
goodsActivityPrice
,
SkuInfo
,
"5"
)
...
...
@@ -49,10 +61,9 @@ func (qs *ZiyingService) ActivityPrice(ctx *gin.Context,SkuInfo string,c *redis.
return
data
}
}
}
//团购限制
data
:=
qs
.
HDGoodsLimit
(
g
json
.
Get
(
SkuInfo
,
"goods_id"
)
.
String
()
,
gjson
.
Get
(
SkuInfo
,
"stock"
)
.
String
(),
c
)
data
:=
qs
.
HDGoodsLimit
(
g
oodsId
,
gjson
.
Get
(
SkuInfo
,
"stock"
)
.
String
(),
c
)
common
.
PrintDebugHtml
(
ctx
,
data
)
if
data
!=
nil
{
...
...
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