作者 lyh

gx

... ... @@ -8,9 +8,9 @@ use App\Http\Logic\Aside\Manage\HrLogic;
class HrController extends BaseController
{
public function list(Request $request, HrLogic $logic)
public function list(HrLogic $logic)
{
$list = $logic->getList($this->param);
$list = $logic->getList($this->map,$this->page,$this->row,$this->order);
return $this->response('success', Code::SUCCESS, $list);
}
... ... @@ -21,7 +21,6 @@ class HrController extends BaseController
'id.required' => 'ID不能为空'
]);
$data = $logic->getInfo($this->param['id']);
//print_r($data);exit;
return $this->success($data);
}
... ...
... ... @@ -24,15 +24,9 @@ class HrLogic extends BaseLogic
$this->model = new ManageHr();
}
public function getList(array $param = [], array $sort = ['id' => 'desc'], array $columns = ['*'], int $limit = 20){
$search = isset($param['search'])?$param['search']:'';
$pagesize = isset($param['pagesize'])?$param['pagesize']:20;
$map = [];
if($search){
$map[] = ['name','like','%'.$search.'%'];
}
$list = parent::getList($map, $sort, $columns, $pagesize);
return $list;
public function getList($map,$page,$row,$order = 'id',$filed = ['*']){
$lists = $this->model->lists($map,$page,$row,$order,$filed);
return $this->success($lists);
}
public function save($param){
... ... @@ -73,7 +67,7 @@ class HrLogic extends BaseLogic
$data['entry_position'] = $this->entryPositionList();
$data['p_level'] = $this->pLevel();
$data['political_outlook'] = $this->politicalOutlook();
$data['partyBranch'] = $this->IsPartyBranch();
$data['party_branch'] = $this->IsPartyBranch();
return $data;
}
... ...