更新获取商户分类、店铺类型接口
This commit is contained in:
parent
1d37a2c270
commit
a9091f3948
@ -17,6 +17,7 @@ namespace app\controller\api;
|
||||
use app\common\repositories\store\order\StoreOrderRepository;
|
||||
use app\common\repositories\store\order\StoreRefundOrderRepository;
|
||||
use app\common\repositories\system\notice\SystemNoticeConfigRepository;
|
||||
use app\common\model\system\merchant\Merchant;
|
||||
use app\common\repositories\user\UserRepository;
|
||||
use app\common\repositories\user\UserSignRepository;
|
||||
use app\common\repositories\wechat\RoutineQrcodeRepository;
|
||||
@ -890,6 +891,22 @@ class Auth extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
//获取商户分类类别和店铺类型类别
|
||||
public function merchantCate()
|
||||
{
|
||||
$cateList = Db::name('MerchantCategory')->field(['merchant_category_id', 'category_name'])->select();
|
||||
$typeList = [
|
||||
['merchant_category_id' => Merchant::TypeStore ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeStore] ?? ''],
|
||||
['merchant_category_id' => Merchant::TypeTownSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeTownSupplyChain] ?? ''],
|
||||
['merchant_category_id' => Merchant::TypeSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeSupplyChain] ?? '']
|
||||
];
|
||||
$data = [
|
||||
'category' => $cateList,
|
||||
'type' => $typeList
|
||||
];
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
//根据地址信息查询汇总信息
|
||||
public function orderStatistics()
|
||||
{
|
||||
@ -898,6 +915,8 @@ class Auth extends BaseController
|
||||
$streetCode = $this->request->param('street_code', '');
|
||||
$villageCode = $this->request->param('village_code', '');
|
||||
$brigadeId = $this->request->param('brigade_id', 0);
|
||||
$categoryId = $this->request->param('category_id', 0);
|
||||
$typeId = $this->request->param('type_id', 0);
|
||||
$startDate = $this->request->param('start_date', '');
|
||||
$endDate = $this->request->param('end_date', '');
|
||||
$queryBuilder = Db::name('ProductOrderLog')->where('status', 1);
|
||||
|
@ -23,6 +23,7 @@ Route::group('api/', function () {
|
||||
Route::any('test', 'api.Auth/test');
|
||||
Route::any('dotest', 'api.Auth/dotest');
|
||||
Route::post('goods/take/:id', 'api.Auth/deliveryGoods');
|
||||
Route::get('merchant/cate', 'api.Auth/merchantCate');
|
||||
Route::get('order/statistics', 'api.Auth/orderStatistics');
|
||||
Route::get('region/order', 'api.Auth/orderList');
|
||||
Route::get('region/merchant', 'api.Auth/merStatistics');
|
||||
|
Loading…
x
Reference in New Issue
Block a user