39 lines
818 B
PHP
39 lines
818 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,
|
|
#'time' => date('Y-m-d H:i:s', -662716800),
|
|
#'datetime' => strtotime('1949-01-01 00:00:00')
|
|
));
|
|
}
|
|
|
|
public function useItem()
|
|
{
|
|
|
|
}
|
|
|
|
}
|