修正支付金额为0的情况
This commit is contained in:
parent
29965b14af
commit
fe369784f8
@ -145,7 +145,7 @@ class OrderPrescriptionService extends BaseService
|
||||
$user_entity_id = "491925054435950592";
|
||||
} else{
|
||||
$user_pharmacist_info = UserPharmacistInfo::getOne($params);
|
||||
if (!empty($user_pharmacist_info)){
|
||||
if (empty($user_pharmacist_info)){
|
||||
throw new BusinessException("用户数据错误");
|
||||
}
|
||||
|
||||
|
||||
@ -659,6 +659,7 @@ class PatientOrderService extends BaseService
|
||||
$result['payment_amount_total'] = $order_inquiry['payment_amount_total']; // 实际订单金额
|
||||
$result['coupon_amount_total'] = $order_inquiry['coupon_amount_total'];; // 优惠金额
|
||||
|
||||
if ($order_inquiry['payment_amount_total'] > 0){
|
||||
// 发起支付
|
||||
$WechatPay = new WechatPay(1,1);
|
||||
|
||||
@ -669,7 +670,11 @@ class PatientOrderService extends BaseService
|
||||
}
|
||||
|
||||
// 获取小程序支付配置
|
||||
$result['pay_config'] = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
$pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} elseif ($order_type == 2) {
|
||||
// 药品订单
|
||||
$params = array();
|
||||
@ -704,6 +709,7 @@ class PatientOrderService extends BaseService
|
||||
$result['payment_amount_total'] = $order_product['payment_amount_total']; // 实际订单金额
|
||||
$result['coupon_amount_total'] = 0; // 优惠金额
|
||||
|
||||
if ($order_product['payment_amount_total'] > 0 ){
|
||||
// 发起支付
|
||||
$WechatPay = new WechatPay(1,2);
|
||||
|
||||
@ -714,11 +720,15 @@ class PatientOrderService extends BaseService
|
||||
}
|
||||
|
||||
// 获取小程序支付配置
|
||||
$result['pay_config'] = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
$pay_config = $WechatPay->getAppletsPayConfig($prepay['prepay_id']);
|
||||
}
|
||||
|
||||
} else {
|
||||
return fail();
|
||||
}
|
||||
|
||||
$result['pay_config'] = $pay_config ?? [];
|
||||
|
||||
return success($result);
|
||||
}
|
||||
|
||||
|
||||
@ -1078,6 +1078,7 @@ class UserDoctorService extends BaseService
|
||||
OrderPrescriptionProduct::deleteOrderPrescriptionProduct($params);
|
||||
|
||||
// 处方商品数据
|
||||
$product_name = "";
|
||||
foreach ($prescription_product as $item) {
|
||||
// 获取商品数据
|
||||
$params = array();
|
||||
@ -1121,6 +1122,7 @@ class UserDoctorService extends BaseService
|
||||
return fail();
|
||||
}
|
||||
|
||||
$product_name = $product_name . ";" . $product['product_name'];
|
||||
unset($product);
|
||||
}
|
||||
|
||||
@ -1160,7 +1162,7 @@ class UserDoctorService extends BaseService
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = (string)$order_prescription['order_prescription_id'];
|
||||
$message_content_data['data']['product_name'] = $product_name ?? "药品";
|
||||
$message_content_data['data']['product_name'] = $product_name ?: "药品";
|
||||
$message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s',time());;
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
@ -1300,6 +1302,7 @@ class UserDoctorService extends BaseService
|
||||
}
|
||||
|
||||
// 商品数据
|
||||
$product_name = "";
|
||||
foreach ($prescription_product as $item) {
|
||||
// 获取商品数据
|
||||
$params =array();
|
||||
@ -1350,6 +1353,7 @@ class UserDoctorService extends BaseService
|
||||
return fail();
|
||||
}
|
||||
|
||||
$product_name = $product_name . ";" . $product['product_name'];
|
||||
unset($product);
|
||||
}
|
||||
|
||||
@ -1390,7 +1394,7 @@ class UserDoctorService extends BaseService
|
||||
$message_content_data['desc'] = "";
|
||||
$message_content_data['data']['order_inquiry_id'] = (string)$order_inquiry['order_inquiry_id'];
|
||||
$message_content_data['data']['order_prescription_id'] = (string)$order_prescription['order_prescription_id'];
|
||||
$message_content_data['data']['product_name'] = $product_name ?? "药品";
|
||||
$message_content_data['data']['product_name'] = $product_name ?: "药品";
|
||||
$message_content_data['data']['pharmacist_verify_time'] = date('Y-m-d H:i:s',time());;
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user