新增发送短信log记录
This commit is contained in:
parent
7c9e3e8094
commit
01e2152ec2
@ -202,6 +202,21 @@ class PatientFamilyController extends AbstractController
|
|||||||
return $this->response->json($data);
|
return $this->response->json($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取家庭成员用药记录列表
|
||||||
|
* @return ResponseInterface
|
||||||
|
* @throws ContainerExceptionInterface
|
||||||
|
* @throws NotFoundExceptionInterface
|
||||||
|
*/
|
||||||
|
public function getFamilyProductRecord(): ResponseInterface
|
||||||
|
{
|
||||||
|
$request = $this->container->get(PatientFamilyRequest::class);
|
||||||
|
$request->scene('getFamilyProductRecordList')->validateResolved();
|
||||||
|
|
||||||
|
$patientFamilyService = new PatientFamilyService();
|
||||||
|
$data = $patientFamilyService->getFamilyProductRecord();
|
||||||
|
return $this->response->json($data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测入参身份证号
|
* 检测入参身份证号
|
||||||
|
|||||||
@ -87,6 +87,9 @@ class PatientFamilyRequest extends FormRequest
|
|||||||
'diagnosis_hospital',//确诊医院
|
'diagnosis_hospital',//确诊医院
|
||||||
'drugs_name', // 家族病史
|
'drugs_name', // 家族病史
|
||||||
],
|
],
|
||||||
|
'getFamilyProductRecord' => [ // 获取家庭成员用药记录列表
|
||||||
|
'family_id',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -850,4 +850,24 @@ class PatientFamilyService extends BaseService
|
|||||||
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取家庭成员用药记录列表
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFamilyProductRecord(): array
|
||||||
|
{
|
||||||
|
$user_info = $this->request->getAttribute("userInfo");
|
||||||
|
|
||||||
|
$family_id = $this->request->input('family_id');
|
||||||
|
$page = $this->request->input('page', 1);
|
||||||
|
$per_page = $this->request->input('per_page', 10);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -292,6 +292,12 @@ Router::addGroup('/patient', function () {
|
|||||||
// 新增家庭成员-健康情况
|
// 新增家庭成员-健康情况
|
||||||
Router::post('', [PatientFamilyController::class, 'addFamilyHealth']);
|
Router::post('', [PatientFamilyController::class, 'addFamilyHealth']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 药品
|
||||||
|
Router::addGroup('/product', function () {
|
||||||
|
// 获取家庭成员用药记录列表
|
||||||
|
Router::get('/record', [PatientFamilyController::class, 'getFamilyProductRecordList']);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 病例
|
// 病例
|
||||||
@ -302,6 +308,7 @@ Router::addGroup('/patient', function () {
|
|||||||
|
|
||||||
// 药品
|
// 药品
|
||||||
Router::addGroup('/product', function () {
|
Router::addGroup('/product', function () {
|
||||||
|
// 购物车
|
||||||
Router::addGroup('/shopping', function () {
|
Router::addGroup('/shopping', function () {
|
||||||
// 获取购物车
|
// 获取购物车
|
||||||
Router::get('/cart', [UserPatientController::class, 'addShoppingCart']);
|
Router::get('/cart', [UserPatientController::class, 'addShoppingCart']);
|
||||||
@ -312,6 +319,8 @@ Router::addGroup('/patient', function () {
|
|||||||
// 修改购物车
|
// 修改购物车
|
||||||
Router::put('/cart', [UserPatientController::class, 'putShoppingCart']);
|
Router::put('/cart', [UserPatientController::class, 'putShoppingCart']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 订单
|
// 订单
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace Extend\Alibaba;
|
|||||||
use App\Constants\HttpEnumCode;
|
use App\Constants\HttpEnumCode;
|
||||||
use App\Exception\BusinessException;
|
use App\Exception\BusinessException;
|
||||||
use App\Model\LogSms;
|
use App\Model\LogSms;
|
||||||
|
use App\Utils\Log;
|
||||||
use Darabonba\OpenApi\OpenApiClient;
|
use Darabonba\OpenApi\OpenApiClient;
|
||||||
use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
|
use AlibabaCloud\OpenApiUtil\OpenApiUtilClient;
|
||||||
|
|
||||||
@ -100,14 +101,22 @@ class Dysms
|
|||||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::CODE_FAIL));
|
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::CODE_FAIL));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log::getInstance()->info("发送短信日志:" . json_encode($result['body'],JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
if ($result['body']['Code'] != "OK"){
|
if ($result['body']['Code'] != "OK"){
|
||||||
|
if (isset($result['body']['MessageIm'])){
|
||||||
throw new BusinessException($result['body']['MessageIm'],HttpEnumCode::CODE_FAIL);
|
throw new BusinessException($result['body']['MessageIm'],HttpEnumCode::CODE_FAIL);
|
||||||
}
|
}
|
||||||
|
throw new BusinessException("短信发送失败",HttpEnumCode::CODE_FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($result['body']['RequestId'])){
|
if (empty($result['body']['RequestId'])){
|
||||||
// 无唯一值
|
// 无唯一值
|
||||||
|
if (isset($result['body']['MessageIm'])){
|
||||||
throw new BusinessException($result['body']['MessageIm'],HttpEnumCode::CODE_FAIL);
|
throw new BusinessException($result['body']['MessageIm'],HttpEnumCode::CODE_FAIL);
|
||||||
}
|
}
|
||||||
|
throw new BusinessException("短信发送失败",HttpEnumCode::CODE_FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
// 记录log
|
// 记录log
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user