Public
Authored by Lv xiang

PHP invoke dubbo demo

Edited
'dubbo' => [
            'class' => \ydl\components\DubboPhpClient::className(),
            'registryAddress' => '47.97.49.44:2181',
            'version' => '1.0.0',
            'group' =>null,
            'protocol' => 'jsonrpc'
        ],
<?php
/**
 * Created by PhpStorm.
 * User: zqk
 * Date: 2018/6/11
 * Time: 下午2:36
 */
namespace common\facade;


use DubboPhp\Client\DubboPhpException;
use Yii;

class DoctorFacade extends BaseFacade
{
    public function __construct()
    {
        $this->service = Yii::$app->dubbo->getService('com.ydl.user.intf.facade.DoctorFacade');
    }

    public function listDoctorsByUids(array $uids)
    {
        try{
            $ret =  $this->service->listDoctorsByUids($uids);
        } catch (DubboPhpException $e){
            $ret = $this->handleException($e);
        }
        return $ret;
    }

    public function getDoctorByUid($uid)
    {
        try{
            $ret =  $this->service->getDoctorByUid($uid);
        } catch (DubboPhpException $e){
            $ret = $this->handleException($e);
        }
        return $ret;
    }

    public function queryDoctorListByName($page, $pageSize, $filter = [])
    {
        try{
            $ret =  $this->service->queryDoctorListByName($filter, $page, $pageSize);
        } catch (DubboPhpException $e){
            $ret = $this->handleException($e);
        }
        return $ret;
    }
}
9 Bytes
  • POST /com.ydl.user.intf.facade.DoctorFacade/listDoctorCertificationHistoryPaging

  • private String idcardBackPhoto; private String idcardFrontPhoto; private String idcardPortraitPhoto; private String issuingAuthority; private String nation; private String validityPeriod; private Integer validityPeriodExpired; private String checkPointPhoto;

  • v3/doctor-certification/update-doctor-certification

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment