1
This commit is contained in:
parent
16a0225cc6
commit
f9cae938dd
@ -7,10 +7,13 @@ use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\DoctorInquiryTime;
|
||||
use App\Model\OrderInquiry;
|
||||
use App\Model\UserDoctor;
|
||||
use App\Request\UserRequest;
|
||||
use App\Services\ImService;
|
||||
use App\Services\UserDoctorService;
|
||||
use App\Services\UserService;
|
||||
use App\Utils\Http;
|
||||
use App\Utils\Log;
|
||||
use Extend\TencentIm\Account;
|
||||
use Extend\TencentIm\Friend;
|
||||
use Extend\TencentIm\Group;
|
||||
@ -85,18 +88,18 @@ class UserController extends AbstractController
|
||||
$out_trade_no = $this->request->input('out_trade_no');
|
||||
// $generator = $this->container->get(IdGeneratorInterface::class);
|
||||
//
|
||||
$WechatPay = new WechatPay(1);
|
||||
// $WechatPay = new WechatPay(1);
|
||||
////
|
||||
// // 获取预支付交易会话标识
|
||||
// $total = 0.01 * 100;
|
||||
// $prepay = $WechatPay->getJsapiPrepayId($out_trade_no,$total,"omgU35DlE-rxTAGgcBjOuc4xdcX8");
|
||||
// if (empty($prepay)){
|
||||
// return fail(HttpEnumCode::SERVER_ERROR, "订单创建失败");
|
||||
// }
|
||||
//
|
||||
// 获取预支付交易会话标识
|
||||
$total = 0.01 * 100;
|
||||
$prepay = $WechatPay->getJsapiPrepayId($out_trade_no,$total,"omgU35DlE-rxTAGgcBjOuc4xdcX8");
|
||||
if (empty($prepay)){
|
||||
return fail(HttpEnumCode::SERVER_ERROR, "订单创建失败");
|
||||
}
|
||||
|
||||
// 获取小程序支付配置
|
||||
$pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
return $this->response->json($pay_config);
|
||||
// // 获取小程序支付配置
|
||||
// $pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
// return $this->response->json($pay_config);
|
||||
|
||||
// 发起退款
|
||||
// $WechatPay = new WechatPay(1);
|
||||
@ -176,5 +179,20 @@ class UserController extends AbstractController
|
||||
// dump($result);
|
||||
|
||||
|
||||
// 专家-公益,发送im消息
|
||||
$ImService = new ImService();
|
||||
|
||||
// 获取订单医生数据
|
||||
$params = array();
|
||||
$params['doctor_id'] = "491925054779883520";
|
||||
$user_doctor = UserDoctor::getOne($params);
|
||||
if (empty($user_doctor)){
|
||||
Log::getInstance()->info("医生数据错误");
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
$ImService->sendTextMessage($user_doctor['user_id'],"491923510680424449","等待医生接诊",491937904055369728);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -102,7 +102,7 @@ class ImService extends BaseService
|
||||
|
||||
// 医院
|
||||
if (in_array('Tag_Profile_Custom_Hname',$result)){
|
||||
$arg['Tag_Profile_Custom_Hname'] = $hospital['hospital'];
|
||||
$arg['Tag_Profile_Custom_Hname'] = $hospital['hospital_name'];
|
||||
}
|
||||
|
||||
// 职称
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user