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
5726a218
authored
May 31, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
云芯入驻发送邮件
parent
9387cf79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
app/Http/Controllers/Api/ExternalApiController.php
app/Http/routes.php
app/Http/Controllers/Api/ExternalApiController.php
View file @
5726a218
...
...
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Filter\SupplierFilter
;
use
App\Http\Services\AdminUserService
;
use
App\Http\Services\MessageService
;
use
App\Http\Services\SupplierApplyService
;
use
App\Http\Services\SupplierService
;
use
App\Model\SupplierAccountModel
;
...
...
@@ -86,6 +87,10 @@ class ExternalApiController extends Controller
if
(
!
$result
)
{
$this
->
externalResponse
(
-
1
,
'申请供应商失败'
);
}
$supplier
=
SupplierChannelModel
::
where
(
'supplier_name'
,
$data
[
'supplier_name'
])
->
first
()
->
toArray
();
//还要发邮件
$data
[
'data'
][
'title'
]
=
"供应商:
{
$supplier
[
'supplier_name'
]
}
,供应商编码:
{
$supplier
[
'supplier_code'
]
}
;申请了云芯入驻,请在三个工作日内,前往【供应商系统-云芯入驻申请】页面进行审核操作;"
;
(
new
MessageService
())
->
sendMessage
(
'supplier_apply_admin_notify'
,
$data
,
'qiang@ichunt.com'
,
true
);
$this
->
externalResponse
(
0
,
'申请供应商成功'
);
}
}
app/Http/routes.php
View file @
5726a218
...
...
@@ -13,7 +13,9 @@
use
App\Http\Services\DepartmentService
;
use
App\Http\Services\MessageService
;
use
App\Http\Services\SkuService
;
use
App\Model\SupplierChannelModel
;
Route
::
group
([
'middleware'
=>
[
'web'
,
'menu'
]],
function
()
{
Route
::
get
(
'/'
,
'WebController@Entrance'
);
...
...
@@ -67,8 +69,9 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
initialMainBrandsLimit
();
(
new
\App\Http\Services\DataService
())
->
initialMainBrandsToSkuRuler
();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
// \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([
// 'status' => 2,
// '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