|
@@ -187,7 +187,7 @@ class OrderService
|
|
|
{
|
|
|
$operateUser = User::find($uid);
|
|
|
$operateUserRoles = $operateUser->roles->pluck('identify');
|
|
|
- $list = DB::table('promotions')->select('id as promotion_id ', 'name');
|
|
|
+ $list = DB::table('promotions')->select('id as promotion_id', 'name');
|
|
|
if ($operateUserRoles->contains('optimizer')) {
|
|
|
if ($title) {
|
|
|
$list->where('name', 'like', "%" . $title . "%");
|
|
@@ -195,7 +195,7 @@ class OrderService
|
|
|
return $list->where('uid', $uid)->limit($limit)->get();
|
|
|
} else if ($operateUserRoles->contains('company')) {
|
|
|
$list = DB::table('promotions')->join('users', 'users.id', "promotions.uid")
|
|
|
- ->where('users.pid', $uid)->orWhere("promotions.uid", $uid)->select('promotions.id as promotion_id ', 'promotions.name');
|
|
|
+ ->where('users.pid', $uid)->orWhere("promotions.uid", $uid)->select('promotions.id as promotion_id', 'promotions.name');
|
|
|
if ($title) {
|
|
|
$list->where('promotions.name', 'like', "%" . $title . "%");
|
|
|
}
|