peng
2026-03-25 2e5c2bc2b7afc7926ec441ff083acd179cb29fc6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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<OilStatis> {
 
    /** 客户类型统计 */
    @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);
 
}