1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package com.nokia.financeapi.dao.car;
- import com.nokia.financeapi.pojo.dto.GetCarNoticeDto;
- import com.nokia.financeapi.pojo.dto.GetCarTypeStatDto;
- import com.nokia.financeapi.pojo.vo.GetCarNoticeVo;
- import com.nokia.financeapi.pojo.vo.GetCarTypeStatVo;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import java.util.List;
- @Mapper
- public interface CarResourceMapMapper {
- /**
- * 获取公告
- */
- @Select("""
- select * from car.notices
- where city = #{dto.city}
- order by create_time desc
- """)
- List<GetCarNoticeVo> getNotice(@Param("dto") GetCarNoticeDto dto);
- /**
- * 获取全省或某个地市的车辆类型统计
- */
- @Select("""
- <script>
- select
- count(che_liang_lei_xing = '皮卡车' or null) as pkc,
- count(che_liang_lei_xing = '微型面包车' or null) as wxmbc,
- count(che_liang_lei_xing = '越野车' or null) as yyc,
- count(che_liang_lei_xing = '轿车' or null) as jc,
- count(che_liang_lei_xing not in ('皮卡车', '微型面包车', '越野车', '轿车') or null) as qtc
- from
- car.car_base_data_month
- where
- nian_yue = (
- select
- max(nian_yue)
- from
- car.car_base_data_month)
- <if test="dto.city != null and dto.city != ''">
- and city = #{dto.city}
- </if>
- </script>
- """)
- GetCarTypeStatVo getCarTypeStat(@Param("dto") GetCarTypeStatDto dto);
- }
|