clll
2023-09-07 6cc8a44f0d321d77fc8d7b908ae7e0c55d53a919
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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")
  List<alarmmg> 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);
}