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
051eb57a
authored
May 28, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-CRM转化供应商流程-20260518' into Dev
parents
f07a47d8
01f7fd20
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
app/Http/Services/LogService.php
app/Http/Services/SupplierService.php
app/Http/Services/LogService.php
View file @
051eb57a
...
@@ -7,6 +7,7 @@ use App\Http\Controllers\Filter\LogFilter;
...
@@ -7,6 +7,7 @@ use App\Http\Controllers\Filter\LogFilter;
use
App\Http\Transformers\LogTransformer
;
use
App\Http\Transformers\LogTransformer
;
use
App\Http\Transformers\SupplierTransformer
;
use
App\Http\Transformers\SupplierTransformer
;
use
App\Model\LogModel
;
use
App\Model\LogModel
;
use
App\Model\NationModel
;
class
LogService
class
LogService
{
{
...
@@ -153,12 +154,18 @@ class LogService
...
@@ -153,12 +154,18 @@ class LogService
return
$value
;
return
$value
;
},
$oldSupplier
);
},
$oldSupplier
);
$diff
=
array_diff
(
$newSupplier
,
$oldSupplier
);
$diff
=
array_diff
(
$newSupplier
,
$oldSupplier
);
// 国家/地区映射(循环外获取,避免重复查库)
$nationMap
=
NationModel
::
getNationList
();
$result
=
[];
$result
=
[];
foreach
(
$diff
as
$key
=>
$item
)
{
foreach
(
$diff
as
$key
=>
$item
)
{
$columnMap
=
config
(
'validate.SupplierNeedLogColumn'
);
$columnMap
=
config
(
'validate.SupplierNeedLogColumn'
);
if
(
in_array
(
$key
,
array_keys
(
$columnMap
)))
{
if
(
in_array
(
$key
,
array_keys
(
$columnMap
)))
{
$oldValue
=
array_get
(
$oldSupplier
,
$key
,
'空'
);
$oldValue
=
array_get
(
$oldSupplier
,
$key
,
'空'
);
$newValue
=
array_get
(
$newSupplier
,
$key
,
'空'
);
$newValue
=
array_get
(
$newSupplier
,
$key
,
'空'
);
if
(
$key
===
'nation_id'
)
{
$oldValue
=
array_get
(
$nationMap
,
$oldValue
,
''
);
$newValue
=
array_get
(
$nationMap
,
$newValue
,
$newValue
);
}
$content
=
array_get
(
$columnMap
,
$key
)
.
'由 [ '
.
$oldValue
.
' ] 改成 [ '
.
$newValue
.
' ];'
;
$content
=
array_get
(
$columnMap
,
$key
)
.
'由 [ '
.
$oldValue
.
' ] 改成 [ '
.
$newValue
.
' ];'
;
$result
[]
=
$content
;
$result
[]
=
$content
;
}
else
{
}
else
{
...
...
app/Http/Services/SupplierService.php
View file @
051eb57a
...
@@ -282,6 +282,9 @@ class SupplierService
...
@@ -282,6 +282,9 @@ class SupplierService
$channel
[
'system_tags'
]
=
trim
(
implode
(
','
,
$channel
[
'system_tags'
]),
','
);
$channel
[
'system_tags'
]
=
trim
(
implode
(
','
,
$channel
[
'system_tags'
]),
','
);
// 防御:禁止编辑时覆盖 supplier_source,防止被意外改为0
unset
(
$channel
[
'supplier_source'
]);
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
(
$channel
);
$model
->
where
(
'supplier_id'
,
$supplierId
)
->
update
(
$channel
);
$supplierAddressService
=
new
SupplierAddressService
();
$supplierAddressService
=
new
SupplierAddressService
();
...
...
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