SystemLogMapper.java
1.6 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
55
56
57
58
package com.uccc.log.mapper;
import com.uccc.pretty.common.SystemLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
/**
* Created by bert on 2021-09-15 13:20
*/
public interface SystemLogMapper {
static final String TABLE_NAME = "system_log";
@Insert({
"<script>",
"insert into " + TABLE_NAME,
"(",
"cts",
"<when test='systemLog.operatorId!=null'>",
",operator_id",
"</when>",
"<when test='systemLog.action!=null'>",
",action",
"</when>",
"<when test='systemLog.remark!=null'>",
",remark",
"</when>",
"<when test='systemLog.extra!=null'>",
",extra",
"</when>",
"<when test='systemLog.ip!=null'>",
",ip",
"</when>",
")",
"values",
"(",
"now()",
"<when test='systemLog.operatorId!=null'>",
",#{systemLog.operatorId}",
"</when>",
"<when test='systemLog.action!=null'>",
",#{systemLog.action}",
"</when>",
"<when test='systemLog.remark!=null'>",
",#{systemLog.remark}",
"</when>",
"<when test='systemLog.extra!=null'>",
",#{systemLog.extra}",
"</when>",
"<when test='systemLog.ip!=null'>",
",#{systemLog.ip}",
"</when>",
")",
"</script>"
})
int insertLog(@Param("systemLog") SystemLog systemLog);
}