package com.gree.mall.manager.commonmapper.workorder;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.gree.mall.manager.bean.workorder.OrderBaseCountBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderBaseCMapper {

    /**
     * 工单状态统计
     * @return
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    public List<Map<String,Object>> countOrderStatus(@Param("companyWechatId") String companyWechatId,
                                                     @Param("adminWebsitIds") List<String> adminWebsitIds,
                                                     @Param("adminUserType") Integer adminUserType,
                                                     @Param("orderSmallType") String orderSmallType,
                                                     @Param("orderSmallTypeText") String orderSmallTypeText,
                                                     @Param("startTime") String startTime,
                                                     @Param("endTime") String endTime
    );

    /**
     * 工单首页的统计
     * @param companyWechatId
     * @param adminWebsitIds
     * @return
     */
    public OrderBaseCountBean countOrderBaseIndex(@Param("companyWechatId") String companyWechatId, @Param("adminWebsitIds") List<String> adminWebsitIds,@Param("adminUserType") Integer adminUserType);

    /**
     * 工单状态统计2
     * @return
     */
    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
    List<Map<String, Object>> countOrderStatus2(@Param("companyWechatId") String companyWechatId,
                                                @Param("adminWebsitIds") List<String> adminWebsitIds,
                                                @Param("adminUserType") Integer adminUserType,
                                                @Param("orderSmallTypeText") String orderSmallTypeText);


//    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
//    public List<Map<String,Long>> countLast7Day1(@Param("companyWechatId") String companyWechatId,@Param("adminWebsitIds") List<String> adminWebsitIds);
//    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
//    public List<Map<String,Long>> countLast7Day2(@Param("companyWechatId") String companyWechatId,@Param("adminWebsitIds") List<String> adminWebsitIds);
}
