package com.tievd.jyz.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.tievd.jyz.entity.OilStatis; import com.tievd.jyz.entity.vo.CustomerStatVO; import org.apache.ibatis.annotations.Select; /** * OilStatis * @author cube * @since 2023-02-27 * @version V2.0.0 */ public interface OilStaticMapper extends BaseMapper { /** 客户类型统计 */ @Select("select count(if(client_type=1, 1, null)) prospectCount, count(if(client_type=2, 1, null)) generalCustomerCount, count(if(client_type=3, 1, null)) loyalCustomerCount from t_oil_statis tos where tos.org_code like concat(#{orgCode}, '%')") CustomerStatVO custommerStat(String orgCode); }