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
f4987535
authored
Jun 04, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
af283379
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
app/Http/Services/SkuService.php
app/Http/Services/SkuService.php
View file @
f4987535
...
...
@@ -156,10 +156,8 @@ class SkuService extends BaseService
$intraCodeModel
=
new
IntracodeModel
();
$encodedList
=
array_column
(
$list
,
'encoded'
);
$encodedUsers
=
$intraCodeModel
->
getEncodedUserByEncoded
(
$encodedList
);
$list
=
array_map
(
function
(
$item
)
use
(
$encodedUsers
,
$redis
)
{
if
(
empty
(
$item
[
'goods_name'
]))
{
return
$item
;
}
$goodsLabelMap
=
$this
->
orgId
==
1
?
config
(
'field.SkuGoodsLabel'
)
:
config
(
'field.SkuGoodsLabelForIedge'
);
$list
=
array_map
(
function
(
$item
)
use
(
$encodedUsers
,
$redis
,
$goodsLabelMap
)
{
$encoded
=
array_get
(
$item
,
'encoded'
,
0
);
$item
[
'encoded_user_name'
]
=
array_get
(
$encodedUsers
,
$encoded
,
''
);
$item
[
'moq'
]
=
$item
[
'moq'
]
?:
0
;
...
...
@@ -173,9 +171,14 @@ class SkuService extends BaseService
$dbInfo
=
getSpuSkuDb
(
$item
[
'goods_id'
]);
$connection
=
DB
::
connection
(
$dbInfo
[
"db"
]);
$table
=
$dbInfo
[
'table'
];
$selectFields
=
[
'goods_id'
,
'create_time'
,
'eccn'
,
'source'
,
'encoded'
,
'org_id'
];
$selectFields
=
[
'goods_id'
,
'create_time'
,
'eccn'
,
'source'
,
'encoded'
,
'org_id'
,
'goods_label'
];
$skuDBData
=
$connection
->
table
(
$table
)
->
select
(
$selectFields
)
->
where
(
'goods_id'
,
$item
[
'goods_id'
])
->
first
();
$skuDBData
=
$skuDBData
?
$skuDBData
:
[];
$item
[
'goods_label'
]
=
(
int
)
array_get
(
$skuDBData
,
'goods_label'
,
0
);
$item
[
'goods_label_name'
]
=
array_get
(
$goodsLabelMap
,
$item
[
'goods_label'
],
''
);
if
(
empty
(
$item
[
'goods_name'
]))
{
return
$item
;
}
$item
[
'source_name'
]
=
array_get
(
config
(
'field.SkuSource'
),
!
empty
(
$skuDBData
[
'source'
])
?
$skuDBData
[
'source'
]
:
1
,
''
);
$item
[
'org_name'
]
=
array_get
(
config
(
'field.SkuOrgList'
),
!
empty
(
$skuDBData
[
'org_id'
])
?
$skuDBData
[
'org_id'
]
:
1
,
''
);
$item
[
'ability_level_name'
]
=
(
!
empty
(
$item
[
'ability_level'
])
?
$item
[
'ability_level'
]
:
0
)
==
2
?
'强履约'
:
'弱履约'
;
...
...
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