HttpSequenceMapper.java
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.ecar.apm.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.ecar.apm.model.HttpSequence;
import com.ecar.apm.model.HttpSystem;
@Mapper
public interface HttpSequenceMapper {
@Insert("INSERT INTO http_sequence(guid,`group`,`type`,`name`,remark,jobName,frequency) VALUES("
+"#{httpSequence.guid},#{httpSequence.group},#{httpSequence.type},"
+ "#{httpSequence.name},#{httpSequence.remark},#{httpSequence.jobName},#{httpSequence.frequency})")
void insert(@Param("httpSequence")HttpSequence httpSequence);
@Update("update http_sequence t set t.`group`=#{httpSequence.group},t.`type`=#{httpSequence.type},"
+ "t.`name`=#{httpSequence.name},t.remark=#{httpSequence.remark},t.frequency=#{httpSequence.frequency} WHERE t.`guid`= #{httpSequence.guid}")
void update(@Param("httpSequence")HttpSequence httpSequence);
@Select("SELECT * FROM http_sequence")
List<HttpSequence> selectAll();
@Select("select t.* from http_sequence t where t.guid=#{guid}")
HttpSequence getByGuid(@Param("guid")String guid);
@Update("UPDATE http_sequence t SET t.`enabled` = #{httpSequence.enabled} WHERE t.`guid`= #{httpSequence.guid} ")
void updateEnabled(@Param("httpSequence")HttpSequence httpSequence);
@Update("UPDATE http_sequence t SET t.`archived` = 1 WHERE t.`guid`= #{guid} ")
void archived(@Param("guid")String guid);
@Select("select t.guid,t.`group`,t.type,t.`name`,t.frequency,t.enabled from http_sequence t where t.archived = 0")
List<Map<String,Object>> selectMonitorList();
@Insert("INSERT INTO http_system(`name`) VALUES(#{httpSystem.name})")
void insertSystem(@Param("httpSystem")HttpSystem httpSystem);
@Select("select * from http_system")
List<HttpSystem> selectAllSystem();
}