<?php

namespace app\service;

use app\model\Nszy;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;

class NszyService
{
    /**
     * @throws ModelNotFoundException
     * @throws DataNotFoundException
     * @throws DbException
     */
    static function selectNszyByQydm($qydm, $page=1, $limit=10):array{
        $res["row"]=(new \app\model\Nszy)->where("qydm",$qydm)->page($page,$limit)->select();
        $res["total"]= (new \app\model\Nszy)->where("qydm",$qydm)->count();
        return $res;
    }
}