SifaSsdwDictMapper.xml
3.01 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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.lhcredit.project.business.sifaSsdwDict.mapper.SifaSsdwDictMapper">
<resultMap type="SifaSsdwDict" id="SifaSsdwDictResult">
<result property="id" column="id" />
<result property="ajlx" column="ajlx" />
<result property="sljd" column="sljd" />
<result property="yz" column="yz" />
<result property="tjfl" column="tjfl" />
</resultMap>
<sql id="selectSifaSsdwDictVo">
select id, ajlx, sljd, yz, tjfl from sifa_ssdw_dict
</sql>
<select id="selectSifaSsdwDictList" parameterType="SifaSsdwDict" resultMap="SifaSsdwDictResult">
<include refid="selectSifaSsdwDictVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="ajlx != null and ajlx != '' "> and ajlx = #{ajlx}</if>
<if test="sljd != null and sljd != '' "> and sljd = #{sljd}</if>
<if test="yz != null and yz != '' "> and yz = #{yz}</if>
<if test="tjfl != null and tjfl != '' "> and tjfl = #{tjfl}</if>
</where>
</select>
<select id="selectSifaSsdwDictById" parameterType="Integer" resultMap="SifaSsdwDictResult">
<include refid="selectSifaSsdwDictVo"/>
where id = #{id}
</select>
<insert id="insertSifaSsdwDict" parameterType="SifaSsdwDict" useGeneratedKeys="true" keyProperty="id">
insert into sifa_ssdw_dict
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ajlx != null and ajlx != '' ">ajlx,</if>
<if test="sljd != null and sljd != '' ">sljd,</if>
<if test="yz != null and yz != '' ">yz,</if>
<if test="tjfl != null and tjfl != '' ">tjfl,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ajlx != null and ajlx != '' ">#{ajlx},</if>
<if test="sljd != null and sljd != '' ">#{sljd},</if>
<if test="yz != null and yz != '' ">#{yz},</if>
<if test="tjfl != null and tjfl != '' ">#{tjfl},</if>
</trim>
</insert>
<update id="updateSifaSsdwDict" parameterType="SifaSsdwDict">
update sifa_ssdw_dict
<trim prefix="SET" suffixOverrides=",">
<if test="ajlx != null and ajlx != '' ">ajlx = #{ajlx},</if>
<if test="sljd != null and sljd != '' ">sljd = #{sljd},</if>
<if test="yz != null and yz != '' ">yz = #{yz},</if>
<if test="tjfl != null and tjfl != '' ">tjfl = #{tjfl},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSifaSsdwDictById" parameterType="Integer">
delete from sifa_ssdw_dict where id = #{id}
</delete>
<delete id="deleteSifaSsdwDictByIds" parameterType="String">
delete from sifa_ssdw_dict where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>