|
|
@@ -123,8 +123,11 @@ func (self *ProductController) GetPdDetail() {
|
|
|
_color_id := self.Ctx.Input.Param(":color_id")
|
|
|
colorId, _ := strconv.ParseInt(_color_id, 10, 64)
|
|
|
cache, _ := self.GetBool("cache", false)
|
|
|
-
|
|
|
- pd := product_model.GetProductByIdAndSizeAndColor(pId, sizeId, colorId, cache)
|
|
|
+ beginPd := product_model.GetProductById(pId, true)
|
|
|
+ if beginPd == nil {
|
|
|
+ self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
+ }
|
|
|
+ pd := product_model.GetProductByIdAndSizeAndColor(beginPd.RelateProductId, sizeId, colorId, cache)
|
|
|
if pd == nil {
|
|
|
self.ReturnError(403, apps.NoExist, "", nil)
|
|
|
}
|