Commit 35457e10 by mushishixian

优化

parent 14dc0f93
...@@ -49,7 +49,7 @@ class AdminUserService ...@@ -49,7 +49,7 @@ class AdminUserService
$count = $userInfoModel->leftJoin('lie_intracode', 'user_info.userId', '=', 'lie_intracode.admin_id') $count = $userInfoModel->leftJoin('lie_intracode', 'user_info.userId', '=', 'lie_intracode.admin_id')
->where('lie_intracode.code_id',$codeId) ->where('lie_intracode.code_id',$codeId)
->where('user_info.status', 4)->where('lie_intracode.code_id', '!=', '')->count(); ->where('user_info.status', 4)->where('lie_intracode.code_id', '!=', '')->count();
return $count ? true : false; return (bool)$count;
} }
...@@ -64,7 +64,6 @@ class AdminUserService ...@@ -64,7 +64,6 @@ class AdminUserService
$users = array_merge($usersMarket, $usersOperation); $users = array_merge($usersMarket, $usersOperation);
$userIds = array_column($users, 'userId'); $userIds = array_column($users, 'userId');
$intracodeModel = new IntracodeModel(); $intracodeModel = new IntracodeModel();
$users = $intracodeModel->getEncodeByUserIds($userIds); return $intracodeModel->getEncodeByUserIds($userIds);
return $users;
} }
} }
\ No newline at end of file
...@@ -192,7 +192,6 @@ class DataService ...@@ -192,7 +192,6 @@ class DataService
'Aegis Components Inc', 'Aegis Components Inc',
'深圳市亿博创电子公司', '深圳市亿博创电子公司',
]; ];
//构建插入数据 //构建插入数据
$supplierModel = new SupplierChannelModel(); $supplierModel = new SupplierChannelModel();
foreach ($supplierNames as $supplierName) { foreach ($supplierNames as $supplierName) {
...@@ -289,7 +288,7 @@ class DataService ...@@ -289,7 +288,7 @@ class DataService
$msg = new AMQPMessage($message, $msg = new AMQPMessage($message,
array('content_type' => 'text/plain')); array('content_type' => 'text/plain'));
$result = $channel->basic_publish($msg, '', 'supplier_zhuanmai_update'); $channel->basic_publish($msg, '', 'supplier_zhuanmai_update');
} }
} }
......
...@@ -3,9 +3,12 @@ ...@@ -3,9 +3,12 @@
namespace App\Http\Services; namespace App\Http\Services;
use App\Model\BrandModel;
use App\Model\DepartmentModel; use App\Model\DepartmentModel;
use App\Model\SupplierChannelModel;
use App\Model\SupplierContactModel;
use App\Model\UserInfoModel; use App\Model\UserInfoModel;
use DB; use Illuminate\Support\Facades\DB;
//部门数据服务 //部门数据服务
class DepartmentService class DepartmentService
......
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