This commit is contained in:
aozhiwei 2022-11-01 14:02:08 +08:00
parent c3a5ca9314
commit 4ff0206b27
2 changed files with 29 additions and 3 deletions

View File

@ -86,6 +86,7 @@ class Shop(object):
'params': [
_common.ReqHead(),
['id', 0, '商品唯一id参见shopGoods表'],
['token_type', '', "选用币种"]
['goods_num', 0, '商品数量'],
],
'response': [

View File

@ -29,17 +29,42 @@ class ShopController extends BaseAuthedController {
public function getGoodsList()
{
echo 'getGoodsList';
$row = SqlHelper::ormSelect(
$this->_getSelfMysql(),
't_shop_goods'
);
$this->_rspData(array(
'goods_list' => $row ? $row : array(),
));
}
public function getShopNames()
{
echo 'getShopNames';
$row = SqlHelper::ormSelect(
$this->_getSelfMysql(),
't_shop_names'
);
$this->_rspData(array(
'shop_name_list' => $row ? $row : array(),
));
}
public function buyGoodsNew()
{
echo 'buyGoodsNew';
$id = getReqVal('id', 0);
$num = getReqVal('goods_num', 0);
$row = SqlHelper::ormSelectOne(
$this->_getSelfMysql(),
't_shop_goods',
array(
'id' => $id,
)
);
$this->_rspData(array(
'p1' => $id,
'p2' => $row ? $row : array(),
));
}
public function info()