OrderGoods.php 783 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\api\model;
  10. use app\common\model\OrderGoods as OrderGoodsModel;
  11. /**
  12. * 订单商品模型
  13. * Class OrderGoods
  14. * @package app\api\model
  15. */
  16. class OrderGoods extends OrderGoodsModel
  17. {
  18. /**
  19. * 隐藏字段
  20. * @var array
  21. */
  22. protected $hidden = [
  23. 'content',
  24. 'wxapp_id',
  25. 'create_time',
  26. ];
  27. /**
  28. * 获取未评价的商品
  29. * @param $order_id
  30. * @return OrderGoods[]|false
  31. * @throws \think\exception\DbException
  32. */
  33. public static function getNotCommentGoodsList($order_id)
  34. {
  35. return self::all(['order_id' => $order_id, 'is_comment' => 0], ['orderM', 'image']);
  36. }
  37. }