// +---------------------------------------------------------------------- namespace app\common\repositories\user; use app\common\repositories\BaseRepository; use app\common\dao\user\UserPartnerDao as dao; /** * Class UserAddressRepository * @package app\common\repositories\user * @day 2020/6/3 * @mixin dao */ class UserPartnerRepository extends BaseRepository { /** * @var dao */ protected $dao; /** * UserAddressRepository constructor. * @param dao $dao */ public function __construct(dao $dao) { $this->dao = $dao; } /** * @param int $id * @param int $uid * @return bool * @author Qinii */ public function fieldExists(int $id, int $uid) { return $this->dao->userFieldExists($this->dao->getPk(), $id, $uid); } /** * @param $uid * @param $page * @param $limit * @return array * @author Qinii */ public function getList($uid) { $list = $this->dao->getAll($uid)->order('id desc')->select(); return compact('list'); } }