1
This commit is contained in:
parent
330421fd00
commit
d8ba69f9b6
@ -202,6 +202,7 @@ class AssignDoctorConsumer extends ConsumerMessage
|
||||
$arg = array();
|
||||
$arg['From_Account'] = $user_doctor['user_id']; // 发送方user_id 如系统发送,无需填写
|
||||
$arg['To_Account'] = $order_inquiry['user_id']; // 接收方user_id
|
||||
$arg['SendMsgControl'] = ['NoUnread'];
|
||||
|
||||
$arg['MsgBody'] = [
|
||||
[
|
||||
@ -215,8 +216,7 @@ class AssignDoctorConsumer extends ConsumerMessage
|
||||
// 自定义消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$cloud_custom_data['message_type'] = 1;//消息类型(1:系统发送 其余:用户发送)
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
|
||||
$arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
|
||||
|
||||
@ -157,6 +157,7 @@ class CallBackController extends AbstractController
|
||||
$arg = array();
|
||||
$arg['From_Account'] = $user_doctor['user_id']; // 发送方user_id 如系统发送,无需填写
|
||||
$arg['To_Account'] = $order_inquiry['user_id']; // 接收方user_id
|
||||
$arg['SendMsgControl'] = ['NoUnread'];
|
||||
|
||||
$arg['MsgBody'] = [
|
||||
[
|
||||
@ -170,8 +171,7 @@ class CallBackController extends AbstractController
|
||||
// 自定义消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$cloud_custom_data['message_type'] = 1;//1:系统发送 其余:用户发送
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
|
||||
$arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
|
||||
@ -383,7 +383,6 @@ class CallBackController extends AbstractController
|
||||
|
||||
$imService = new ImService();
|
||||
$imService->addRecentContactRecordCache($order_inquiry['doctor_id'],$order_inquiry['inquiry_type'],$order_inquiry['user_id'],$data);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@ -82,21 +82,21 @@ class UserController extends AbstractController
|
||||
// 支付测试
|
||||
public function testpay(){
|
||||
// 发起支付
|
||||
// $out_trade_no = $this->request->input('out_trade_no');
|
||||
$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, "订单创建失败");
|
||||
// }
|
||||
//
|
||||
// // 获取小程序支付配置
|
||||
// $pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
// return $this->response->json($pay_config);
|
||||
// 获取预支付交易会话标识
|
||||
$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);
|
||||
|
||||
// 发起退款
|
||||
// $WechatPay = new WechatPay(1);
|
||||
@ -148,32 +148,32 @@ class UserController extends AbstractController
|
||||
// $result = $friend->addFriend("123456",'1234567',"快速问诊");
|
||||
|
||||
// 发送消息
|
||||
$arg = array();
|
||||
$arg['From_Account'] = "10002"; // 发送方user_id 如系统发送,无需填写
|
||||
$arg['To_Account'] = "123456"; // 接收方user_id
|
||||
$arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback'];
|
||||
|
||||
$arg['MsgBody'] = [
|
||||
[
|
||||
"MsgType" => "TIMTextElem",
|
||||
"MsgContent" => [
|
||||
"Text" => "测试消息33",
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
// 自定义消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = 491963820554948608;
|
||||
$cloud_custom_data['is_system'] = 0;
|
||||
|
||||
$arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$result = $message->sendMessage($arg);
|
||||
// $arg = array();
|
||||
// $arg['From_Account'] = "10002"; // 发送方user_id 如系统发送,无需填写
|
||||
// $arg['To_Account'] = "123456"; // 接收方user_id
|
||||
// $arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback'];
|
||||
//
|
||||
// $arg['MsgBody'] = [
|
||||
// [
|
||||
// "MsgType" => "TIMTextElem",
|
||||
// "MsgContent" => [
|
||||
// "Text" => "测试消息33",
|
||||
// ],
|
||||
// ]
|
||||
// ];
|
||||
//
|
||||
// // 自定义消息
|
||||
// $cloud_custom_data = array();
|
||||
// $cloud_custom_data['order_inquiry_id'] = 491963820554948608;
|
||||
// $cloud_custom_data['is_system'] = 0;
|
||||
//
|
||||
// $arg['CloudCustomData'] = json_encode($cloud_custom_data,JSON_UNESCAPED_UNICODE);
|
||||
//
|
||||
// $result = $message->sendMessage($arg);
|
||||
|
||||
// $result = $profile->getOneAccountPortraitList("123456");
|
||||
|
||||
dump($result);
|
||||
// dump($result);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -310,14 +310,15 @@ class UserDoctorController extends AbstractController
|
||||
*/
|
||||
public function getDoctorMessageList(): ResponseInterface
|
||||
{
|
||||
// $data['order_inquiry_id'] = 3;
|
||||
// $data['order_inquiry_id'] = 1;
|
||||
// $data['patient_name'] = "测试用户3";
|
||||
// $data['patient_sex'] = 1;
|
||||
// $data['patient_age'] = 19;
|
||||
// $data['inquiry_status'] = 1;
|
||||
// $data['message_send_time'] = 10000;
|
||||
// $data['message_seq'] = 101;
|
||||
// $data['last_message_content'] = "";
|
||||
// $data['message_type'] = "TIMTextElem";
|
||||
// $data['last_message_content']['Text'] = "测试消息3";
|
||||
//
|
||||
// $imService = new ImService();
|
||||
// $imService->addRecentContactRecordCache("491925054779883520",2,"3",$data);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user