-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDictMapper.xml
More file actions
28 lines (25 loc) · 788 Bytes
/
Copy pathDictMapper.xml
File metadata and controls
28 lines (25 loc) · 788 Bytes
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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.demo.mapper.SysDictMapper">
<select id="getDictByCode" resultType="com.example.demo.model.SysDict">
select
id,data_type as dataType,data_code as dataCode,data_value as dataValue,create_time as createTime
from sys_dict
where data_code=#{dataCode}
</select>
<insert id="addDict"
parameterType="com.example.demo.model.SysDict">
insert into sys_dict(
data_type,data_code,data_value,create_time
)
values
(
#{dataType},
#{dataCode},
#{dataValue},
now()
)
</insert>
</mapper>