28 lines
585 B
PHP
28 lines
585 B
PHP
<?
|
|
|
|
namespace controller\market\item;
|
|
|
|
use ms\ms\structure\msControllerTable;
|
|
|
|
use market\Item as MarketItem;
|
|
|
|
class Api extends msControllerTable {
|
|
|
|
static $class = 'market\Item';
|
|
|
|
public static function getNameList() {
|
|
$res = [];
|
|
if(\Account::$isSuper) {
|
|
$q = (string)trim($_POST['q']);
|
|
$res = MarketItem::getNameList([
|
|
\Query::WHERE => new \Where(\Where::_or([
|
|
\Where::_operator( MarketItem::$NAME,'LIKE','%'.$q.'%' ),
|
|
]))
|
|
]);
|
|
}
|
|
echo je($res);
|
|
}
|
|
}
|
|
|
|
|