167 lines
5.4 KiB
C#
167 lines
5.4 KiB
C#
using Crm.Core.Domain.Dto.Live;
|
|
using Crm.Core.Domain.Impl;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Crm.Core.WebApi.Controllers
|
|
{
|
|
public class LiveController : BaseController
|
|
{
|
|
private readonly ILiveDomain _liveDomain;
|
|
public LiveController(ILiveDomain liveDomain)
|
|
{
|
|
_liveDomain = liveDomain;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直播课汇总表
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Summay")]
|
|
public async Task<LivePageDto<LiveUserSummayDataDto>> GetLiveUserSummayPageDto(
|
|
[FromQuery] LiveSearchUserSummayPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveUserSummayPageDto(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直播课明细表
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("RealTime")]
|
|
public async Task<LivePageDto<LiveUserRealTimeDataDto>> GetLiveUserRealTimePageDto(
|
|
[FromQuery] LiveSearchUserRealTimePageDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveUserRealTimePageDto(dto);
|
|
}
|
|
/// <summary>
|
|
/// 企微直播列表
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Wework")]
|
|
public async Task<LivePageDto<LiveUserWeworkDataDto>> GetLiveUserWeworkPageDto(
|
|
[FromQuery] LiveSearchUserWeworkPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveUserWeworkPageDto(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直播课统计
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("UserStat")]
|
|
public async Task<LiveUserStatDto> GetLiveUserStat([FromQuery] LiveSearchUserSummayPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveUserStat(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 企微直播统计
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("WeworkStat")]
|
|
public async Task<LiveWeworkStatDto> GetLiveWeworkStat([FromQuery] LiveSearchUserWeworkPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveWeworkStat(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取课程列表
|
|
/// </summary>
|
|
/// <param name="deptid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Courses")]
|
|
public async Task<List<CourseDto>> GetCourses(decimal? deptid)
|
|
{
|
|
return await _liveDomain.GetCourses(deptid);
|
|
}
|
|
/// <summary>
|
|
/// 获取产品列表(该接口返回日期范围内,多个事业部的直播课程中有用户点击过的产品列表)
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Product")]
|
|
public async Task<List<LiveCourseProductsDto>> GetLiveCourseProduct(
|
|
[FromQuery] LiveSearchCourseProductsDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveCourseProduct(dto);
|
|
}
|
|
/// <summary>
|
|
/// 获取课程树
|
|
/// </summary>
|
|
/// <param name="deptid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("ScheduleTree")]
|
|
public async Task<List<LiveScheduleDto>> GetLiveScheduleTree(decimal? deptid)
|
|
{
|
|
return await _liveDomain.GetLiveScheduleTree(deptid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 部门下拉
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("DeptMent")]
|
|
public async Task<dynamic> GetDeptMent()
|
|
{
|
|
return await _liveDomain.GetDeptMent();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 事业线下拉
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("BusinessLine")]
|
|
public async Task<dynamic> GetBusinessLine()
|
|
{
|
|
return await _liveDomain.GetBusinessLine();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 员工下拉
|
|
/// </summary>
|
|
/// <param name="groupid"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Innerusers")]
|
|
public async Task<dynamic> GetInnerusers(int? groupid)
|
|
{
|
|
return await _liveDomain.GetInnerusers(groupid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 课程统计
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("CourseSummary")]
|
|
public async Task<List<LiveCourseSummaryDto>> GetLiveCourseSummary([FromQuery] LiveSearchCourseSummaryDto dto)
|
|
{
|
|
return await _liveDomain.GetLiveCourseSummary(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直播回放数据明细统计
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Playback/Detail")]
|
|
public async Task<LivePlaybackPageDto<LivePlaybackDetailDto, LivePlaybackDetailStatDto>> GetLivePlaybackDetailPageDto([FromQuery] LivePlaybackDetailPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLivePlaybackDetailPageDto(dto);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直播回放数据汇总统计
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Playback/Summay")]
|
|
public async Task<LivePlaybackPageDto<LivePlaybackSummayDto, LivePlaybackSummayStatDto>> GetLivePlaybackSummayPageDto([FromQuery] LivePlaybackSummayPageDto dto)
|
|
{
|
|
return await _liveDomain.GetLivePlaybackSummayPageDto(dto);
|
|
}
|
|
}
|
|
}
|