37 lines
701 B
PHP
37 lines
701 B
PHP
<?php
|
|
|
|
require_once('mt/Parameter.php');
|
|
require_once('mt/Item.php');
|
|
|
|
require_once('models/Bag.php');
|
|
|
|
use phpcommon\SqlHelper;
|
|
use models\Bag;
|
|
|
|
class BagController extends BaseAuthedController {
|
|
|
|
public function itemList()
|
|
{
|
|
$itemList = array();
|
|
SqlHelper::ormSelect(
|
|
$this->_getSelfMysql(),
|
|
't_bag',
|
|
array(
|
|
'account_id' => $this->_getAccountId()
|
|
),
|
|
function ($row) use(&$itemList) {
|
|
array_push($itemList, Bag::toDto($row));
|
|
}
|
|
);
|
|
$this->_rspData(array(
|
|
'item_list' => $itemList
|
|
));
|
|
}
|
|
|
|
public function useItem()
|
|
{
|
|
|
|
}
|
|
|
|
}
|