Commit f05fb3d6 by mushishixian

fix

parent b6d2fd2e
...@@ -45,6 +45,7 @@ type ActivityItem struct { ...@@ -45,6 +45,7 @@ type ActivityItem struct {
ItemName string `json:"item_name"` ItemName string `json:"item_name"`
Pic string `json:"pic"` Pic string `json:"pic"`
Remark string `json:"remark"` Remark string `json:"remark"`
Content string `json:"content"`
AddTime int `json:"add_time"` AddTime int `json:"add_time"`
} }
......
...@@ -70,6 +70,9 @@ type LySku struct { ...@@ -70,6 +70,9 @@ type LySku struct {
type PriceActivity struct { type PriceActivity struct {
ActivityCommon ActivityCommon
Ratio float64 `json:"ratio"` Ratio float64 `json:"ratio"`
SignText string `json:"sign_text"`
Sign string `json:"sign"`
ShowName string `json:"show_name"`
} }
type GiftActivity struct { type GiftActivity struct {
...@@ -82,9 +85,6 @@ type ActivityCommon struct { ...@@ -82,9 +85,6 @@ type ActivityCommon struct {
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:"-"`
SignText string `json:"sign_text"`
Sign string `json:"sign"`
ShowName string `json:"show_name"`
} }
//为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致 //为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致
......
...@@ -90,6 +90,10 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac ...@@ -90,6 +90,10 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac
} }
INFO: INFO:
if hasActivity { if hasActivity {
for key, item := range activity.ItemList {
activity.ItemList[key].Content = "订单满" + gconv.String(item.Amount) + "元赠" +
gconv.String(item.ItemName) + "X" + gconv.String(item.Num)
}
giftActivity.ActivityName = activity.ActivityName giftActivity.ActivityName = activity.ActivityName
giftActivity.ActivityId = activity.ActivityId giftActivity.ActivityId = activity.ActivityId
giftActivity = model.GiftActivity{ giftActivity = model.GiftActivity{
...@@ -99,9 +103,6 @@ func (as *ActivityService) GetGiftActivity(checkData model.ActivityCheckData, ac ...@@ -99,9 +103,6 @@ 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,
SignText: activity.SignText,
Sign: activity.Sign,
ShowName: activity.ShowName,
}, },
} }
} }
...@@ -173,14 +174,14 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a ...@@ -173,14 +174,14 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
priceActivity.ActivityId = activity.ActivityId priceActivity.ActivityId = activity.ActivityId
priceActivity = model.PriceActivity{ priceActivity = model.PriceActivity{
Ratio: activity.Ratio, Ratio: activity.Ratio,
SignText: activity.SignText,
Sign: activity.Sign,
ShowName: activity.ShowName,
ActivityCommon: model.ActivityCommon{ ActivityCommon: model.ActivityCommon{
HasActivity: hasActivity, HasActivity: hasActivity,
ActivityId: activity.ActivityId, ActivityId: activity.ActivityId,
ActivityName: activity.ActivityName, ActivityName: activity.ActivityName,
AllowCoupon: activity.AllowCoupon, AllowCoupon: activity.AllowCoupon,
SignText: activity.SignText,
Sign: activity.Sign,
ShowName: activity.ShowName,
}, },
} }
} }
......
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