Browse Source

去除空格

zqwang 1 year ago
parent
commit
8bf3aa33a1

+ 3 - 0
modules/Channel/Http/Controllers/OrdersController.php

@@ -82,6 +82,9 @@ class OrdersController extends CatchController
     }
     }
 
 
     public function promotionsUsers(Request $request){
     public function promotionsUsers(Request $request){
+        $title = $request->input('name');
+        $userContext = $this->getUserContext(null);
+        $pid = 0;
 
 
     }
     }
 
 

+ 2 - 2
modules/Channel/Services/Order/OrderService.php

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