标签代码的迁移

This commit is contained in:
liu 2024-03-19 14:21:38 +08:00
parent d71aaa72a7
commit 3f2b5b738d
3 changed files with 18 additions and 6 deletions

View File

@ -519,12 +519,8 @@ class ProductRepository extends BaseRepository
}
$minValues = array_map(function ($item) {
return min($item['price'], $item['ot_price']);
}, $data['attrValue']);
$minPriceOtPrice = min($minValues);
$wholesalePrices = array_column($data['attrValue'], 'wholesale_price');
$minPriceOtPrice = min($wholesalePrices);
$result = [
'store_name' => $data['store_name'],

View File

@ -23,6 +23,7 @@ use app\common\repositories\delivery\DeliveryOrderRepository;
use app\common\repositories\store\product\ProductAssistSetRepository;
use app\common\repositories\store\product\ProductGroupBuyingRepository;
use app\common\repositories\store\product\ProductGroupRepository;
use app\common\repositories\store\product\ProductLabelRepository;
use app\common\repositories\store\product\ProductPresellRepository;
use app\common\repositories\store\product\ProductRepository;
use app\common\repositories\store\shipping\ExpressRepository;
@ -739,4 +740,18 @@ class Common extends BaseController
}
}
/**
* 商品标签
*/
public function label_lst(ProductLabelRepository $repository)
{
[$page, $limit] = $this->getPage();
$where = $this->request->params(['name', 'type', 'status']);
$data = $repository->getList($where, $page, $limit);
return app('json')->success($data);
}
}

View File

@ -24,6 +24,7 @@ Route::group('api/', function () {
Route::any('ceshi', 'api.Demo/ceshi');
Route::any('promote_writing', 'api.Common/promote_writing');
Route::any('applet', 'api.Common/applet');
Route::get('label_lst', 'api.Common/label_lst');
Route::any('promote_writing', 'api.Common/promoteWriting');
Route::get('business/agree', 'api.Auth/businessAgree');
Route::any('system_group_value', 'api.Common/system_group_value');