Compare commits

...

107 Commits

Author SHA1 Message Date
ad9e345eb3 Merge branch 'dev'
Some checks failed
Build Docker / build (push) Has been cancelled
2025-02-20 16:47:12 +08:00
23d9c4dbfb 修正了支付页,优惠金额错误问题
Some checks are pending
Build Docker / build (push) Waiting to run
2025-02-18 13:18:27 +08:00
defa12d98f 修正了药品订单详情页,优惠金额错误问题 2025-02-18 13:15:15 +08:00
5ad82a4864 修正了优惠券金额不可用小数点的问题 2025-02-18 13:04:50 +08:00
920228fe48 修改药品订单中药品单价问题 2025-02-18 11:11:17 +08:00
3cd1d53f4a Merge branch 'dev' 2024-12-17 16:33:18 +08:00
2f92ef3dfc 修改了上报失败问题 2024-12-17 16:33:07 +08:00
2fa7762d54 Merge branch 'dev' 2024-12-16 17:31:35 +08:00
b961436de3 去除了ca打印,修改了上报处方订单的数组格式。 2024-12-10 11:49:52 +08:00
8443af52ee 上报药品订单时,增加了药品实际金额 2024-12-06 08:47:38 +08:00
714fec7f82 Merge branch 'dev' 2024-11-08 09:13:00 +08:00
6a936a8222 Merge branch 'dev' 2024-11-08 08:46:23 +08:00
d3c139a95e Merge branch 'dev' 2024-09-04 16:28:21 +08:00
69d2e730c9 Merge branch 'dev' 2024-07-31 17:08:09 +08:00
ab58fb9326 Merge branch 'dev' 2024-06-26 15:31:07 +08:00
c2fdcd6d8b Merge branch 'dev' 2024-06-26 15:20:27 +08:00
bdd1af5bb3 Merge branch 'dev' 2024-06-19 16:08:32 +08:00
fea5e0f3b8 Merge branch 'dev' 2024-05-31 14:12:11 +08:00
d1b796861f Merge branch 'dev' 2024-05-27 17:53:31 +08:00
276474cbfb Merge branch 'dev' 2024-05-20 16:23:38 +08:00
d7dd93ac6a Merge branch 'dev' 2024-05-20 16:22:47 +08:00
f05f8e911a 获取处方订单详情增加是否转换图片字段 2024-05-17 10:57:04 +08:00
2c21fbc6f1 Merge branch 'dev' 2024-05-11 14:54:35 +08:00
4e6ad0de73 Merge branch 'dev' 2024-05-09 18:50:46 +08:00
9caeca4563 Merge branch 'master' of ssh://101.201.233.43:10022/gdxz/hospital-applets-api 2024-05-09 18:46:20 +08:00
973b1bb63c Merge branch 'dev' 2024-05-09 18:21:46 +08:00
e723994064 1.3版本合并dev并解决冲突 2024-05-09 16:25:58 +08:00
2729e33506 1 2024-03-29 19:10:55 +08:00
7f4dc5a78c 修改认证 2024-03-29 19:10:47 +08:00
b9df31e447 更改log。修改model备注 2024-03-29 17:27:09 +08:00
1668c5382c 删除判断 2024-03-28 10:26:21 +08:00
8b4c7cc17a 修改状态 2024-03-27 18:13:34 +08:00
831e59842a 审核失败删除失败字段 2024-03-27 17:33:36 +08:00
0d173902e8 错误增加专长 2024-03-27 17:15:32 +08:00
af0f03f7e8 Merge branch 'dev' 2024-03-22 19:51:32 +08:00
e0e7338a38 Merge branch 'dev' 2024-03-22 19:04:04 +08:00
ab7f8ad295 修改下线时间问题 2024-03-18 13:05:11 +08:00
9b4bc2a51a 修改微信商品退款回调 2024-01-15 10:29:35 +08:00
4dda3ada59 修改优惠劵通知时间 2023-12-26 15:56:54 +08:00
aaf8ae7218 上报监管平台新增ca签名值数据 2023-12-26 15:51:23 +08:00
a12746fe3e Merge branch 'dev' 2023-12-21 09:48:01 +08:00
832b9e6996 合并dev分支,解决冲突 2023-12-19 13:53:14 +08:00
89ca8470d8 修改拉取商品 2023-12-08 16:39:39 +08:00
b4d96fd5f5 去除打印日志 2023-12-08 14:24:36 +08:00
80c5d22e2e 拉取商品增加日志 2023-12-08 13:10:16 +08:00
a583a9fdda 修改 更新处方平台商品 增加药店编码识别 2023-12-07 14:03:43 +08:00
1d16a1265b 修改推送消息医生xx时间后还未接诊内容 2023-11-28 15:41:51 +08:00
bb60464a57 修改推送消息医生xx时间后还未接诊 2023-11-28 15:33:03 +08:00
f57a1720d2 修改消息跳转 2023-11-28 15:27:03 +08:00
8cbbd848f3 1 2023-11-28 15:26:53 +08:00
3d38ed9da4 修改医生未接诊跳转问题 2023-11-28 13:58:34 +08:00
b63077b223 Merge branch 'dev' 2023-11-09 18:02:56 +08:00
01ccb8f2c8 Merge branch 'dev' 2023-11-09 17:33:44 +08:00
3b4e01002e Merge branch 'dev' 2023-11-09 17:31:46 +08:00
6de18e1eed Merge branch 'dev' 2023-11-09 17:06:47 +08:00
ff085a574f Merge branch 'dev' 2023-10-24 15:20:18 +08:00
2f34fd18ae 1 2023-10-24 15:06:30 +08:00
4f606c9c98 Merge branch 'dev' 2023-10-24 14:10:42 +08:00
516eee9738 Merge branch 'dev' 2023-10-18 11:41:56 +08:00
bc28579e3e Merge branch 'dev' 2023-10-18 09:58:54 +08:00
9a03cb3962 合并dev 2023-10-17 09:37:06 +08:00
592f9cb7b4 修改机构编码为zd10003 2023-09-08 10:32:08 +08:00
c16cc485cd 上报处方平台编号问题修改 2023-09-07 17:13:23 +08:00
17d908ec86 修改lock 2023-08-10 17:25:09 +08:00
98c9e0a00b 修改开具处方:增加回滚。删除无用log记录,修改处方图片位置 2023-08-10 17:05:53 +08:00
73eb50a478 修改提现返回错误 2023-08-10 15:23:00 +08:00
9f8dd7c17c 修改lock文件 2023-07-28 18:24:47 +08:00
ba8abec869 Merge branch 'dev' 2023-07-19 09:14:58 +08:00
b784512a0e Merge branch 'dev' 2023-07-19 09:08:01 +08:00
3f429387b2 Merge branch 'dev' 2023-07-19 08:55:18 +08:00
d531315fbb Merge branch 'dev' 2023-07-15 19:12:05 +08:00
1ae16fa641 Merge branch 'dev' 2023-07-10 14:38:58 +08:00
89bc9dec11 Merge branch 'dev' 2023-07-07 17:06:15 +08:00
b8f835c953 Merge branch 'dev' 2023-07-07 16:21:53 +08:00
a55568e177 Merge branch 'dev' 2023-06-26 17:27:43 +08:00
074948594a Merge branch 'dev' 2023-06-02 08:46:24 +08:00
05631a64c3 Merge branch 'dev' 2023-05-24 17:59:40 +08:00
29c3a2891d Merge branch 'dev' 2023-05-24 16:37:50 +08:00
fcb5bf7c52 Merge branch 'dev' 2023-05-23 17:10:31 +08:00
d249f314cd Merge branch 'dev' 2023-05-23 13:21:50 +08:00
1e1070fe1e Merge branch 'dev' 2023-05-22 13:51:47 +08:00
fea52fb0c9 Merge branch 'dev' 2023-05-22 10:16:08 +08:00
1956efb874 Merge branch 'dev' 2023-05-22 09:29:22 +08:00
4b3d5970a1 Merge branch 'dev' 2023-05-19 16:40:11 +08:00
4b791f4aa5 Merge branch 'dev' 2023-05-19 14:16:01 +08:00
2b1f04e88f Merge branch 'dev' 2023-05-19 13:13:33 +08:00
0e94079b56 Merge brant ch 'dev' 2023-05-19 11:40:31 +08:00
0947ac856d Merge branch 'dev' 2023-05-19 11:32:33 +08:00
f82a70f2e8 Merge branch 'dev' 2023-05-19 10:22:10 +08:00
44e4e48ded dad ad ad Merge branch 'dev' 2023-05-19 08:49:15 +08:00
21a53b23c9 Merge branch 'dev' 2023-05-18 16:22:26 +08:00
9131bddc51 Merge branch 'dev' 2023-05-18 16:08:34 +08:00
7c02d9d82c Merge branch 'dev' 2023-05-18 16:05:17 +08:00
a631c70af9 Merge branch 'dev' 2023-05-18 15:58:47 +08:00
496cf1b407 Merge branch 'dev' 2023-05-18 15:32:57 +08:00
3bac586a0f Merge branch 'dev' 2023-05-17 14:49:41 +08:00
0c9755d654 Merge branch 'dev' 2023-05-17 14:36:12 +08:00
65ec7fba85 Merge branch 'dev' 2023-05-17 14:29:25 +08:00
d56f3b5a68 Merge branch 'dev' 2023-05-16 17:10:15 +08:00
e18fd8df22 修改医生账户 2023-05-16 14:53:40 +08:00
8cf5b29953 Merge branch 'dev' 2023-05-16 14:49:24 +08:00
1eaa0344c0 Merge branch 'dev' 2023-05-16 13:14:17 +08:00
46c923d74b Merge branch 'dev' 2023-05-16 11:55:37 +08:00
22e09e2cc8 Merge branch 'dev' 2023-05-16 11:28:53 +08:00
9c7c371f1a Merge branch 'dev' 2023-05-16 10:30:33 +08:00
b21a51af0c Merge branch 'dev' 2023-05-16 10:02:35 +08:00
1dfcc5660f 修改im字段类型 2023-05-16 09:39:27 +08:00
10 changed files with 669 additions and 2487 deletions

