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
b2a92b91
authored
May 14, 2026
by
duwenjun
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'feature/wenjun/20260514_yunxin_account' into 'master'
芯链账号修复 See merge request
!4
parents
89bdf0ae
3481ae8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
.gitignore
app/Http/Services/SupplierApplyService.php
.gitignore
View file @
b2a92b91
...
...
@@ -10,3 +10,4 @@ Homestead.json
/vendor/_laravel_ide
/storage/framework/views
/storage
CLAUDE.md
\ No newline at end of file
app/Http/Services/SupplierApplyService.php
View file @
b2a92b91
...
...
@@ -86,25 +86,24 @@ class SupplierApplyService
'audit_uid'
=>
request
()
->
user
->
userId
,
]);
$apply
=
SupplierApplyModel
::
where
(
'id'
,
$applyId
)
->
first
()
->
toArray
();
$isNewAccount
=
false
;
// 标记是否为新创建的账号
if
(
$result
)
{
if
(
$status
==
SupplierApplyModel
::
STATUS_PASS
)
{
$existAccount
=
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
exists
();
//如果没有芯链账号,那么就要新增芯链账号
$existAccount
=
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
first
();
if
(
$existAccount
)
{
SupplierAccountModel
::
where
(
'supplier_code'
,
$apply
[
'supplier_code'
])
->
update
([
// 账号已存在,只更新联系信息,不修改密码(避免覆盖用户已修改的密码)
$existAccount
->
update
([
'mobile'
=>
$apply
[
'mobile'
],
'email'
=>
$apply
[
'email'
],
'contacts_name'
=>
$apply
[
'contact_name'
],
'password_raw'
=>
123456
,
'password'
=>
Hash
::
make
(
123456
),
'create_time'
=>
time
(),
'update_time'
=>
time
(),
'a_type'
=>
1
,
'a_status'
=>
1
,
'create_uid'
=>
1000
,
'source'
=>
2
,
]);
}
else
{
//如果是通过并且已经存在,那么就要替换掉对应供应商的账号和密码
}
else
{
// 如果没有芯链账号,则新增芯链账号
$isNewAccount
=
true
;
SupplierAccountModel
::
insert
([
'supplier_id'
=>
$apply
[
'supplier_id'
],
'supplier_code'
=>
$apply
[
'supplier_code'
],
...
...
@@ -112,17 +111,21 @@ class SupplierApplyService
'update_time'
=>
time
(),
'email'
=>
$apply
[
'email'
],
'contacts_name'
=>
$apply
[
'contact_name'
],
'password_raw'
=>
123456
,
'password'
=>
Hash
::
make
(
123456
),
'password_raw'
=>
'123456'
,
'password'
=>
Hash
::
make
(
'123456'
),
'source'
=>
2
,
]);
}
}
//无论是否通过,都要发短信通知
if
(
$status
==
SupplierApplyModel
::
STATUS_REJECT
)
{
$message
=
"
${apply['contact_name']} 先生/女生您好,您的“芯链入驻申请”已收到,审核结果为:不通过,原因为:${
auditReason},如对审核结果有疑问,可联系您在猎芯的专属渠道经理(周强),联系电话:13427991931,联系邮箱:vendor@ichunt.com"
;
$message
=
"
{
$apply
[
'contact_name'
]
}
先生/女生您好,您的芯链入驻申请已收到,审核结果为:不通过,原因为:
{
$
auditReason
}
,如对审核结果有疑问,可联系您在猎芯的专属渠道经理(周强),联系电话:13427991931,联系邮箱:vendor@ichunt.com"
;
}
else
{
$message
=
"${apply['contact_name']} 先生/女生您好,您的“芯链入驻申请”已收到,审核结果为:通过,芯链登录网址:http://xinlian.ichunt.com,您的芯链手机号:${apply['mobile']},初始密码:123456,请在登录芯链后修改密码,后续有任何疑问都可联系您在猎芯的专属渠道经理(周强),联系电话:13427991931,联系邮箱:vendor@ichunt.com;"
;
if
(
$isNewAccount
)
{
$message
=
"
{
$apply
[
'contact_name'
]
}
先生/女生您好,您的芯链入驻申请已收到,审核结果为:通过,芯链登录网址:http://xinlian.ichunt.com,您的芯链手机号:
{
$apply
[
'mobile'
]
}
,初始密码:123456,请在登录芯链后修改密码,后续有任何疑问都可联系您在猎芯的专属渠道经理(周强),联系电话:13427991931,联系邮箱:vendor@ichunt.com"
;
}
else
{
$message
=
"
{
$apply
[
'contact_name'
]
}
先生/女生您好,您的芯链入驻申请已收到,审核结果为:通过,芯链登录网址:http://xinlian.ichunt.com,您的芯链手机号:
{
$apply
[
'mobile'
]
}
,请使用原密码登录,如忘记密码请联系猎芯渠道经理,后续有任何疑问都可联系您在猎芯的专属渠道经理(周强),联系电话:13427991931,联系邮箱:vendor@ichunt.com"
;
}
}
$data
=
[];
$data
[
'data'
][
'title'
]
=
$message
;
...
...
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