新增api通知处方生成功能
This commit is contained in:
@@ -29,7 +29,8 @@ class ProductOrderSubmitForm extends BaseModel
|
||||
|
||||
public function getPayData($post)
|
||||
{
|
||||
$ProductOrder = ProductOrder::find()->where([
|
||||
// category
|
||||
$ProductOrder = ProductOrder::find()->with(['prescription'])->where([
|
||||
'id' => $post['order_id'],
|
||||
'user_id' => \Yii::$app->user->identity->getId(),
|
||||
])->one();
|
||||
@@ -128,6 +129,12 @@ class ProductOrderSubmitForm extends BaseModel
|
||||
$paymentProductOrder->order_no = $productOrder['order_no'];
|
||||
$paymentProductOrder->pay_order_no = $pay_order_no;
|
||||
$paymentProductOrder->amount = $productOrder['total_pay_price'];
|
||||
if ($productOrder->prescription->category?? 1 === 2) {
|
||||
if ($productOrder->delivery_method === 0) {
|
||||
$paymentProductOrder->amount = $productOrder['trans_expenses'];
|
||||
}
|
||||
}
|
||||
|
||||
$paymentProductOrder->saveOrFail();
|
||||
|
||||
if(bccomp($total_fee,0,2) <= 0){ //无需支付
|
||||
|
||||
Reference in New Issue
Block a user