正在显示
7 个修改的文件
包含
32 行增加
和
3 行删除
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | +<<<<<<< HEAD | ||
| 4 | +namespace App\Http\Controllers\Bside; | ||
| 5 | +======= | ||
| 3 | namespace App\Http\Controllers\Aside; | 6 | namespace App\Http\Controllers\Aside; |
| 4 | 7 | ||
| 5 | use App\Http\Controllers\Aside\BaseController; | 8 | use App\Http\Controllers\Aside\BaseController; |
| 9 | +>>>>>>> 5bb365e2828ceec83c8a52553d6f4c44a1e1785f | ||
| 6 | 10 | ||
| 7 | class ManagerController extends BaseController | 11 | class ManagerController extends BaseController |
| 8 | { | 12 | { |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | +<<<<<<< HEAD | ||
| 4 | +namespace App\Http\Controllers\Bside; | ||
| 5 | +======= | ||
| 3 | namespace App\Http\Controllers\Aside; | 6 | namespace App\Http\Controllers\Aside; |
| 7 | +>>>>>>> 5bb365e2828ceec83c8a52553d6f4c44a1e1785f | ||
| 4 | 8 | ||
| 5 | 9 | ||
| 6 | 10 | ||
| 7 | use App\Enums\Common\Code; | 11 | use App\Enums\Common\Code; |
| 12 | +<<<<<<< HEAD | ||
| 13 | +======= | ||
| 8 | use App\Http\Controllers\Aside\BaseController; | 14 | use App\Http\Controllers\Aside\BaseController; |
| 15 | +>>>>>>> 5bb365e2828ceec83c8a52553d6f4c44a1e1785f | ||
| 9 | 16 | ||
| 10 | class MenuController extends BaseController | 17 | class MenuController extends BaseController |
| 11 | { | 18 | { |
| 12 | public function lists(){ | 19 | public function lists(){ |
| 13 | //TODO::搜索参数处理 | 20 | //TODO::搜索参数处理 |
| 21 | +<<<<<<< HEAD | ||
| 22 | + $userLogic = new UserLogic(); | ||
| 23 | + $lists = $userLogic->lists($this->map,$this->p,$this->row,$this->order,['id','name','mobile']); | ||
| 24 | + if(empty($lists)){ | ||
| 25 | + $this->response('请求失败',Code::USER_ERROR,[]); | ||
| 26 | + } | ||
| 27 | + $this->result($lists); | ||
| 28 | +======= | ||
| 29 | +>>>>>>> 5bb365e2828ceec83c8a52553d6f4c44a1e1785f | ||
| 14 | } | 30 | } |
| 15 | } | 31 | } |
| @@ -2,6 +2,11 @@ | @@ -2,6 +2,11 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Http\Controllers\Aside; | 3 | namespace App\Http\Controllers\Aside; |
| 4 | 4 | ||
| 5 | +<<<<<<< HEAD | ||
| 6 | +class ProjectMenuController | ||
| 7 | +{ | ||
| 8 | + | ||
| 9 | +======= | ||
| 5 | use App\Enums\Common\Code; | 10 | use App\Enums\Common\Code; |
| 6 | use App\Models\ProjectMenu as ProjectMenuModel; | 11 | use App\Models\ProjectMenu as ProjectMenuModel; |
| 7 | use Illuminate\Support\Facades\Validator; | 12 | use Illuminate\Support\Facades\Validator; |
| @@ -112,4 +117,5 @@ class ProjectMenuController extends BaseController | @@ -112,4 +117,5 @@ class ProjectMenuController extends BaseController | ||
| 112 | } | 117 | } |
| 113 | $this->response($this->param['status'] == 0 ? '启用成功' : '禁用成功',Code::SUCCESS); | 118 | $this->response($this->param['status'] == 0 ? '启用成功' : '禁用成功',Code::SUCCESS); |
| 114 | } | 119 | } |
| 120 | +>>>>>>> 5bb365e2828ceec83c8a52553d6f4c44a1e1785f | ||
| 115 | } | 121 | } |
| @@ -18,7 +18,7 @@ class Base extends Model | @@ -18,7 +18,7 @@ class Base extends Model | ||
| 18 | public function lists($map, $p, $row, $order = 'id', $fields = ['*']){ | 18 | public function lists($map, $p, $row, $order = 'id', $fields = ['*']){ |
| 19 | //TODO::where(['id'=>'','name'=>'']) | 19 | //TODO::where(['id'=>'','name'=>'']) |
| 20 | $lists = $this->select($fields)->where($map)->forPage($p,$row)->orderBy($order)->get(); | 20 | $lists = $this->select($fields)->where($map)->forPage($p,$row)->orderBy($order)->get(); |
| 21 | - if ($lists->isEmpty() !== false) { | 21 | + if (empty($lists)) { |
| 22 | return false; | 22 | return false; |
| 23 | } | 23 | } |
| 24 | $lists = $lists->toArray(); | 24 | $lists = $lists->toArray(); |
| @@ -38,7 +38,7 @@ class Base extends Model | @@ -38,7 +38,7 @@ class Base extends Model | ||
| 38 | */ | 38 | */ |
| 39 | public function list($map,$order = 'id',$fields = ['*']){ | 39 | public function list($map,$order = 'id',$fields = ['*']){ |
| 40 | $lists = $this->select($fields)->where($map)->orderBy($order)->get(); | 40 | $lists = $this->select($fields)->where($map)->orderBy($order)->get(); |
| 41 | - if ($lists->isEmpty() !== false) { | 41 | + if (empty($lists)) { |
| 42 | return false; | 42 | return false; |
| 43 | } | 43 | } |
| 44 | $lists = $lists->toArray(); | 44 | $lists = $lists->toArray(); |
| @@ -54,7 +54,7 @@ class Base extends Model | @@ -54,7 +54,7 @@ class Base extends Model | ||
| 54 | public function read($condition,$files = ['*']) | 54 | public function read($condition,$files = ['*']) |
| 55 | { | 55 | { |
| 56 | $info = $this->select($files)->where($condition)->first(); | 56 | $info = $this->select($files)->where($condition)->first(); |
| 57 | - if ($info->isEmpty() !== false) { | 57 | + if (empty($info)) { |
| 58 | return false; | 58 | return false; |
| 59 | } | 59 | } |
| 60 | $info = $info->toArray(); | 60 | $info = $info->toArray(); |
| @@ -8,4 +8,5 @@ class Product extends Base | @@ -8,4 +8,5 @@ class Product extends Base | ||
| 8 | protected $table = 'gl_product'; | 8 | protected $table = 'gl_product'; |
| 9 | //自动维护create_at创建时间 updated_at修改时间 | 9 | //自动维护create_at创建时间 updated_at修改时间 |
| 10 | public $timestamps = true; | 10 | public $timestamps = true; |
| 11 | + | ||
| 11 | } | 12 | } |
| @@ -10,6 +10,7 @@ class Project extends Base | @@ -10,6 +10,7 @@ class Project extends Base | ||
| 10 | protected $table = 'gl_project'; | 10 | protected $table = 'gl_project'; |
| 11 | //自动维护create_at创建时间 updated_at修改时间 | 11 | //自动维护create_at创建时间 updated_at修改时间 |
| 12 | public $timestamps = true; | 12 | public $timestamps = true; |
| 13 | + protected $dateFormat = 'Y-m-d'; | ||
| 13 | 14 | ||
| 14 | /** | 15 | /** |
| 15 | * @name:获取当前对象不分页列表 | 16 | * @name:获取当前对象不分页列表 |
-
请 注册 或 登录 后发表评论