OrderAddressSimple.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\store\model;
  13. use app\common\model\BaseModel;
  14. /**
  15. * 订单收货地址模型
  16. * Class OrderAddress
  17. * @package app\store\model
  18. */
  19. class OrderAddressSimple extends BaseModel
  20. {
  21. protected $name = 'order_address';
  22. // 定义主键
  23. protected $pk = 'order_address_id';
  24. protected $updateTime = false;
  25. public function findByOrderId($orderId)
  26. {
  27. if (empty($orderId))return null;
  28. return $this->where('order_id', $orderId)->find()->toArray();
  29. }
  30. public function batchByOrderIds($orderIds)
  31. {
  32. if (empty($orderIds))return null;
  33. return $this->whereIn('order_id', $orderIds)->select()->toArray();
  34. }
  35. }