NormalOrderGoodsPrice.php 595 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\frontend\modules\orderGoods\price\option;
  3. /**
  4. * Created by PhpStorm.
  5. * User: shenyang
  6. * Date: 2017/5/19
  7. * Time: 下午6:04
  8. */
  9. class NormalOrderGoodsPrice extends BaseOrderGoodsPrice
  10. {
  11. /**
  12. * 商品的原价,为了规格继承时将属性名替换掉
  13. * @return mixed
  14. */
  15. protected function aGoodsPrice()
  16. {
  17. return $this->goods()->dealPrice;
  18. }
  19. /**
  20. * 获取商品的模型,规格继承时复写这个方法
  21. * @return mixed
  22. */
  23. protected function goods()
  24. {
  25. return $this->orderGoods->goods;
  26. }
  27. }