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
e78f1734
authored
Sep 02, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复逻辑
parent
6509b6c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/SyncSupplierService.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
e78f1734
...
...
@@ -715,6 +715,10 @@ class SupplierApiController extends Controller
//删除redis状态
$redis
->
hdel
(
'supplier_status_before_disable'
,
$supplierId
);
$logService
=
new
LogService
();
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'disable_reason'
=>
''
,
'update_time'
=>
time
(),
]);
$logService
->
AddLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'取消禁用'
,
'取消禁用供应商'
);
$this
->
response
(
0
,
'取消禁用成功'
);
}
else
{
...
...
app/Http/Services/SyncSupplierService.php
View file @
e78f1734
...
...
@@ -322,8 +322,8 @@ class SyncSupplierService
//判断是否是同名多供应商,如果是的话,如果是之前已经禁用的,则直接跳过
if
(
count
(
$suppliers
)
>
1
)
{
if
(
$supplier
[
'status'
]
==
SupplierChannelModel
::
STATUS_DISABLE
&&
(
$supplier
[
'is_entity'
]
!=
SupplierChannelModel
::
IS_ENTITY_NEED_CONFIRM
&&
$supplier
[
'is_entity'
]
!=
SupplierChannelModel
::
IS_ENTITY_TRUE
))
{
Log
::
warning
(
"检测到同名供应商并且属于禁用(实体名单不为待处理并且也不为实体名单)状态,
跳过,
供应商id为 : "
.
$supplier
[
'supplier_id'
]);
continue
;
Log
::
warning
(
"检测到同名供应商并且属于禁用(实体名单不为待处理并且也不为实体名单)状态,供应商id为 : "
.
$supplier
[
'supplier_id'
]);
//
continue;
}
}
//判断是否是人工禁用的,是的话,也跳过
...
...
@@ -332,6 +332,12 @@ class SyncSupplierService
Log
::
warning
(
"检测到供应商并且属于禁用(人工禁用)状态,跳过,供应商id为 : "
.
$supplier
[
'supplier_id'
]);
continue
;
}
if
(
strpos
(
$supplier
[
'disable_reason'
],
'人工禁用'
)
!==
false
)
{
Log
::
warning
(
"检测到供应商并且属于禁用(人工禁用新)状态,跳过,供应商id为 : "
.
$supplier
[
'supplier_id'
]);
continue
;
}
$originIsEntity
=
$supplier
[
'is_entity'
];
//$supplier = $supplier->toArray();
$supplierId
=
$supplier
[
'supplier_id'
];
...
...
@@ -358,7 +364,8 @@ class SyncSupplierService
$preStatus
=
SupplierChannelModel
::
STATUS_IN_REVIEW
;
}
//修改供应商的状态
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'is_entity'
=>
$isEntityResult
,
'update_time'
=>
time
(),
//这里的逻辑是,因为取消实体名单以后,如果之前的状态是黑名单的话,直接变成待提审
...
...
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