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
72e968fa
authored
Nov 25, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改生成芯链账号的逻辑
parent
7c037059
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
app/Http/Services/SupplierAccountService.php
app/Http/Services/SupplierAccountService.php
View file @
72e968fa
...
@@ -86,8 +86,13 @@ class SupplierAccountService
...
@@ -86,8 +86,13 @@ class SupplierAccountService
if
(
strpos
(
$supplier
->
stockup_type
,
(
string
)
SupplierChannelModel
::
SUPPLIER_STOCKUP_TYPE_XINLIAN
)
===
false
)
{
if
(
strpos
(
$supplier
->
stockup_type
,
(
string
)
SupplierChannelModel
::
SUPPLIER_STOCKUP_TYPE_XINLIAN
)
===
false
)
{
return
;
return
;
}
}
//只有供应商更新的时候才有联系人信息,所以这里要判断
//还没有集团编码的时候,代表这个是新建,需要这个联系信息
$supplierContact
=
[];
if
(
empty
(
$supplier
->
group_code
))
{
$supplierContact
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
()
->
toArray
();
$supplierContact
=
SupplierContactModel
::
where
(
'supplier_id'
,
$supplierId
)
->
first
()
->
toArray
();
//新建账号
}
SupplierAccountModel
::
insert
([
SupplierAccountModel
::
insert
([
'supplier_id'
=>
$supplierId
,
'supplier_id'
=>
$supplierId
,
'supplier_code'
=>
$supplier
->
supplier_code
,
'supplier_code'
=>
$supplier
->
supplier_code
,
...
@@ -96,9 +101,9 @@ class SupplierAccountService
...
@@ -96,9 +101,9 @@ class SupplierAccountService
'password_raw'
=>
'123456'
,
'password_raw'
=>
'123456'
,
'password'
=>
Hash
::
make
(
'123456'
),
'password'
=>
Hash
::
make
(
'123456'
),
'create_time'
=>
time
(),
'create_time'
=>
time
(),
'mobile'
=>
array_get
(
$supplierContact
,
'supplier_mobile'
,
''
),
'mobile'
=>
array_get
(
$supplierContact
,
'supplier_mobile'
,
''
),
'email'
=>
array_get
(
$supplierContact
,
'supplier_email'
,
''
),
'email'
=>
array_get
(
$supplierContact
,
'supplier_email'
,
''
),
'contacts_name'
=>
array_get
(
$supplierContact
,
'supplier_consignee'
,
''
),
'contacts_name'
=>
array_get
(
$supplierContact
,
'supplier_consignee'
,
''
),
]);
]);
return
true
;
return
true
;
}
}
...
...
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