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
c8992f7f
authored
Jan 15, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
user-scope
parent
aaee156b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
model/ly_sku.go
service/service_activity.go
model/ly_sku.go
View file @
c8992f7f
...
@@ -62,29 +62,30 @@ type LySku struct {
...
@@ -62,29 +62,30 @@ type LySku struct {
AcType
int
`json:"ac_type"`
AcType
int
`json:"ac_type"`
//活动信息
//活动信息
HasGiftActivity
int
`json:"has_gift_activity"`
HasGiftActivity
int
`json:"has_gift_activity"`
GiftActivity
GiftActivity
`json:"gift_activity"`
GiftActivity
GiftActivity
`json:"gift_activity"`
ActivityInfo
PriceActivity
`json:"activity_info"`
ActivityInfo
PriceActivity
`json:"activity_info"`
}
}
type
PriceActivity
struct
{
type
PriceActivity
struct
{
ActivityCommon
ActivityCommon
Ratio
float64
`json:"ratio"`
Ratio
float64
`json:"ratio"`
SignText
string
`json:"sign_text"`
SignText
string
`json:"sign_text"`
Sign
string
`json:"sign"`
Sign
string
`json:"sign"`
ShowName
string
`json:"show_name"`
ShowName
string
`json:"show_name"`
}
}
type
GiftActivity
struct
{
type
GiftActivity
struct
{
ActivityCommon
ActivityCommon
ItemList
[]
ActivityItem
`json:"items,omitempty"`
ItemList
[]
ActivityItem
`json:"items,omitempty"`
}
}
type
ActivityCommon
struct
{
type
ActivityCommon
struct
{
HasActivity
bool
`json:"-"`
HasActivity
bool
`json:"-"`
ActivityId
int
`json:"activity_id,omitempty"`
ActivityId
int
`json:"activity_id,omitempty"`
ActivityName
string
`json:"activity_name,omitempty"`
ActivityName
string
`json:"activity_name,omitempty"`
AllowCoupon
int
`json:"-"`
AllowCoupon
int
`json:"-"`
UserScope
int
`json:"user_scope"`
}
}
//为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致
//为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致
...
...
service/service_activity.go
View file @
c8992f7f
...
@@ -103,6 +103,7 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac
...
@@ -103,6 +103,7 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac
ActivityId
:
activity
.
ActivityId
,
ActivityId
:
activity
.
ActivityId
,
ActivityName
:
activity
.
ActivityName
,
ActivityName
:
activity
.
ActivityName
,
AllowCoupon
:
activity
.
AllowCoupon
,
AllowCoupon
:
activity
.
AllowCoupon
,
UserScope
:
activity
.
UserScope
,
},
},
}
}
}
}
...
@@ -182,6 +183,7 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
...
@@ -182,6 +183,7 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
ActivityId
:
activity
.
ActivityId
,
ActivityId
:
activity
.
ActivityId
,
ActivityName
:
activity
.
ActivityName
,
ActivityName
:
activity
.
ActivityName
,
AllowCoupon
:
activity
.
AllowCoupon
,
AllowCoupon
:
activity
.
AllowCoupon
,
UserScope
:
activity
.
UserScope
,
},
},
}
}
}
}
...
...
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