NszyService.php 588 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\service;
  3. use app\model\Nszy;
  4. use think\db\exception\DataNotFoundException;
  5. use think\db\exception\DbException;
  6. use think\db\exception\ModelNotFoundException;
  7. class NszyService
  8. {
  9. /**
  10. * @throws ModelNotFoundException
  11. * @throws DataNotFoundException
  12. * @throws DbException
  13. */
  14. static function selectNszyByQydm($qydm, $page=1, $limit=10):array{
  15. $res["row"]=(new \app\model\Nszy)->where("qydm",$qydm)->page($page,$limit)->select();
  16. $res["total"]= (new \app\model\Nszy)->where("qydm",$qydm)->count();
  17. return $res;
  18. }
  19. }