Commit c182125f by huangchengyi

1.0

parent 750ceea8
Showing with 15 additions and 4 deletions
......@@ -39,9 +39,21 @@ func (qs *ZiyingService) skuLockNum(c *redis.Conn,goodsId string) int64{
获取自营活动价
*/
func (qs *ZiyingService) ActivityPrice(ctx *gin.Context,SkuInfo string,c *redis.Conn) *orderedmap.OrderedMap {
goodsId := gjson.Get(SkuInfo,"goods_id").String()
//团购价
//assemble := ctx.Request.FormValue("power[assemble]")
//if php2go.InArray(assemble,[]string{"true","1",""}) {
// teamAc,_ := gredis.String((*c).Do("get","Self_activity_assemble_list"))
// if teamAc != "" && goodsId == gjson.Get(teamAc,"goods_id").String() {
// data := qs.HDActivityPrice(ctx,teamAc,SkuInfo,"7")
// if data != nil {
// return data
// }
// }
//}
//新客价处理
if ctx.Request.FormValue("power[newCustomer]") == "true" ||
ctx.Request.FormValue("power[newCustomer]") == "1" {
if ctx.Request.FormValue("power[newCustomer]") == "true" || ctx.Request.FormValue("power[newCustomer]") == "1" {
goodsActivityPrice,_ := gredis.String((*c).Do("get","Self_ActivityPrice_10000_NewCustomer"))
if goodsActivityPrice != "" {
data := qs.HDActivityPrice(ctx,goodsActivityPrice,SkuInfo,"5")
......@@ -49,10 +61,9 @@ func (qs *ZiyingService) ActivityPrice(ctx *gin.Context,SkuInfo string,c *redis.
return data
}
}
}
//团购限制
data := qs.HDGoodsLimit(gjson.Get(SkuInfo,"goods_id").String(),gjson.Get(SkuInfo,"stock").String(),c)
data := qs.HDGoodsLimit(goodsId,gjson.Get(SkuInfo,"stock").String(),c)
common.PrintDebugHtml(ctx,data)
if data != nil {
......
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