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
2600ef53
authored
Jun 24, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化接收
parent
52f32859
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
app/Http/Controllers/Sync/SupplierSyncController.php
app/Http/Services/SupplierAddressService.php
app/Http/Services/SyncSupplierService.php
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
2600ef53
...
...
@@ -98,7 +98,7 @@ class SupplierSyncController extends BaseSyncController
$this
->
syncResponse
(
0
,
'获取审核结果广播成功'
);
}
(
new
SyncSupplierService
())
->
receiveEntityResult
(
$resultData
[
'company_name'
],
$resultData
[
'result'
],
$resultData
[
'tag_list'
]
);
(
new
SyncSupplierService
())
->
receiveEntityResult
(
$resultData
);
$this
->
syncResponse
(
0
,
'获取审核结果广播成功'
);
}
...
...
app/Http/Services/SupplierAddressService.php
View file @
2600ef53
...
...
@@ -93,7 +93,7 @@ class SupplierAddressService
if
(
$oldSupplierAddress
!=
$supplierAddress
)
{
$changedAddress
[]
=
[
'source_id'
=>
$supplierId
,
'source_code'
=>
$supplier
Id
,
'source_code'
=>
$supplier
[
'supplier_code'
]
,
'address_type'
=>
'供应商地址'
,
'address'
=>
$supplierAddress
,
];
...
...
@@ -125,10 +125,11 @@ class SupplierAddressService
'address_data'
=>
$changedAddress
,
];
$url
=
config
(
'website.UnitedDataDomain'
)
.
'/sync/updateAddress'
;
$url
=
config
(
'website.UnitedDataDomain'
)
.
'/sync/
Address/
updateAddress'
;
//dd($params);
$result
=
curl
(
$url
,
$params
);
$result
=
json_decode
(
$result
,
true
);
\Log
::
error
(
$result
);
if
(
array_get
(
$result
,
'code'
)
!=
0
)
{
\Log
::
error
(
'更新一体化地址库失败 : '
.
json_encode
(
$result
));
}
...
...
app/Http/Services/SyncSupplierService.php
View file @
2600ef53
...
...
@@ -254,7 +254,9 @@ class SyncSupplierService
//根据result,修改供应商的是否是实体名单字段
$isEntity
=
(
$result
==
1
)
?
false
:
true
;
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_FALSE
;
//默认不是实体名单
$resultData
[
'warning_type'
]
=
$resultData
[
'warning_type'
]
==
1
?
'供应商名称'
:
'地址'
;
$warningType
=
array_get
(
$resultData
,
'warning_type'
)
==
1
?
'供应商名称'
:
'地址'
;
$warningKeyword
=
array_get
(
$resultData
,
'warning_keyword'
,
'无'
);
$warningData
=
array_get
(
$resultData
,
'warning_data'
,
'无'
);
//我这里的状态和一体化的结果判断有点对不上,因为我这把是(是否实体名单),而一体化那边是实体名单是否通过,所以要转换
if
(
$result
==
1
)
{
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_FALSE
;
...
...
@@ -262,15 +264,15 @@ class SyncSupplierService
}
else
{
if
(
$result
==
-
1
)
{
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_TRUE
;
$logContent
=
$reason
=
"属于实体名单,系统自动拉入黑名单. 风险类型 :
{
$resultData
[
'warning_type'
]
}
风险词 :
{
$resultData
[
'warning_keyword'
]
}
风险数据 :
{
$resultData
[
'warning_data'
]
}
"
;
$logContent
=
$reason
=
"属于实体名单,系统自动拉入黑名单. 风险类型 :
$warningType
风险词 :
$warningKeyword
风险数据 :
$warningData
"
;
}
if
(
$result
==
0
)
{
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_NEED_CONFIRM
;
$logContent
=
$reason
=
"待确认实体名单,系统自动拉入禁止交易,请联系“风控部门”进行确认. 风险类型 :
{
$resultData
[
'warning_type'
]
}
风险词 :
{
$resultData
[
'warning_keyword'
]
}
风险数据 :
{
$resultData
[
'warning_data'
]
}
"
;
$logContent
=
$reason
=
"待确认实体名单,系统自动拉入禁止交易,请联系“风控部门”进行确认. 风险类型 :
{
$resultData
[
'warning_type'
]
}
风险词 :
$warningKeyword
风险数据 :
$warningData
"
;
}
if
(
$result
==
-
3
)
{
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_REJECT
;
$logContent
=
$reason
=
"被驳回供应商,系统自动拉入禁止交易,请联系“风控部门”进行确认. 风险类型 :
{
$resultData
[
'warning_type'
]
}
风险词 :
{
$resultData
[
'warning_keyword'
]
}
风险数据 :
{
$resultData
[
'warning_data'
]
}
"
;
$logContent
=
$reason
=
"被驳回供应商,系统自动拉入禁止交易,请联系“风控部门”进行确认. 风险类型 :
{
$resultData
[
'warning_type'
]
}
风险词 :
$warningKeyword
风险数据 :
$warningData
"
;
}
}
...
...
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