Commit c8992f7f by mushishixian

user-scope

parent aaee156b
Showing with 14 additions and 11 deletions
...@@ -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存的数据结构不一定正常,可能类型不一致
......
...@@ -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,
}, },
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment