Commit 5e522afa authored by suntengda's avatar suntengda

update 供应商&&自提点列表计算总数

parent 8917c141
......@@ -43,8 +43,8 @@ class TakePlace extends MysqlBase
$where['ORDER'] = ['take_place_id' => 'DESC'];
$where['LIMIT'] = [$offset, $limit];
// $e = TakePlace::debug();
$res['list'] = self::select('*', $where);
unset($where['ORDER'],$where['LIMIT']);
$res['total'] = self::count('*', $where);
return $res;
......
<?php
/**
* Author : Tengda
* Date : 2021/7/29
* Time : 17:59 下午
*/
use App\Base\Base;
//use App\Services\marketing\SpellService;
//use \Validate\Spell\detailValidate;
class SpellController extends Base {
public function detailAction()
{
// (new detailValidate())->validate();
//
// $name = $this->params['name'] ?? '';
// $printerSn = $this->params['printer_sn'] ?? '';
// $printerKey = $this->params['printer_key'] ?? '';
// $offset = $this->params['offset'] ?? 0;
// $limit = $this->params['limit'] ?? 20;
// $res = TakePlaceService::list($name,$printerSn,$printerKey,$offset,$limit);
$data = [
'detail'=>[],
];
$this->success(['data'=>$data]);
}
public function listAction()
{
$data = [
'list'=>[
[
'uid'=>123,
'username'=>'aaa',
'avator'=>'aaaaaa.jpg',
'id'=>1,
'name'=>'一起拼一定赢',
'desc'=>'吃喝玩乐',
'create_time'=>'2021-07-29 20:03:08',
'sold_num'=>123,
'min_price'=>15,
'max_price'=>89,
],
[
'uid'=>234,
'username'=>'bbbbb',
'avator'=>'aaaaaa1.jpg',
'id'=>1,
'name'=>'俺是打款就',
'desc'=>'吃喝玩乐',
'create_time'=>'2021-07-29 20:03:08',
'sold_num'=>345,
'min_price'=>13,
'max_price'=>99,
]
],
'total'=>2
];
$this->success(['data'=>$data]);
}
}
\ No newline at end of file
......@@ -27,8 +27,8 @@ class OtaService
$where['ORDER'] = ['ota_id' => 'DESC'];
$where['LIMIT'] = [$offset, $limit];
// $e = Ota::debug();
$res['list'] = Ota::select(self::COLUMNS, $where);
unset($where['ORDER'],$where['LIMIT']);
$res['total'] = Ota::count('*', $where);
return $res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment