package com.cyksj.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.CustomerServiceRenewOrderRecord;
import com.cyksj.model.views.CustomerServiceHandleOrderToMonthView;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
 *项目名: netflix
 *文件名: CustomerServiceRenewOrderRecordMapper
 *创建者: JavaZou
 *创建时间:2022/12/30 14:33
 */
public interface CustomerServiceRenewOrderRecordMapper extends BaseMapper<CustomerServiceRenewOrderRecord> {
	@Select("select count(*) as numOfOrder,customer_service as renewServiceName from customer_service_renew_order_record where created_time between #{begin} and #{now} group by customer_service order by customer_service")
	List<CustomerServiceHandleOrderToMonthView> selectCustomerToMonthData(@Param("now") DateTime now, @Param("begin") DateTime begin, @Param("type") Integer type);
}
