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
c34fc6f0
authored
Dec 26, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化逻辑
parent
0b811c38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
app/Http/Services/SyncSupplierService.php
app/Http/Services/SyncSupplierService.php
View file @
c34fc6f0
...
...
@@ -224,18 +224,10 @@ class SyncSupplierService
public
function
receiveEntityResult
(
$supplierName
,
$result
,
$tagList
)
{
Log
::
warning
(
'一体化拉黑结果 : '
.
(
$supplierName
.
'---'
.
$result
));
//先找到对应的供应商(草稿的跳过),如果没有那跳过
$supplier
=
SupplierChannelModel
::
where
(
'supplier_name'
,
$supplierName
)
->
where
(
'status'
,
'!='
,
SupplierChannelModel
::
STATUS_PENDING
)
->
first
();
if
(
empty
(
$supplier
))
{
return
;
}
$supplier
=
$supplier
->
toArray
();
$supplierId
=
$supplier
[
'supplier_id'
];
//先把修改之前的状态给记录下来
$status
=
$supplier
[
'status'
];
//然后根据result,修改供应商的是否是实体名单字段
//根据result,修改供应商的是否是实体名单字段
$isEntity
=
(
$result
==
1
)
?
false
:
true
;
$isEntityResult
=
SupplierChannelModel
::
IS_ENTITY_FALSE
;
//默认不是实体名单
//我这里的状态和一体化的结果判断有点对不上,因为我这把是(是否实体名单),而一体化那边是实体名单是否通过,所以要转换
if
(
$result
==
1
)
{
...
...
@@ -255,6 +247,21 @@ class SyncSupplierService
$logContent
=
$reason
=
'被驳回供应商,系统自动拉入禁止交易,请联系“风控部门”进行确认'
;
}
}
//去修改供应商入驻相关的数据
(
new
ChainService
())
->
changeChainIsEntity
(
$supplierName
,
$isEntityResult
);
//先找到对应的供应商(草稿的跳过),如果没有那跳过
$supplier
=
SupplierChannelModel
::
where
(
'supplier_name'
,
$supplierName
)
->
where
(
'status'
,
'!='
,
SupplierChannelModel
::
STATUS_PENDING
)
->
first
();
if
(
empty
(
$supplier
))
{
return
true
;
}
$supplier
=
$supplier
->
toArray
();
$supplierId
=
$supplier
[
'supplier_id'
];
//先把修改之前的状态给记录下来
$status
=
$supplier
[
'status'
];
$preStatus
=
null
;
$redis
=
new
RedisModel
();
if
(
$isEntity
)
{
...
...
@@ -304,9 +311,6 @@ class SyncSupplierService
]);
}
//去修改供应商入驻相关的数据
(
new
ChainService
())
->
changeChainIsEntity
(
$supplierName
,
$isEntityResult
);
//还要去打日志
$logService
=
new
LogService
();
$logService
->
AddAdminLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'实体名单设置'
,
$logContent
);
...
...
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