智慧教务系统
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.
 
 
 
 
 
 

60 lines
1.8 KiB

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\service\admin\service_logs;
use app\model\service_logs\ServiceLogs;
use core\base\BaseAdminService;
/**
* 学员课时消费记录服务层
* Class StudentCourseUsageService
* @package app\service\admin\student_course_usage
*/
class ServiceLogsService extends BaseAdminService
{
public function __construct()
{
parent::__construct();
$this->model = new ServiceLogs();
}
/**
* 获取学员课时消费记录列表
* @return array
*/
public function getPage(array $data = [])
{
$where = [];
if($data['name']){
$where[] = ['b.name','like','%'.$data['name'].'%'];
}
if($data['score']){
$where[] = ['a.score','=',$data['score']];
}
$search_model = $this->model
->alias("a")
->join(['school_customer_resources' => 'b'],'a.resource_id = b.id','left')
->join(['school_personnel' => 'c'],'a.staff_id = c.id','left')
->join(['school_service' => 'd'],'a.service_id = d.id','left')
->where($where)
->field("a.*,b.name,c.name as staff_name,d.service_name,d.customer_confirmation")
->order("a.id desc");
$list = $this->pageQuery($search_model);
return $list;
}
}