| | |
| | | <!--查询体温数据的分页数据--> |
| | | <select id="selectAnimalHeatPageList" resultType="org.springblade.jfpt.animalheat.entity.BladeAnimalHeat"> |
| | | SELECT * FROM blade_animal_heat |
| | | <if test="animalHeatVo.begTime!=null and animalHeatVo.begTime!=''"> |
| | | and create_time >=#{animalHeatVo.begTime} |
| | | where 1=1 |
| | | <if test="animalHeatVo.type==0"> |
| | | and to_days(create_time)=to_days(now()) |
| | | </if> |
| | | <if test="animalHeatVo.endTime!=null and animalHeatVo.endTime!=''"> |
| | | and create_time <=#{animalHeatVo.endTime} |
| | | <if test="animalHeatVo.type==1"> |
| | | and YEARWEEK(date_format(create_time,'%Y-%m-%d'),1) = YEARWEEK(now(),1) |
| | | </if> |
| | | <if test="animalHeatVo.type==2"> |
| | | and date_format(create_time,'%Y%m') = date_format(now(),'%Y%m') |
| | | </if> |
| | | ORDER BY create_time asc |
| | | </select> |