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
214f92f6
authored
Aug 19, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加账号判断接口
parent
5acc8b59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
app/Http/Controllers/Api/ExternalApiController.php
app/Http/routes.php
app/Http/Controllers/Api/ExternalApiController.php
View file @
214f92f6
...
...
@@ -94,4 +94,19 @@ class ExternalApiController extends Controller
(
new
MessageService
())
->
sendMessage
(
'supplier_apply_admin_notify'
,
$data
,
'vendor@ichunt.com'
,
true
);
$this
->
externalResponse
(
0
,
'申请供应商成功'
);
}
//判断是否有芯链账号
public
function
checkSupplierAccountExist
(
Request
$request
)
{
$supplierId
=
$request
->
get
(
'supplier_id'
);
if
(
empty
(
$supplierId
))
{
$this
->
externalResponse
(
-
1
,
'供应商ID不能为空'
);
}
$supplierAccount
=
SupplierAccountModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
();
if
(
$supplierAccount
)
{
$this
->
externalResponse
(
0
,
'ok'
,
'有芯链账号'
);
}
$this
->
externalResponse
(
-
1
,
'没有找到芯链账号'
);
}
}
app/Http/routes.php
View file @
214f92f6
...
...
@@ -78,6 +78,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Api'], function () {
Route
::
get
(
'/api/external/searchSupplier'
,
'ExternalApiController@searchSupplier'
);
Route
::
match
([
'get'
,
'post'
],
'/api/external/checkSupplierApply'
,
'ExternalApiController@checkSupplierApply'
);
Route
::
match
([
'get'
,
'post'
],
'/api/external/applySupplier'
,
'ExternalApiController@applySupplier'
);
Route
::
match
([
'get'
,
'post'
],
'/api/external/checkSupplierAccountExist'
,
'ExternalApiController@checkSupplierAccountExist'
);
});
//同步相关的接口
...
...
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