package cn.cetc54.platform.zhyl.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import cn.cetc54.platform.zhyl.entity.SubsidyPersonStatics;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 测试数据处理层
|
* @author
|
*/
|
public interface SubsidyPersonStaticsMapper extends BaseMapper<SubsidyPersonStatics> {
|
/**
|
* 获取每月新增和退出的历史数据
|
* @param type
|
* @return
|
*/
|
@Select("<script>" +
|
"select month,SUM(month_add) as mAdd,SUM(month_out) as mOut,SUM(check_num) as checkNum,SUM(total_num) as totalName " +
|
"FROM t_yl_subsidy_person_statics " +
|
" <where> " +
|
"area_id = #{areaId} " +
|
" <if test='type!= null'>" +
|
" and subsidy_type = #{type}" +
|
" </if>" +
|
" </where>" +
|
"GROUP BY month ORDER BY month DESC LIMIT 12" +
|
" </script>")
|
List<Map<String,Object>> getMonthAddOut(@Param("areaId") String areaId,@Param("type") Integer type);
|
}
|