智慧教务系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

54 lines
1.6 KiB

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\api\controller\member;
use app\service\api\member\SalaryService;
use core\base\BaseApiController;
/**
* 员工工资查询控制器
* Class Salary
* @package app\api\controller\member
*/
class Salary extends BaseApiController
{
/**
* 获取员工工资列表
* @return \think\Response
*/
public function list()
{
$data = $this->request->params([
['page', 1],
['limit', 20],
['salary_month', '']
]);
// 获取当前员工ID
$staffId = $this->request->memberId();
return success('操作成功', (new SalaryService())->getPage($data, $staffId));
}
/**
* 获取员工工资详情
* @param int $id
* @return \think\Response
*/
public function info(int $id)
{
// 获取当前员工ID
$staffId = $this->request->memberId();
return success('操作成功', (new SalaryService())->getInfo($id, $staffId));
}
}