2
This commit is contained in:
parent
5d2dc5d2c0
commit
21320b3ea4
@ -678,26 +678,6 @@ class CallBackController extends AbstractController
|
|||||||
Log::getInstance()->error("Im回调数据处理失败:存储数据库失败");
|
Log::getInstance()->error("Im回调数据处理失败:存储数据库失败");
|
||||||
return $this->wxPayErrorReturn("存储数据库失败");
|
return $this->wxPayErrorReturn("存储数据库失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 存储redisList
|
|
||||||
if (!empty($order_inquiry) && !empty($request_params['CloudCustomData'])){
|
|
||||||
if (!empty($order_inquiry['doctor_id'])){
|
|
||||||
$data = array();
|
|
||||||
$data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
|
||||||
$data['to_user_id'] = $request_params['To_Account'];
|
|
||||||
$data['patient_name'] = $order_inquiry['patient_name'];
|
|
||||||
$data['patient_sex'] = $order_inquiry['patient_sex'];
|
|
||||||
$data['patient_age'] = $order_inquiry['patient_age'];
|
|
||||||
$data['inquiry_status'] = $order_inquiry['inquiry_status'];
|
|
||||||
$data['message_send_time'] = $request_params['RequestTime'];
|
|
||||||
$data['message_seq'] = $request_params['MsgSeq'];
|
|
||||||
$data['message_type'] = $request_params['MsgBody'][0]['MsgType'];
|
|
||||||
$data['last_message_content'] = $request_params['MsgBody'][0]['MsgContent'];
|
|
||||||
|
|
||||||
$imService = new ImService();
|
|
||||||
$imService->addRecentContactRecordCache($order_inquiry['doctor_id'],$order_inquiry['inquiry_type'],$order_inquiry['user_id'],$data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// 验证失败
|
// 验证失败
|
||||||
Log::getInstance()->error("Im回调数据处理失败:" . $e->getMessage());
|
Log::getInstance()->error("Im回调数据处理失败:" . $e->getMessage());
|
||||||
|
|||||||
@ -21,6 +21,7 @@ use Extend\TencentIm\Friend;
|
|||||||
use Extend\TencentIm\Group;
|
use Extend\TencentIm\Group;
|
||||||
use Extend\TencentIm\Message;
|
use Extend\TencentIm\Message;
|
||||||
use Extend\TencentIm\Profile;
|
use Extend\TencentIm\Profile;
|
||||||
|
use Extend\TencentIm\RecentContact;
|
||||||
use Extend\VerifyDun\BankCard;
|
use Extend\VerifyDun\BankCard;
|
||||||
use Extend\VerifyDun\IdCard;
|
use Extend\VerifyDun\IdCard;
|
||||||
use Extend\Wechat\Wechat;
|
use Extend\Wechat\Wechat;
|
||||||
@ -273,10 +274,10 @@ class UserController extends AbstractController
|
|||||||
dump($result);
|
dump($result);
|
||||||
|
|
||||||
|
|
||||||
// $ImService = new ImService();
|
$ImService = new ImService();
|
||||||
|
|
||||||
|
|
||||||
// 发送消息
|
// // 发送消息
|
||||||
// 自定义消息
|
// 自定义消息
|
||||||
// $cloud_custom_data = array();
|
// $cloud_custom_data = array();
|
||||||
// $cloud_custom_data['order_inquiry_id'] = "494837308861095936";
|
// $cloud_custom_data['order_inquiry_id'] = "494837308861095936";
|
||||||
@ -285,14 +286,16 @@ class UserController extends AbstractController
|
|||||||
//
|
//
|
||||||
// // 消息内容
|
// // 消息内容
|
||||||
// $message_content_data = array();
|
// $message_content_data = array();
|
||||||
// $message_content_data['message_type'] = 2;
|
// $message_content_data['message_type'] = 1;
|
||||||
// $message_content_data['content'] = "--问诊结束--";
|
// $message_content_data['content'] = "--测试--";
|
||||||
// $message_content_data['desc'] = "温馨提示:您可继续补充问诊内容,便于更快确认病情,医生均在临床一线工作,还请耐心等待,医生接诊会第一时间短信通知您。";
|
// $message_content_data['desc'] = "温馨提示:您可继续补充问诊内容,便于更快确认病情,医生均在临床一线工作,还请耐心等待,医生接诊会第一时间短信通知您。";
|
||||||
// $message_content = [
|
// $message_content = [
|
||||||
// 'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
// 'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||||
// ];
|
// ];
|
||||||
//
|
//
|
||||||
// $ImService->sendMessage("491925054435950592", "492404831991414785", $message_content, "TIMCustomElem", $cloud_custom_data);
|
// $ImService->sendMessage("491925054435950592", "492404831991414785", $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||||
|
//
|
||||||
|
// $RecentContact = new RecentContact();
|
||||||
|
// $result = $RecentContact->getRecentContactPage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
69
app/Model/DoctorPharmacistCert.php
Normal file
69
app/Model/DoctorPharmacistCert.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use Hyperf\Database\Model\Collection;
|
||||||
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property int $cert_id 主键id
|
||||||
|
* @property int $user_id 用户id
|
||||||
|
* @property string $cert_base64 签名值证书
|
||||||
|
* @property string $cert_chain_p7 证书链
|
||||||
|
* @property string $cert_serial_number 证书序列号
|
||||||
|
* @property string $ca_pin ca认证pin值
|
||||||
|
* @property \Carbon\Carbon $created_at 创建时间
|
||||||
|
* @property \Carbon\Carbon $updated_at 修改时间
|
||||||
|
*/
|
||||||
|
class DoctorPharmacistCert extends Model
|
||||||
|
{
|
||||||
|
use Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table associated with the model.
|
||||||
|
*/
|
||||||
|
protected ?string $table = 'doctor_pharmacist_cert';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected array $fillable = ['cert_id', 'user_id', 'cert_base64', 'cert_chain_p7', 'cert_serial_number', 'ca_pin', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected string $primaryKey = "cert_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取是否存在
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function getExists(array $params): bool
|
||||||
|
{
|
||||||
|
return self::where($params)->exists();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取信息-单条
|
||||||
|
* @param array $params
|
||||||
|
* @param array $fields
|
||||||
|
* @return object|null
|
||||||
|
*/
|
||||||
|
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||||
|
{
|
||||||
|
return self::where($params)->first($fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据-多
|
||||||
|
* @param array $params
|
||||||
|
* @param array $fields
|
||||||
|
* @return Collection|array
|
||||||
|
*/
|
||||||
|
public static function getList(array $params = [], array $fields = ['*']): Collection|array
|
||||||
|
{
|
||||||
|
return self::where($params)->get($fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -253,7 +253,7 @@ class ImService extends BaseService
|
|||||||
$arg['From_Account'] = $from_user_id; // 发送方user_id 如系统发送,无需填写
|
$arg['From_Account'] = $from_user_id; // 发送方user_id 如系统发送,无需填写
|
||||||
}
|
}
|
||||||
$arg['To_Account'] = $to_user_id; // 接收方user_id
|
$arg['To_Account'] = $to_user_id; // 接收方user_id
|
||||||
$arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback',];
|
$arg['ForbidCallbackControl'] = ['ForbidBeforeSendMsgCallback',"ForbidAfterSendMsgCallback"];
|
||||||
$arg['SendMsgControl'] = ['NoUnread'];
|
$arg['SendMsgControl'] = ['NoUnread'];
|
||||||
|
|
||||||
$arg['MsgBody'] = [
|
$arg['MsgBody'] = [
|
||||||
|
|||||||
@ -255,6 +255,10 @@ class UserDoctorService extends BaseService
|
|||||||
return fail(HttpEnumCode::HTTP_ERROR, "已绑定银行卡");
|
return fail(HttpEnumCode::HTTP_ERROR, "已绑定银行卡");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($user_doctor['iden_auth_status'] != 1) {
|
||||||
|
return fail(HttpEnumCode::HTTP_ERROR, "请先身份认证");
|
||||||
|
}
|
||||||
|
|
||||||
// 获取医生详情数据
|
// 获取医生详情数据
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['doctor_id'] = $user_doctor['doctor_id'];
|
$params['doctor_id'] = $user_doctor['doctor_id'];
|
||||||
|
|||||||
@ -6,6 +6,7 @@ use App\Constants\HttpEnumCode;
|
|||||||
use App\Model\Coupon;
|
use App\Model\Coupon;
|
||||||
use App\Model\OrderInquiry;
|
use App\Model\OrderInquiry;
|
||||||
use App\Model\PatientHistoryInquiry;
|
use App\Model\PatientHistoryInquiry;
|
||||||
|
use App\Model\User;
|
||||||
use App\Model\UserCoupon;
|
use App\Model\UserCoupon;
|
||||||
use App\Model\UserPatient;
|
use App\Model\UserPatient;
|
||||||
use App\Utils\Mask;
|
use App\Utils\Mask;
|
||||||
@ -80,7 +81,6 @@ class UserPatientService extends BaseService
|
|||||||
'patient_id',
|
'patient_id',
|
||||||
'user_id',
|
'user_id',
|
||||||
'user_name',
|
'user_name',
|
||||||
'mobile',
|
|
||||||
'avatar',
|
'avatar',
|
||||||
];
|
];
|
||||||
$params = array();
|
$params = array();
|
||||||
@ -90,8 +90,15 @@ class UserPatientService extends BaseService
|
|||||||
return fail(HttpEnumCode::HTTP_ERROR, "非法用户");
|
return fail(HttpEnumCode::HTTP_ERROR, "非法用户");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$params = array();
|
||||||
|
$params['user_id'] = $user_patient['user_id'];
|
||||||
|
$user = User::getOne($params);
|
||||||
|
if (empty($user)){
|
||||||
|
return fail(HttpEnumCode::HTTP_ERROR, "非法用户");
|
||||||
|
}
|
||||||
|
|
||||||
// 手机号
|
// 手机号
|
||||||
$user_patient['mobile'] = Mask::maskPhoneStr($user_patient['mobile']);
|
$user_patient['mobile'] = Mask::maskPhoneStr($user['mobile']);
|
||||||
|
|
||||||
// 头像
|
// 头像
|
||||||
$user_patient['avatar'] = addAliyunOssWebsite($user_patient['avatar']);
|
$user_patient['avatar'] = addAliyunOssWebsite($user_patient['avatar']);
|
||||||
|
|||||||
@ -26,14 +26,18 @@ class Ca
|
|||||||
$this->client = $this->container->get(Client::class);
|
$this->client = $this->container->get(Client::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取云证书
|
/**
|
||||||
public function getCloudCert(array $data){
|
* 获取云证书
|
||||||
|
* @param array $data
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getCloudCert(array $data): mixed
|
||||||
|
{
|
||||||
$option = [
|
$option = [
|
||||||
'form_params' => [
|
'form_params' => [
|
||||||
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
||||||
'entityType' => "Personal",// 用户类型,可选值[Personal/Organizational]
|
'entityType' => "Personal",// 用户类型,可选值[Personal/Organizational]
|
||||||
'pin' => $data['user_id'], // 证书PIN码
|
'pin' => $data['user_id'], // 证书PIN码
|
||||||
// 'pin' => "123", // 证书PIN码
|
|
||||||
'cardNumber' => $data['card_num'], // 证件号码(个人身份证;企业统一社会信用代码)
|
'cardNumber' => $data['card_num'], // 证件号码(个人身份证;企业统一社会信用代码)
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@ -50,6 +54,17 @@ class Ca
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取云证书签名
|
||||||
|
public function getCertSign(array $data){
|
||||||
|
$option = [
|
||||||
|
'form_params' => [
|
||||||
|
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
||||||
|
'entityType' => "Personal",// 用户类型,可选值[Personal/Organizational]
|
||||||
|
'pin' => $data['user_id'], // 证书PIN码
|
||||||
|
'cardNumber' => $data['card_num'], // 证件号码(个人身份证;企业统一社会信用代码)
|
||||||
|
]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取签名
|
* 获取签名
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace Extend\TencentIm;
|
|||||||
|
|
||||||
use App\Constants\HttpEnumCode;
|
use App\Constants\HttpEnumCode;
|
||||||
use App\Exception\BusinessException;
|
use App\Exception\BusinessException;
|
||||||
|
use App\Utils\Log;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
use Hyperf\Snowflake\IdGeneratorInterface;
|
use Hyperf\Snowflake\IdGeneratorInterface;
|
||||||
use Hyperf\Utils\ApplicationContext;
|
use Hyperf\Utils\ApplicationContext;
|
||||||
@ -88,7 +89,7 @@ class Message extends Base
|
|||||||
try {
|
try {
|
||||||
// 合并发送参数
|
// 合并发送参数
|
||||||
$arg = array_merge($this->arg,$arg);
|
$arg = array_merge($this->arg,$arg);
|
||||||
|
Log::getInstance()->info(json_encode($arg,JSON_UNESCAPED_UNICODE));
|
||||||
$options = [
|
$options = [
|
||||||
"json"=> $arg
|
"json"=> $arg
|
||||||
];
|
];
|
||||||
|
|||||||
@ -9,6 +9,18 @@ class RecentContact extends Base
|
|||||||
{
|
{
|
||||||
// 分页拉取会话列表
|
// 分页拉取会话列表
|
||||||
public function getRecentContactPage(){
|
public function getRecentContactPage(){
|
||||||
|
$options = [
|
||||||
|
"json"=> [
|
||||||
|
"Operator_Account"=>"491925054435950592",
|
||||||
|
"Peer_Account"=>"492404831991414785",
|
||||||
|
"MaxCnt"=>50,
|
||||||
|
"MinTime"=> 1678872105,
|
||||||
|
"MaxTime"=> time(),
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
$path = $this->config['base_url'] . "v4/openim/admin_getroammsg?" . $this->buildRequestParams();
|
||||||
|
$result = $this->postRequest($path,$options);
|
||||||
|
dump($result);die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user