View File

@ -327,7 +327,7 @@ class TestController extends AbstractController
// }
// dump(111);
// // 测试药师
// 测试药师
// $data = array();
// $data['user_id'] = "534534546";
// $data['mobile'] = "18812345678";
@ -351,25 +351,27 @@ class TestController extends AbstractController
// }
// 测试医院
$data = array();
$data['user_id'] = "5345345461";
$data['mobile'] = "18221234167";
$data['org_name'] = "成都金牛欣欣相照互联网医院有限公司";
$data['org_number'] = "91510106MABTJY4K9R";
$result = $CaOnline->getCloudCert($data,'Organizational');
$data = array();
$data['is_system'] = 1;
$data['type'] = 2;
$data['cert_base64'] = $result['certBase64'];
$data['cert_chain_p7'] = $result['certP7'];
$data['cert_serial_number'] = $result['certSerialnumber'];
$data['ca_pin'] = "5345345461";
$doctor_pharmacist_cert = UserCaCert::addUserCaCert($data);
if (empty($doctor_pharmacist_cert)){
return fail();
}
// $data = array();
// $data['user_id'] = "5345345461";
// $data['mobile'] = "18221234167";
// $data['card_name'] = "吴从兴";
// $data['card_num'] = "372929199610075412";
// $data['org_name'] = "成都金牛欣欣相照互联网医院有限公司";
// $data['org_number'] = "91510106MABTJY4K9R";
//
// $result = $CaOnline->getCloudCert($data,'Organizational');
//
// $data = array();
// $data['is_system'] = 1;
// $data['type'] = 2;
// $data['cert_base64'] = $result['certBase64'];
// $data['cert_chain_p7'] = $result['certP7'];
// $data['cert_serial_number'] = $result['certSerialnumber'];
// $data['ca_pin'] = "5345345461";
// $doctor_pharmacist_cert = UserCaCert::addUserCaCert($data);
// if (empty($doctor_pharmacist_cert)){
// return fail();
// }
return 111;
}

