供销查询镇合伙人公司下 镇级供应链列表
This commit is contained in:
parent
9398dfc214
commit
9dee1d2174
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\controller\api;
|
namespace app\controller\api;
|
||||||
|
|
||||||
|
use app\common\model\system\merchant\MerchantType;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -40,6 +41,9 @@ class Statistics extends BaseController
|
|||||||
}
|
}
|
||||||
$where[] = ['is_del', '=', 0];
|
$where[] = ['is_del', '=', 0];
|
||||||
$where[] = ['status', '=', 1];
|
$where[] = ['status', '=', 1];
|
||||||
|
// 镇级供应链 type_code = TypeTownSupplyChain
|
||||||
|
$merchantType = MerchantType::where('type_code', 'TypeTownSupplyChain')->find();
|
||||||
|
$where[] = ['type_id', '=', $merchantType['mer_type_id']];
|
||||||
$count = Db::name('merchant')->where($where)->count();
|
$count = Db::name('merchant')->where($where)->count();
|
||||||
return app('json')->success(['count' => $count]);
|
return app('json')->success(['count' => $count]);
|
||||||
}
|
}
|
||||||
@ -311,4 +315,22 @@ class Statistics extends BaseController
|
|||||||
->sum('p.total_price');
|
->sum('p.total_price');
|
||||||
return app('json')->success(['trade_amount' => $count]);
|
return app('json')->success(['trade_amount' => $count]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 镇级下的镇级供应链商户
|
||||||
|
public function SupplyChainMerchant()
|
||||||
|
{
|
||||||
|
$parmas = $this->request->param();
|
||||||
|
|
||||||
|
$where[] = ['street_id', '=', $parmas['street_code']];
|
||||||
|
$where[] = ['is_del', '=', 0];
|
||||||
|
$where[] = ['status', '=', 1];
|
||||||
|
// 镇级供应链 type_code = TypeTownSupplyChain
|
||||||
|
$merchantType = MerchantType::where('type_code', 'TypeTownSupplyChain')->find()->toArray();
|
||||||
|
|
||||||
|
$where[] = ['type_id', '=', $merchantType['mer_type_id']];
|
||||||
|
|
||||||
|
$list = Db::name('merchant')->where($where)->select();
|
||||||
|
|
||||||
|
return app('json')->success(compact('list'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -734,6 +734,7 @@ Route::group('api/', function () {
|
|||||||
Route::get('supply_chain_breeding_street_product_count', '/SupplyChainBreedingStreetProductCount');
|
Route::get('supply_chain_breeding_street_product_count', '/SupplyChainBreedingStreetProductCount');
|
||||||
Route::get('supply_chain_village_breeding_price_count', '/SupplyChainVillageBreedingPriceCount');
|
Route::get('supply_chain_village_breeding_price_count', '/SupplyChainVillageBreedingPriceCount');
|
||||||
Route::get('store_order_user_trade_amount', '/StoreOrderUserTradeAmount');
|
Route::get('store_order_user_trade_amount', '/StoreOrderUserTradeAmount');
|
||||||
|
Route::get('supply_chain_merchant', '/SupplyChainMerchant');
|
||||||
})->prefix('api.Statistics');
|
})->prefix('api.Statistics');
|
||||||
|
|
||||||
//滑块验证码
|
//滑块验证码
|
||||||
|
Loading…
x
Reference in New Issue
Block a user