BoxActionModel.php 616 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\index\model;
  3. use think\Model;
  4. class BoxActionModel extends Model {
  5. // 确定链接表名
  6. protected $name = 'box_action_record';
  7. /**
  8. * 根据搜索条件获取箱子列表信息
  9. * @param $offset
  10. * @param $limit
  11. */
  12. public function getBoxActionsByWhere($where , $offset , $limit)
  13. {
  14. return $this->where($where)->limit($offset, $limit)->order('box_number asc')->select();
  15. }
  16. /**
  17. * 根据搜索条件获取所有的箱子数量
  18. */
  19. public function getAllCounts($where)
  20. {
  21. return $this->where($where)->count();
  22. }
  23. }