| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.hxzk.pojo.TbHeartRecord; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | public interface HeartDao extends BaseMapper<TbHeartRecord> { |
| | | |
| | | @Select("select count(*) from tb_heart_record where state = '超高' ") |
| | | Integer findChaoGao(); |
| | | @Select("select count(*) from tb_heart_record where state = '超低' ") |
| | | Integer findChaoDi(); |
| | | @Select("select count(*) from tb_heart_record where state = '正常' ") |
| | | Integer findZengChang(); |
| | | |
| | | //超高人员Top1 |
| | | @Select("select count(*) as tagid,name from tb_heart_record where state ='超高' group by name order by count(*) desc limit 0,1") |
| | | TbHeartRecord findChaoGaoYi(); |
| | | |
| | | |
| | | //超高人员Top2 |
| | | @Select("select count(*) as tagid,name from tb_heart_record where state ='超高' group by name order by count(*) desc limit 1,1") |
| | | TbHeartRecord findChaoGaoEr(); |
| | | |
| | | |
| | | @Select("select count(*) from tb_heart_record where state = '超低' and name = #{name} ") |
| | | Integer findChaoGaoYis(String name); |
| | | @Select("select count(*) from tb_heart_record where state ='超低' and name = #{name} ") |
| | | Integer findChaoGaoErs(String name); |
| | | |
| | | |
| | | //超高人员Top1 |
| | | @Select("select count(*) as tagid,name from tb_heart_record where state ='超低' group by name order by count(*) desc limit 0,1") |
| | | TbHeartRecord findChaoDiYi(); |
| | | //超高人员Top2 |
| | | @Select("select count(*) as tagid,name from tb_heart_record where state ='超低' group by name order by count(*) desc limit 1,1") |
| | | TbHeartRecord findChaoDiEr(); |
| | | |
| | | |
| | | @Select("select count(*) from tb_heart_record where state ='超高' and name = #{name}") |
| | | Integer findChaoDiYis(String name); |
| | | |
| | | @Select("select count(*) from tb_heart_record where state ='超高' and name = #{name}") |
| | | Integer findChaoDiErs(String name); |
| | | |
| | | |
| | | @Select("SELECT COUNT(*) FROM tb_heart_record WHERE TIME >= DATE_SUB(NOW(), INTERVAL 10 DAY) AND state = '超高' AND NAME = '' OR TIME >= DATE_SUB(NOW(), INTERVAL 10 DAY) AND state = '超低' AND NAME = #{name}") |
| | | String GuoQuDay(String name); |
| | | |
| | | @Select("SELECT COUNT(*) FROM tb_heart_record WHERE TIME >= DATE_SUB(NOW(), INTERVAL 30 DAY) AND state = '超高' AND NAME = #{name} OR TIME >= DATE_SUB(NOW(), INTERVAL 30 DAY) AND state = '超低' AND NAME = #{name}") |
| | | String GuoQuYue(String name); |
| | | |
| | | |
| | | } |