LinggangVenueInfoMapper.xml
5.27 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?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.ruoyi.mapper.venue.info.LinggangVenueInfoMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.venue.info.LinggangVenueInfo">
<id column="ID" jdbcType="INTEGER" property="id"/>
<result column="park_Code" jdbcType="VARCHAR" property="parkCode"/>
<result column="park_Addr" jdbcType="VARCHAR" property="parkAddr"/>
<result column="del_flag" jdbcType="BIT" property="delFlag"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="crate_time" jdbcType="TIMESTAMP" property="crateTime"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap>
<insert id="insertSelective" keyColumn="ID" keyProperty="id" useGeneratedKeys="true"
parameterType="com.ruoyi.domain.venue.info.LinggangVenueInfo">
INSERT INTO venue_info
<include refid="insertSelectiveColumn"></include>
<include refid="insertSelectiveValue"></include>
</insert>
<insert id="insertNotExit" keyColumn="ID" keyProperty="id" useGeneratedKeys="true"
parameterType="com.ruoyi.domain.venue.info.LinggangVenueInfo">
INSERT INTO venue_info (park_Code,del_flag,name)
select #{parkCode} park_Code,#{delFlag} del_flag,#{name} name from(
select count(park_Code) c from venue_info vi where vi.park_Code =#{parkCode}
)t where t.c=0
</insert>
<sql id="columns">
ID
, park_Code , park_Addr , del_flag , create_by , crate_time , update_by , update_time , name
</sql>
<sql id="insert_columns">
ID
, park_Code , park_Addr , del_flag , create_by , crate_time , update_by , update_time , name
</sql>
<sql id="insert_values">
#{id}
,
#{parkCode},
#{parkAddr},
#{delFlag},
#{createBy},
#{crateTime},
#{updateBy},
#{updateTime},
#{name}
</sql>
<sql id="insertSelectiveColumn">
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null!=id">ID,</if>
<if test="null!=parkCode">park_Code,</if>
<if test="null!=parkAddr">park_Addr,</if>
<if test="null!=delFlag">del_flag,</if>
<if test="null!=createBy">create_by,</if>
<if test="null!=crateTime">crate_time,</if>
<if test="null!=updateBy">update_by,</if>
<if test="null!=updateTime">update_time,</if>
<if test="null!=name">name,</if>
</trim>
</sql>
<sql id="insertSelectiveValue">
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null!=id">#{id,jdbcType=INTEGER},</if>
<if test="null!=parkCode">#{parkCode,jdbcType=VARCHAR},</if>
<if test="null!=parkAddr">#{parkAddr,jdbcType=VARCHAR},</if>
<if test="null!=delFlag">#{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">#{createBy,jdbcType=VARCHAR},</if>
<if test="null!=crateTime">#{crateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateBy">#{updateBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">#{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=name">#{name,jdbcType=VARCHAR},</if>
</trim>
</sql>
<sql id="updateByPrimaryKeySelectiveSql">
<set>
<if test="null!=id">ID = #{id,jdbcType=INTEGER},</if>
<if test="null!=parkCode">park_Code = #{parkCode,jdbcType=VARCHAR},</if>
<if test="null!=parkAddr">park_Addr = #{parkAddr,jdbcType=VARCHAR},</if>
<if test="null!=delFlag">del_flag = #{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">create_by = #{createBy,jdbcType=VARCHAR},</if>
<if test="null!=crateTime">crate_time = #{crateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateBy">update_by = #{updateBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=name">name = #{name,jdbcType=VARCHAR},</if>
</set>
</sql>
<sql id="where">
<if test="null!=id">AND ID = #{id,jdbcType=INTEGER},</if>
<if test="null!=parkCode">AND park_Code = #{parkCode,jdbcType=VARCHAR},</if>
<if test="null!=parkAddr">AND park_Addr = #{parkAddr,jdbcType=VARCHAR},</if>
<if test="null!=delFlag">AND del_flag = #{delFlag,jdbcType=BIT},</if>
<if test="null!=createBy">AND create_by = #{createBy,jdbcType=VARCHAR},</if>
<if test="null!=crateTime">AND crate_time = #{crateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=updateBy">AND update_by = #{updateBy,jdbcType=VARCHAR},</if>
<if test="null!=updateTime">AND update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
<if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if>
</sql>
</mapper>