|
|
@@ -146,12 +146,19 @@ class ApproachOrderForm extends Model
|
|
|
{
|
|
|
$parentValidate = parent::beforeValidate();
|
|
|
if ($this->sn) {
|
|
|
- $this->_model = ApproachOrder::find()->where('SN=:SN', [':SN' => $this->sn])->one();
|
|
|
+ $this->_model = Order::findOne(['SN'=>$this->sn]);
|
|
|
+ if (!$this->_model){
|
|
|
+ $this->addError('sn', '订单不存在');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+// if ($this->sn) {
|
|
|
+// $this->_model = ApproachOrder::find()->where('SN=:SN', [':SN' => $this->sn])->one();
|
|
|
// if (!$this->_model){
|
|
|
// $this->addError('sn', '订单不存在. ' . json_encode($this->_model));
|
|
|
// return false;
|
|
|
// }
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
// if ($this->scenario == 'verifyIPay88'){
|
|
|
// if ($this->_model->STATUS != \Yii::$app->params['orderStatus']['notPaid']['value']) {
|