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
01771b62
authored
Oct 30, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
路由接收
parent
ea9e9cd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
app/Http/Controllers/Sync/SupplierSyncController.php
app/Http/routes.php
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
01771b62
...
@@ -49,6 +49,30 @@ class SupplierSyncController extends BaseSyncController
...
@@ -49,6 +49,30 @@ class SupplierSyncController extends BaseSyncController
}
}
public
function
receiveEntityResult
(
Request
$request
)
{
$resultData
=
$request
->
only
([
'company_name'
,
'result'
,
]);
$rules
=
[
"company_name"
=>
"required"
,
"result"
=>
"required"
,
];
$validator
=
Validator
::
make
(
$rules
,
$rules
);
//判断联系方式的表单验证
if
(
$validator
->
fails
())
{
$error
=
$validator
->
errors
()
->
first
();
$this
->
syncResponse
(
-
1
,
$error
);
}
(
new
SyncSupplierService
())
->
receiveEntityResult
(
$resultData
[
'company_name'
],
$resultData
[
'result'
]);
$this
->
syncResponse
(
0
,
'获取审核结果广播成功'
);
}
//获取供应商需要审核的数量
//获取供应商需要审核的数量
public
function
GetNeedAuditSupplierCount
(
Request
$request
)
public
function
GetNeedAuditSupplierCount
(
Request
$request
)
{
{
...
...
app/Http/routes.php
View file @
01771b62
...
@@ -75,6 +75,8 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Api'], function () {
...
@@ -75,6 +75,8 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Api'], function () {
Route
::
group
([
'middleware'
=>
[
'external'
],
'namespace'
=>
'Sync'
],
function
()
{
Route
::
group
([
'middleware'
=>
[
'external'
],
'namespace'
=>
'Sync'
],
function
()
{
//这个接口是用来接收同步结果,同时这个接口也是接收一体化那边的修改
//这个接口是用来接收同步结果,同时这个接口也是接收一体化那边的修改
Route
::
any
(
'/sync/unitedData/syncResult'
,
'SupplierSyncController@syncUniteResult'
);
Route
::
any
(
'/sync/unitedData/syncResult'
,
'SupplierSyncController@syncUniteResult'
);
//这个接口是用来获取实体名单审核广播的
Route
::
any
(
'/sync/unitedData/receiveEntityResult'
,
'SupplierSyncController@receiveEntityResult'
);
Route
::
get
(
'/sync/audit/GetNeedAuditSupplierCount'
,
'SupplierSyncController@GetNeedAuditSupplierCount'
);
Route
::
get
(
'/sync/audit/GetNeedAuditSupplierCount'
,
'SupplierSyncController@GetNeedAuditSupplierCount'
);
});
});
...
...
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