Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
878ddf0f
authored
May 23, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
统计数量
parent
4a513df6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
app/Http/Services/DataService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
878ddf0f
...
...
@@ -1194,4 +1194,14 @@ class DataService
});
})
->
export
(
'csv'
);
}
public
function
statisticsSkuNumber
()
{
$dataManagerSupplierCodeList
=
DataManageModel
::
where
(
'is_type'
,
0
)
->
where
(
'canal'
,
'!='
,
''
)
->
pluck
(
'canal'
)
->
toArray
();
//sku上架总数含api接口
$skuNum1
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
sum
(
'sku_num'
);
//sku上架总数,不含api接口
$skuNum2
=
SupplierChannelModel
::
where
(
'is_type'
,
0
)
->
whereNotIn
(
'supplier_code'
,
$dataManagerSupplierCodeList
)
->
sum
(
'sku_num'
);
dd
(
$skuNum1
,
$skuNum2
);
}
}
\ No newline at end of file
app/Http/routes.php
View file @
878ddf0f
...
...
@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
exportHasCooperationAgreementSupplierList
();
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumber
();
// \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([
// 'status' => 2,
// 'update_time' => time(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment