Commit c8992f7f by mushishixian

user-scope

parent aaee156b
Showing with 14 additions and 11 deletions
......@@ -62,29 +62,30 @@ type LySku struct {
AcType int `json:"ac_type"`
//活动信息
HasGiftActivity int `json:"has_gift_activity"`
GiftActivity GiftActivity `json:"gift_activity"`
HasGiftActivity int `json:"has_gift_activity"`
GiftActivity GiftActivity `json:"gift_activity"`
ActivityInfo PriceActivity `json:"activity_info"`
}
type PriceActivity struct {
ActivityCommon
Ratio float64 `json:"ratio"`
SignText string `json:"sign_text"`
Sign string `json:"sign"`
ShowName string `json:"show_name"`
Ratio float64 `json:"ratio"`
SignText string `json:"sign_text"`
Sign string `json:"sign"`
ShowName string `json:"show_name"`
}
type GiftActivity struct {
ActivityCommon
ItemList []ActivityItem `json:"items,omitempty"`
ItemList []ActivityItem `json:"items,omitempty"`
}
type ActivityCommon struct {
HasActivity bool `json:"-"`
ActivityId int `json:"activity_id,omitempty"`
ActivityName string `json:"activity_name,omitempty"`
AllowCoupon int `json:"-"`
HasActivity bool `json:"-"`
ActivityId int `json:"activity_id,omitempty"`
ActivityName string `json:"activity_name,omitempty"`
AllowCoupon int `json:"-"`
UserScope int `json:"user_scope"`
}
//为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致
......
......@@ -103,6 +103,7 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac
ActivityId: activity.ActivityId,
ActivityName: activity.ActivityName,
AllowCoupon: activity.AllowCoupon,
UserScope: activity.UserScope,
},
}
}
......@@ -182,6 +183,7 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
ActivityId: activity.ActivityId,
ActivityName: activity.ActivityName,
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