QueryWrapper<IuNotice> queryWrapper =newQueryWrapper<>();
queryWrapper.select("count(*) as noticeNumber,"+"standard_project_name as standardProjectName,"+"modality as modality ,standard_second_body_part as standardSecondBodyPart").groupBy("standard_project_name,modality,standard_second_body_part").eq("operate_type_id", checkAnalysisVo.getOperateTypeId()).eq(StringUtils.isNotEmpty(checkAnalysisVo.getModality()),"modality", checkAnalysisVo.getModality()).ge("notice_time", checkAnalysisVo.getStartTime()).lt("notice_time", checkAnalysisVo.getEndTime()).like(StringUtils.isNotEmpty(checkAnalysisVo.getStandardProjectName()),"standard_project_name", checkAnalysisVo.getStandardProjectName()).like(StringUtils.isNotEmpty(checkAnalysisVo.getStandardSecondBodyPart()),"standard_second_body_part", checkAnalysisVo.getStandardSecondBodyPart()).orderByDesc("noticeNumber");
//mp中使用的一些方法.last("limit 5")//取五条.isNotNull("standard_project_name")//is not null.ne("standard_project_name","")//不等于.ge("operate_time", checkAnalysisVo.getStartTime())//大于等于 gt是大于.lt("operate_time", checkAnalysisVo.getEndTime())//小于 le是小于等于
2.注解的方式实现
//注解的方式实现@DS("clickhouse")@Select("select count(his_user_id) from iu_digital_images_analysis.iu_operate "+"where hospital_id=#{hospitalId} and operate_type_id=#{operateTypeId}")IntegerqueryCountUseTimesByHospitalId(@Param("operateTypeId")String operateTypeId,@Param("hospitalId")String hospitalId);