添加:总平台商品支持绑定省公司发起人及设置省公司门店佣金和供应商提成
This commit is contained in:
parent
2b8e2606db
commit
1d1c8fe40c
|
|
@ -87,7 +87,6 @@ class ProductRepository extends BaseRepository
|
|||
['is_batch',0],
|
||||
['batch_num',0],
|
||||
['batch_unit',''],
|
||||
['agent_two_ids',[]],
|
||||
];
|
||||
protected $admin_filed = 'Product.product_id,Product.mer_id,brand_id,spec_type,unit_name,mer_status,rate,reply_count,store_info,cate_id,Product.image,slider_image,Product.store_name,Product.keyword,Product.sort,U.rank,Product.is_show,Product.sales,Product.price,extension_type,refusal,cost,Product.ot_price,stock,is_gift_bag,Product.care_count,Product.status,is_used,Product.create_time,Product.product_type,old_product_id,star,ficti,integral_total,integral_price_total,sys_labels,param_temp_id,mer_svip_status,svip_price,svip_price_type';
|
||||
protected $filed = 'Product.product_id,Product.mer_id,brand_id,unit_name,spec_type,mer_status,rate,reply_count,store_info,cate_id,Product.image,slider_image,Product.store_name,Product.keyword,Product.sort,Product.is_show,Product.sales,Product.price,extension_type,refusal,cost,Product.ot_price,stock,is_gift_bag,Product.care_count,Product.status,is_used,Product.create_time,Product.product_type,old_product_id,integral_total,integral_price_total,mer_labels,Product.is_good,Product.is_del,type,param_temp_id,mer_svip_status,svip_price,svip_price_type';
|
||||
|
|
@ -530,8 +529,7 @@ class ProductRepository extends BaseRepository
|
|||
// 按照批量购买设置
|
||||
'is_batch' => $data['is_batch'] ?? 0,
|
||||
'batch_num' => $data['batch_num'] ?? 0,
|
||||
'batch_unit' => $data['batch_unit'] ?? '',
|
||||
'agent_two_ids' => is_array($data['agent_two_ids']) ? implode(',',$data['agent_two_ids']) : $data['agent_two_ids'],
|
||||
'batch_unit' => $data['batch_unit'] ?? ''
|
||||
];
|
||||
if (isset($data['extend'])) $result['extend'] = $data['extend'] ? json_encode($data['extend'], JSON_UNESCAPED_UNICODE) : '';
|
||||
if (isset($data['mer_id'])) $result['mer_id'] = $data['mer_id'];
|
||||
|
|
|
|||
|
|
@ -150,10 +150,24 @@ class StoreProduct extends BaseController
|
|||
* @param validate $validate
|
||||
* @return array
|
||||
*/
|
||||
public function checkParams(validate $validate)
|
||||
{
|
||||
$data = $this->request->params(['is_hot','is_best','is_benefit','is_new','store_name','content','rank','star']);
|
||||
public function checkParams(validate $validate){
|
||||
$data = $this->request->params([
|
||||
'is_hot',
|
||||
'is_best',
|
||||
'is_benefit',
|
||||
'is_new',
|
||||
'store_name',
|
||||
'content',
|
||||
'rank',
|
||||
'star',
|
||||
['agent_two_ids', []],
|
||||
'agent_two_money',
|
||||
'supplier_money'
|
||||
]);
|
||||
$validate->check($data);
|
||||
|
||||
$data['agent_two_ids'] = implode(',',$data['agent_two_ids']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
namespace app\controller\merchant\marketing;
|
||||
|
||||
use app\common\repositories\marketing\AgentRepository;
|
||||
use crmeb\basic\BaseController;
|
||||
|
||||
class Agent extends BaseController{
|
||||
/**
|
||||
* Common: 代理列表
|
||||
* Author: wu-hui
|
||||
* Time: 2024/04/17 14:20
|
||||
* @return mixed
|
||||
*/
|
||||
public function agentList(){
|
||||
[$page, $limit] = $this->getPage();
|
||||
$params = $this->request->params(['uid','agent_type','contact_name','contact_phone','is_invite_supplier']);
|
||||
$data = app()->make(AgentRepository::class)->getList((array)$params,(int)$page,(int)$limit);
|
||||
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,6 @@ use think\facade\Route;
|
|||
use app\common\middleware\MerchantCheckBaseInfoMiddleware;
|
||||
|
||||
Route::group(function () {
|
||||
|
||||
//秒杀商品
|
||||
Route::group('store/seckill_product', function () {
|
||||
Route::get('lst_time', '/lst_time')->option([
|
||||
|
|
@ -69,7 +68,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//预售商品
|
||||
Route::group('store/product/presell', function () {
|
||||
Route::get('lst', '/lst')->name('merchantStoreProductPresellLst')->option([
|
||||
|
|
@ -121,7 +119,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//助力商品
|
||||
Route::group('store/product/assist', function () {
|
||||
Route::get('lst', '/lst')->name('merchantStoreProductAssistLst')->option([
|
||||
|
|
@ -169,7 +166,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//助力活动
|
||||
Route::group('store/product/assist_set', function () {
|
||||
Route::get('lst', '/lst')->name('merchantStoreProductAssistSetLst')->option([
|
||||
|
|
@ -182,7 +178,6 @@ Route::group(function () {
|
|||
'_path' => '/marketing/assist/assist_set',
|
||||
'_auth' => true,
|
||||
]);
|
||||
|
||||
//拼团商品
|
||||
Route::group('store/product/group', function () {
|
||||
Route::get('lst', '/lst')->name('merchantStoreProductGroupLst')->option([
|
||||
|
|
@ -230,14 +225,11 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
Route::get('config/others/group_buying', 'admin.system.config.ConfigOthers/getGroupBuying')
|
||||
->name('merchantConfigGroupBuying')->option([
|
||||
Route::get('config/others/group_buying', 'admin.system.config.ConfigOthers/getGroupBuying')->name('merchantConfigGroupBuying')->option([
|
||||
'_alias' => '拼团配置',
|
||||
'_path' => '/marketing/combination/combination_goods',
|
||||
'_auth' => true,
|
||||
]);;
|
||||
|
||||
//拼团活动
|
||||
Route::group('store/product/group/buying', function () {
|
||||
Route::get('lst', '/lst')->name('merchantStoreProductGroupBuyingLst')->option([
|
||||
|
|
@ -264,9 +256,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
|
||||
|
||||
//直播间
|
||||
Route::group('broadcast/room', function () {
|
||||
Route::get('lst', '/lst')->name('merchantBroadcastRoomLst')->option([
|
||||
|
|
@ -352,7 +341,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//直播小助手
|
||||
Route::group('broadcast/assistant', function () {
|
||||
Route::get('lst', '/lst')->name('merchantBroadcastAssistantLst')->option([
|
||||
|
|
@ -398,7 +386,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//直播间商品
|
||||
Route::group('broadcast/goods', function () {
|
||||
Route::get('lst', '/lst')->name('merchantBroadcastGoodsLst')->option([
|
||||
|
|
@ -453,7 +440,6 @@ Route::group(function () {
|
|||
],
|
||||
]
|
||||
]);
|
||||
|
||||
//积分
|
||||
Route::group('integral',function(){
|
||||
Route::get('lst','/getList')->name('merchantIntegralList')->option([
|
||||
|
|
@ -490,6 +476,18 @@ Route::group(function () {
|
|||
|
||||
]
|
||||
]);
|
||||
// 代理中心
|
||||
Route::group('marketing/agent', function () {
|
||||
// 代理管理相关
|
||||
Route::get('list','/agentList')->name('systemMarketingAgentList')->option([
|
||||
'_alias' => '代理列表',
|
||||
]);
|
||||
})->prefix('merchant.marketing.Agent')->option([
|
||||
'_path' => '/marketing/agent/list',
|
||||
'_auth' => true,
|
||||
]);
|
||||
|
||||
|
||||
})->middleware(AllowOriginMiddleware::class)
|
||||
->middleware(MerchantTokenMiddleware::class, true)
|
||||
->middleware(MerchantAuthMiddleware::class)
|
||||
|
|
|
|||
Loading…
Reference in New Issue