rabin hai 1 ano
pai
achega
7dddb01f1e
Modificáronse 2 ficheiros con 5 adicións e 14 borrados
  1. 3 12
      database/order.php
  2. 2 2
      src/Api.php

+ 3 - 12
database/order.php

@@ -44,15 +44,6 @@ return array
 			'desc' 		=> '用户',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
-			/*
-			'search'	=> array
-			(
-				'api' => 'passport/user-all',
-				'col' => 'username',
-				'result' => 'id',
-			),
-			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
-			*/
 		),
 
 		'username'		=> array
@@ -81,10 +72,10 @@ return array
 
 		'order_id'		=> array
 		(
-			'type' 		=> 'varchar-200',
-			'name' 		=> '订单id',
+			'type' 		=> 'varchar-600',
+			'name' 		=> '订单',
 			'default' 	=> '',
-			'desc' 		=> '订单id',
+			'desc' 		=> '订单',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
 			'search'	=> 'fulltext',

+ 2 - 2
src/Api.php

@@ -255,7 +255,7 @@ class Api
 		$this->system_source = $this->getParam($param, 'system_source');
 		$this->account_id = $this->getParam($param, 'account_id');
 
-		if (!$this->account_id && !$this->channel_id && !$this->system_source) {
+		if (!$this->account_id || (!$this->channel_id && !$this->system_source)) {
 			Dever::alert('没有账户信息');
 		}
 	}
@@ -281,7 +281,7 @@ class Api
 	private function handle()
 	{
 		$pay = false;
-		if ($this->account_id > 0) {
+		if ($this->account_id) {
 			$pay = Dever::db('pay/account')->one($this->account_id);
 		} elseif ($this->channel_id && $this->system_source) {
 			$pay = Dever::db('pay/account')->one(array('channel_id' => $this->channel_id, 'system_source' => $this->system_source));