Merge branch 'dev' of https://gitea.lihaink.cn/mkm/shop-php into dev
This commit is contained in:
commit
58fa4c5efc
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace app\controller\api;
|
namespace app\controller\api;
|
||||||
|
|
||||||
|
use app\common\model\system\merchant\Merchant;
|
||||||
use app\common\model\system\merchant\MerchantType;
|
use app\common\model\system\merchant\MerchantType;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -333,4 +334,42 @@ class Statistics extends BaseController
|
|||||||
|
|
||||||
return app('json')->success(compact('list'));
|
return app('json')->success(compact('list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户商品数量查询
|
||||||
|
*/
|
||||||
|
public function SupplyChainProduct()
|
||||||
|
{
|
||||||
|
$parmas = $this->request->param();
|
||||||
|
|
||||||
|
$merchant = Merchant::where('mer_intention_id', $parmas['mer_intention_id'])->find();
|
||||||
|
if (empty($merchant) || $merchant['type_id'] == 17) {
|
||||||
|
return app('json')->success();
|
||||||
|
}
|
||||||
|
$merchantName = $merchant['mer_name'];
|
||||||
|
$where[] = ['mer_id', '=', $merchant['mer_id']];
|
||||||
|
$where[] = ['mer_status', '=', 1];
|
||||||
|
$where[] = ['status', '=', 1];
|
||||||
|
$where[] = ['is_used', '=', 1];
|
||||||
|
$where[] = ['is_show', '=', 1];
|
||||||
|
$count = Db::name('store_product')->where($where)->count();
|
||||||
|
return app('json')->success(compact('count', 'merchantName'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商户商品库存更新查询
|
||||||
|
*/
|
||||||
|
public function SupplyChainProductStockCount1()
|
||||||
|
{
|
||||||
|
$parmas = $this->request->param();
|
||||||
|
|
||||||
|
$merchant = Merchant::where('mer_intention_id', $parmas['mer_intention_id'])->find();
|
||||||
|
if (empty($merchant) || $merchant['type_id'] == 17) {
|
||||||
|
return app('json')->success();
|
||||||
|
}
|
||||||
|
$where[] = ['mer_id', '=', $merchant['mer_id']];
|
||||||
|
$count = Db::name('store_product_stock')->where($where)->count();
|
||||||
|
return app('json')->success(['count' => $count]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -739,6 +739,8 @@ Route::group('api/', function () {
|
|||||||
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');
|
Route::get('supply_chain_merchant', '/SupplyChainMerchant');
|
||||||
|
Route::get('supply_chain_product', '/SupplyChainProduct');
|
||||||
|
Route::get('supply_chain_product_stock_count1', '/SupplyChainProductStockCount1');
|
||||||
})->prefix('api.Statistics');
|
})->prefix('api.Statistics');
|
||||||
|
|
||||||
//滑块验证码
|
//滑块验证码
|
||||||
|
Loading…
x
Reference in New Issue
Block a user