Commit 5726a218 by 杨树贤

云芯入驻发送邮件

parent 9387cf79
......@@ -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, '申请供应商成功');
}
}
......@@ -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(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment