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
178ea522
authored
Jul 21, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化
parent
b384ad5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
app/Http/Services/AdminUserService.php
app/Http/Services/DataService.php
app/Http/routes.php
app/Http/Services/AdminUserService.php
View file @
178ea522
...
@@ -40,6 +40,11 @@ class AdminUserService
...
@@ -40,6 +40,11 @@ class AdminUserService
return
UserInfoModel
::
where
(
'name'
,
$userName
)
->
value
(
'userId'
);
return
UserInfoModel
::
where
(
'name'
,
$userName
)
->
value
(
'userId'
);
}
}
public
function
getAdminIdByEmail
(
$email
)
{
return
UserInfoModel
::
where
(
'email'
,
$email
)
->
value
(
'userId'
);
}
public
function
getCodeIdsByUserIds
(
$userIds
)
public
function
getCodeIdsByUserIds
(
$userIds
)
{
{
$intraCodeModel
=
new
IntracodeModel
();
$intraCodeModel
=
new
IntracodeModel
();
...
...
app/Http/Services/DataService.php
View file @
178ea522
...
@@ -775,9 +775,9 @@ class DataService
...
@@ -775,9 +775,9 @@ class DataService
}
}
//导出某个人创建的供应商在采购系统里面是哪个采购做了单
//导出某个人创建的供应商在采购系统里面是哪个采购做了单
public
function
exportSupplierChannelUser
(
$
createName
)
public
function
exportSupplierChannelUser
(
$
email
)
{
{
$adminId
=
(
new
AdminUserService
())
->
getAdminIdBy
UserName
(
$createName
);
$adminId
=
(
new
AdminUserService
())
->
getAdminIdBy
Email
(
$email
);
$contacts
=
SupplierContactModel
::
where
(
'admin_id'
,
$adminId
)
->
get
()
->
toArray
();
$contacts
=
SupplierContactModel
::
where
(
'admin_id'
,
$adminId
)
->
get
()
->
toArray
();
$csvData
=
[];
$csvData
=
[];
foreach
(
$contacts
as
$contact
)
{
foreach
(
$contacts
as
$contact
)
{
...
...
app/Http/routes.php
View file @
178ea522
...
@@ -62,5 +62,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
...
@@ -62,5 +62,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
exportSupplierChannelUser
(
'
admin
'
);
(
new
\App\Http\Services\DataService
())
->
exportSupplierChannelUser
(
'
P2assistant@ichunt.com
'
);
});
});
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