Commit c00ac46b by mushishixian

会员价

parent e149af28
...@@ -6,7 +6,6 @@ import ( ...@@ -6,7 +6,6 @@ import (
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"go_sku_server/model" "go_sku_server/model"
"go_sku_server/pkg/common"
"go_sku_server/pkg/gredis" "go_sku_server/pkg/gredis"
"sort" "sort"
"sync" "sync"
...@@ -45,7 +44,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan ...@@ -45,7 +44,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
SpecialInvoice: ctx.Request.FormValue("power[special_invoice]"), SpecialInvoice: ctx.Request.FormValue("power[special_invoice]"),
VerifyBlacklist: ctx.Request.FormValue("power[verify_blacklist]"), VerifyBlacklist: ctx.Request.FormValue("power[verify_blacklist]"),
} }
common.PrintDebugHtml(ctx,power)
//批量获取商品详情 //批量获取商品详情
skuArr := gredis.Hmget("default_r", "sku", goodsIds) skuArr := gredis.Hmget("default_r", "sku", goodsIds)
//为了性能着想,这边也先去批量获取spu的信息 //为了性能着想,这边也先去批量获取spu的信息
...@@ -136,11 +134,9 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan ...@@ -136,11 +134,9 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
hasActivity = true hasActivity = true
} }
} }
common.PrintDebugHtml(ctx,power.Member)
//获取会员价 //获取会员价
if !hasActivity && (power.Member == "true" || power.Member == "1") { if !hasActivity {
common.PrintDebugHtml(ctx,power.Member)
sku = ls.GetActivityPrice(sku, "_Member", power) sku = ls.GetActivityPrice(sku, "_Member", power)
if sku.AcType > 0 { if sku.AcType > 0 {
hasActivity = true hasActivity = true
......
...@@ -175,12 +175,13 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe ...@@ -175,12 +175,13 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
// 4: "mobile", // 4: "mobile",
// 5: "email", // 5: "email",
//} //}
////遍历黑名单类型 //遍历黑名单类型
////黑名单就不显示折扣价吗,黑名单只针对折扣价 //黑名单就不显示折扣价吗,黑名单只针对折扣价
//activityBlackListTypes := gjson.Get(activityInfo, "blacklist_type").Array() //activityBlackListTypes := gjson.Get(activityInfo, "blacklist_type").Array()
//for _, value := range activityBlackListTypes { //for _, value := range activityBlackListTypes {
// //验证是否有对应的黑名单类型 // //验证是否有对应的黑名单类型
// blackListType := blacklistTypeList[int(value.Int())] // blackListType := blacklistTypeList[int(value.Int())]
// blackListItem :=
// //
//} //}
} }
......
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