View File

@ -11,7 +11,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
/**
* @property int $message_id 主键id
* @property int $from_user_id 发送方user_id
* @property string $from_user_id 发送方user_id
* @property int $to_user_id 接收方user_id
* @property string $message_key 消息唯一标识(系统返回,撤回消息使用)
* @property string $message_send_time 消息发送时间戳

View File

@ -50,7 +50,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property int $patient_age 患者年龄-就诊人
* @property Carbon $created_at 创建时间
* @property Carbon $updated_at 修改时间
* @property-read UserDoctor|null $UserDoctor
* @property-read UserDoctor|null $UserDoctor
* @property-read OrderInquiryCase|null $OrderInquiryCase
*/
class OrderInquiry extends Model

View File

@ -6,6 +6,8 @@ namespace App\Model;
use Carbon\Carbon;
use Hyperf\Database\Model\Relations\HasOne;
use Hyperf\Snowflake\Concern\Snowflake;
/**
@ -14,8 +16,8 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property int $user_coupon_id 用户优惠卷表id
* @property string $coupon_name 优惠卷名称
* @property string $coupon_use_price 优惠卷使用金额
* @property \Carbon\Carbon $created_at 创建时间
* @property \Carbon\Carbon $updated_at 修改时间
* @property Carbon $created_at 创建时间
* @property Carbon $updated_at 修改时间
*/
class OrderProductCoupon extends Model
{
@ -33,6 +35,14 @@ class OrderProductCoupon extends Model
protected string $primaryKey = "order_coupon_id";
/**
* 关联优惠券表
*/
public function UserCoupon(): HasOne
{
return $this->hasOne(Coupon::class, 'user_coupon_id', 'user_coupon_id');
}
/**
* 获取信息-单条
* @param array $params

View File

@ -41,7 +41,7 @@ class UserCoupon extends Model
protected string $primaryKey = "user_coupon_id";
/**
* 关联医院
* 关联优惠券
*/
public function Coupon(): HasOne
{

View File

@ -4,9 +4,11 @@ namespace App\Services;
use App\Constants\HttpEnumCode;
use App\Exception\BusinessException;
use App\Model\Coupon;
use App\Model\OrderInquiry;
use App\Model\OrderPrescriptionFile;
use App\Model\OrderProduct;
use App\Model\OrderProductCoupon;
use App\Model\PatientFamily;
use App\Model\Product;
use App\Model\UserCaCert;
@ -17,6 +19,7 @@ use App\Model\OrderPrescriptionIcd;
use App\Model\OrderPrescriptionProduct;
use App\Model\OrderProductItem;
use App\Model\User;
use App\Model\UserCoupon;
use App\Model\UserDoctor;
use App\Model\UserDoctorInfo;
use App\Model\UserPharmacist;
@ -28,11 +31,12 @@ use Extend\Ca\CaOffline;
use Extend\Ca\CaOnline;
use Extend\Prescription\Prescription;
use Hyperf\Contract\LengthAwarePaginatorInterface;
use Hyperf\Utils\WaitGroup;
use \Hyperf\Coroutine\WaitGroup;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Swoole\Coroutine\Channel;
use TCPDF;
use Hyperf\Coroutine;
class OrderPrescriptionService extends BaseService
{
@ -214,7 +218,7 @@ class OrderPrescriptionService extends BaseService
}
$wg = new WaitGroup();
$wg->add(8);
$wg->add(9);
$user = []; // 就诊患者用户数据
$patient_family = []; // 家庭成员-基本信息
@ -224,15 +228,17 @@ class OrderPrescriptionService extends BaseService
$user_pharmacist = []; // 药师数据
$user_pharmacist_info = []; // 药师详数据
$order_inquiry_case = []; // 病例数据
$product_coupons = []; // 药品优惠券数据
$user_id = $order_inquiry['user_id'];
$doctor_id = $order_prescription['doctor_id'];
$family_id = $order_inquiry['family_id'];
$pharmacist_id = $order_prescription['pharmacist_id'];
$order_inquiry_id = $order_inquiry['order_inquiry_id'];
$order_product_id = $order_product['order_product_id'];
// 获取就诊患者用户数据
co(function () use ($wg, &$user, $user_id) {
Coroutine\co(function () use ($wg, &$user, $user_id) {
$params = array();
$params['user_id'] = $user_id;
$user = User::getOne($params)->toArray();
@ -241,7 +247,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取家庭成员-基本信息
co(function () use ($wg, &$patient_family, $family_id) {
Coroutine\co(function () use ($wg, &$patient_family, $family_id) {
$params = array();
$params['family_id'] = $family_id;
$patient_family = PatientFamily::getOne($params);
@ -252,7 +258,7 @@ class OrderPrescriptionService extends BaseService
// 获取处方关联疾病数据
$order_prescription_id = $order_prescription['order_prescription_id'];
co(function () use ($wg, &$order_prescription_icd, $order_prescription_id) {
Coroutine\co(function () use ($wg, &$order_prescription_icd, $order_prescription_id) {
$params = array();
$params['order_prescription_id'] = $order_prescription_id;
$order_prescription_icd = OrderPrescriptionIcd::getList($params);
@ -262,7 +268,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取医生数据
co(function () use ($wg, &$user_doctor, $doctor_id) {
Coroutine\co(function () use ($wg, &$user_doctor, $doctor_id) {
$params = array();
$params['doctor_id'] = $doctor_id;
$user_doctor = UserDoctor::getOne($params);
@ -272,7 +278,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取医生详情数据
co(function () use ($wg, &$user_doctor_info, $doctor_id) {
Coroutine\co(function () use ($wg, &$user_doctor_info, $doctor_id) {
$params = array();
$params['doctor_id'] = $doctor_id;
$user_doctor_info = UserDoctorInfo::getOne($params);
@ -282,7 +288,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取药师数据
co(function () use ($wg, &$user_pharmacist, $pharmacist_id) {
Coroutine\co(function () use ($wg, &$user_pharmacist, $pharmacist_id) {
$params = array();
$params['pharmacist_id'] = $pharmacist_id;
$user_pharmacist = UserPharmacist::getOne($params);
@ -292,7 +298,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取药师详情数据
co(function () use ($wg, &$user_pharmacist_info, $pharmacist_id) {
Coroutine\co(function () use ($wg, &$user_pharmacist_info, $pharmacist_id) {
$params = array();
$params['pharmacist_id'] = $pharmacist_id;
$user_pharmacist_info = UserPharmacistInfo::getOne($params);
@ -302,7 +308,7 @@ class OrderPrescriptionService extends BaseService
});
// 获取病例数据
co(function () use ($wg, &$order_inquiry_case, $order_inquiry_id) {
Coroutine\co(function () use ($wg, &$order_inquiry_case, $order_inquiry_id) {
$params = array();
$params['order_inquiry_id'] = $order_inquiry_id;
$params['status'] = 1;
@ -312,6 +318,29 @@ class OrderPrescriptionService extends BaseService
$wg->done();
});
// 获取药品订单优惠券数据
Coroutine\co(function () use ($wg, &$product_coupons, $order_product_id) {
$params = array();
$params['order_product_id'] = $order_product_id;
$order_product_coupons = OrderProductCoupon::getList($params);
foreach ($order_product_coupons as $order_product_coupon){
$params = array();
$params['user_coupon_id'] = $order_product_coupon['user_coupon_id'];
$user_coupon = UserCoupon::getOne($params);
if (!empty($user_coupon)){
$params = array();
$params['coupon_id'] = $user_coupon['coupon_id'];
$coupon = Coupon::getOne($params);
if (!empty($coupon)){
$product_coupons[] = $coupon->toArray();
}
}
}
// 计数器减一
$wg->done();
});
$wg->wait();
if (empty($user)) {
@ -438,8 +467,12 @@ class OrderPrescriptionService extends BaseService
$arg['presList'][0]['orderDrugList'][$key]['price'] = $product['product_price']; // 药品单价
$arg['presList'][0]['orderDrugList'][$key]['drugCount'] = $item['amount']; // 药品数量
$arg['presList'][0]['orderDrugList'][$key]['packingUnit'] = $product['packaging_unit']; // 药品单位
$arg['presList'][0]['orderDrugList'][$key]['actualSellingPrice'] = $item['actual_product_price']; // 药品实际销售单价
}
// 处理上报处方平台药品优惠券相关数据
$arg['promotion'] = $this->handleReportPrescriptionProductCouponData($product_coupons,$order_product_item,$order_product['order_product_no']);
$Prescription = new Prescription();
$result = $Prescription->reportPrescription($arg);
if ($result['resultCode'] != "1000"){
@ -489,4 +522,50 @@ class OrderPrescriptionService extends BaseService
throw new BusinessException($e->getMessage());
}
}
/**
* 处理上报处方平台药品优惠券相关数据
* @param array $product_coupons 药品订单优惠券为coupon数据
* @param array|object $order_product_item 药品订单明细
* @param string $orderNo 药品订单编号
* @return array
*/
public function handleReportPrescriptionProductCouponData(array $product_coupons,array|object $order_product_item,string $orderNo): array
{
$promotion = array();
if (empty($product_coupons)){
return $promotion;
}
foreach ($product_coupons as $product_coupon){
// 适用范围1:全场通用 2:问诊 3:按品牌适用 4:按类别适用 5:单品使用 6:全品类药品)
if ($product_coupon["application_scope"] == 1 || $product_coupon["application_scope"] == 6){
$result = array();
$result["type"] = "orderCoupons";
$result["objectId"] = $orderNo;
$result["amount"] = $product_coupon["coupon_price"]; // 优惠金额
$result["count"] = 1;
$promotion[] = $result;
}
if ($product_coupon["application_scope"] == 5){
$product_ids = explode(',',$product_coupon['product_id']);
foreach ($order_product_item as $value){
if (in_array($value['product_id'],$product_ids)){
$result = array();
$result["type"] = "productCoupons";
$result["objectId"] = $value['product_platform_code'];
$result["amount"] = bcsub($value["product_price"],$value["actual_product_price"],2); // 优惠金额
$result["count"] = 1;
$promotion[] = $result;
}
}
}
}
return $promotion;
}
}

View File

@ -647,7 +647,19 @@ class PatientOrderService extends BaseService
}
// 处理优惠金额
$order_product['discount_amount'] = $order_product['amount_total'] + $order_product['logistics_fee'] - $order_product['coupon_amount_total'] - $order_product['payment_amount_total']; // 优惠金额
$order_product['discount_amount'] = bcsub(
bcsub(
bcadd(
$order_product['amount_total'],
$order_product['logistics_fee']
,2
),
$order_product['coupon_amount_total'],
2
),
$order_product['payment_amount_total'],
2
); // 优惠金额
$result = array();
@ -922,7 +934,20 @@ class PatientOrderService extends BaseService
$result['amount_total'] = $order_product['amount_total']; // 订单金额
$result['payment_amount_total'] = $order_product['payment_amount_total']; // 实际订单金额
$result['coupon_amount_total'] = $order_product['coupon_amount_total']; // 优惠金额
$result['discount_amount'] = $order_product['amount_total'] - $order_product['coupon_amount_total'] + $order_product['logistics_fee'] - $order_product['payment_amount_total']; // 优惠金额
$result['discount_amount'] =
bcsub(
bcadd(
bcsub(
$order_product['amount_total'],
$order_product['coupon_amount_total'],
2
),
$order_product['logistics_fee'],
2
),
$order_product['payment_amount_total'],
2
); // 优惠金额
// 获取优惠卷不可用原因。存在优惠卷,但是未使用-暂时废弃
/*if ($order_product['coupon_amount_total'] == 0){
@ -3500,6 +3525,14 @@ class PatientOrderService extends BaseService
}
}
foreach ($product_datas as &$product_data){
$product_data["actual_product_price"] = bcdiv(
$product_data['actual_product_price'],
$product_data['actual_quantity'],
2
);
}
return $product_datas;
}
}

View File

@ -84,11 +84,11 @@ class UserCouponService extends BaseService
/**
* 获取可用优惠卷总金额
* @param array $coupons 优惠卷数据
* @return int
* @return string
*/
public function getCouponTotalPrice(array $coupons): int
public function getCouponTotalPrice(array $coupons): string
{
$coupon_total_price = 0;
$coupon_total_price = "0";
foreach ($coupons as $coupon){
$coupon_total_price = bcadd($coupon_total_price,$coupon['coupon_price'],2);

2951
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -366,7 +366,6 @@ abstract class Ca
throw new BusinessException($response->getBody()->getContents());
}
$body = json_decode($response->getBody(), true);
dump($body);
if (empty($body)) {
// 返回值为空
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));