预约购药
This commit is contained in:
@@ -149,7 +149,7 @@ class ProductOrderController extends BaseAppController
|
||||
$this->requestValidate($post, [
|
||||
['prescription_id', 'required']
|
||||
]);
|
||||
$ProductOrder = ProductOrder::find()->select('id,order_no,su_id,p_id,user_id,is_pay,prescription_type,address_id,address,decoct_price,items_price,process_price,treatement_price,total_pay_price,pay_method,trans_expenses,created_at,cancel_status,refund_status,status')->where([
|
||||
$ProductOrder = ProductOrder::find()->select('id,order_no,su_id,p_id,user_id,is_pay,prescription_type,address_id,address,decoct_price,items_price,process_price,treatement_price,total_pay_price,pay_method,trans_expenses,created_at,received_time,cancel_status,refund_status,status')->where([
|
||||
'p_id' => $post['prescription_id'],
|
||||
'user_id' => \Yii::$app->user->identity->getId(),
|
||||
'store_id' => $post['store_id']
|
||||
@@ -161,7 +161,7 @@ class ProductOrderController extends BaseAppController
|
||||
$forbiddenRefund = 0;
|
||||
$config = \Yii::$app->params;
|
||||
$orderForbiddenRefundTime = isset($config['product_order']['forbidden_refund_time']) ? $config['product_order']['forbidden_refund_time'] : 24*3600*30;
|
||||
if(time() >= $orderForbiddenRefundTime + $ProductOrder['received_time']){
|
||||
if(time() >= $orderForbiddenRefundTime + $ProductOrder['received_time']?? 0){
|
||||
$forbiddenRefund = 1;
|
||||
}
|
||||
$ProductOrder['forbidden_refund'] = $forbiddenRefund;
|
||||
|
||||
Reference in New Issue
Block a user