package com.example.springboot.mapper; import org.apache.ibatis.annotations.*; import com.example.springboot.entity.alarmmg; import java.util.List; @Mapper public interface AlarmMapper { @Select("SELECT * FROM alarmmg where endTime is not null and to_days(timeon)=to_days(now())") List selectAll(); @Select("SELECT count(*) FROM alarmmg where endTime is null and content=#{content}") short selectnullti(String content); @Insert("INSERT INTO `canadames`.`alarmmg`( `content`,`timeon`) VALUES ( #{content},now())") void Insertalarm(String content); @Insert("UPDATE `canadames`.`alarmmg` set endTime= now() where endTime is null and content=#{content}") void updatealarm(String content); @Select("SELECT * FROM alarmmg where timeon between #{sj1} and #{sj2}") List selecttime(String sj1, String sj2); }