$merchantId ); $config = $this->getFind($where); if (empty($config)) { $add = array( 'merchant_id' => $merchantId, 'merchant_diy' => $diy, ); $res = $this->addOrder($add); } else { $res = $this->updateOrder($where, array('merchant_diy' => $diy)); } if($res === false){ return false; }else{ return true; } } }