Order.php 356 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\user\model;
  3. use think\Model;
  4. /**
  5. * 用户管理
  6. */
  7. class Order extends Model
  8. {
  9. public function getOrder($condition)
  10. {
  11. $result = $this
  12. ->alias('a')
  13. ->join('product b', 'a.product_id = b.product_id')
  14. ->where($condition)
  15. ->paginate(10);
  16. return $result;
  17. }
  18. }