Product.php 413 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. class Product extends Model
  5. {
  6. public function getSonList($condition)
  7. {
  8. $result = $this
  9. ->where($condition)
  10. ->paginate(10);
  11. return $result;
  12. }
  13. public function getFartherList()
  14. {
  15. $result = $this
  16. ->where(['product_pid' => 0])
  17. ->select();
  18. return $result;
  19. }
  20. }