|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
3
|
+<mapper namespace="com.yohoufo.dal.order.MetaConfigMapper">
|
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.MetaConfig">
|
|
|
5
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
6
|
+ <result column="code" jdbcType="VARCHAR" property="code" />
|
|
|
7
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
8
|
+ <result column="value" jdbcType="VARCHAR" property="value" />
|
|
|
9
|
+ <result column="create_time" jdbcType="INTEGER" property="createTime" />
|
|
|
10
|
+ <result column="desc" jdbcType="VARCHAR" property="desc" />
|
|
|
11
|
+ </resultMap>
|
|
|
12
|
+ <sql id="Base_Column_List">
|
|
|
13
|
+ id, code, title, value, create_time, desc
|
|
|
14
|
+ </sql>
|
|
|
15
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
16
|
+ select
|
|
|
17
|
+ <include refid="Base_Column_List" />
|
|
|
18
|
+ from meta_config
|
|
|
19
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
20
|
+ </select>
|
|
|
21
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
22
|
+ delete from meta_config
|
|
|
23
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
24
|
+ </delete>
|
|
|
25
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.MetaConfig" useGeneratedKeys="true">
|
|
|
26
|
+ insert into meta_config (code, title, value,
|
|
|
27
|
+ create_time, desc)
|
|
|
28
|
+ values (#{code,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
|
|
|
29
|
+ #{createTime,jdbcType=INTEGER}, #{desc,jdbcType=VARCHAR})
|
|
|
30
|
+ </insert>
|
|
|
31
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yohoufo.dal.order.model.MetaConfig" useGeneratedKeys="true">
|
|
|
32
|
+ insert into meta_config
|
|
|
33
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
34
|
+ <if test="code != null">
|
|
|
35
|
+ code,
|
|
|
36
|
+ </if>
|
|
|
37
|
+ <if test="title != null">
|
|
|
38
|
+ title,
|
|
|
39
|
+ </if>
|
|
|
40
|
+ <if test="value != null">
|
|
|
41
|
+ value,
|
|
|
42
|
+ </if>
|
|
|
43
|
+ <if test="createTime != null">
|
|
|
44
|
+ create_time,
|
|
|
45
|
+ </if>
|
|
|
46
|
+ <if test="desc != null">
|
|
|
47
|
+ desc,
|
|
|
48
|
+ </if>
|
|
|
49
|
+ </trim>
|
|
|
50
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
51
|
+ <if test="code != null">
|
|
|
52
|
+ #{code,jdbcType=VARCHAR},
|
|
|
53
|
+ </if>
|
|
|
54
|
+ <if test="title != null">
|
|
|
55
|
+ #{title,jdbcType=VARCHAR},
|
|
|
56
|
+ </if>
|
|
|
57
|
+ <if test="value != null">
|
|
|
58
|
+ #{value,jdbcType=VARCHAR},
|
|
|
59
|
+ </if>
|
|
|
60
|
+ <if test="createTime != null">
|
|
|
61
|
+ #{createTime,jdbcType=INTEGER},
|
|
|
62
|
+ </if>
|
|
|
63
|
+ <if test="desc != null">
|
|
|
64
|
+ #{desc,jdbcType=VARCHAR},
|
|
|
65
|
+ </if>
|
|
|
66
|
+ </trim>
|
|
|
67
|
+ </insert>
|
|
|
68
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.yohoufo.dal.order.model.MetaConfig">
|
|
|
69
|
+ update meta_config
|
|
|
70
|
+ <set>
|
|
|
71
|
+ <if test="code != null">
|
|
|
72
|
+ code = #{code,jdbcType=VARCHAR},
|
|
|
73
|
+ </if>
|
|
|
74
|
+ <if test="title != null">
|
|
|
75
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
76
|
+ </if>
|
|
|
77
|
+ <if test="value != null">
|
|
|
78
|
+ value = #{value,jdbcType=VARCHAR},
|
|
|
79
|
+ </if>
|
|
|
80
|
+ <if test="createTime != null">
|
|
|
81
|
+ create_time = #{createTime,jdbcType=INTEGER},
|
|
|
82
|
+ </if>
|
|
|
83
|
+ <if test="desc != null">
|
|
|
84
|
+ desc = #{desc,jdbcType=VARCHAR},
|
|
|
85
|
+ </if>
|
|
|
86
|
+ </set>
|
|
|
87
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
88
|
+ </update>
|
|
|
89
|
+ <update id="updateByPrimaryKey" parameterType="com.yohoufo.dal.order.model.MetaConfig">
|
|
|
90
|
+ update meta_config
|
|
|
91
|
+ set code = #{code,jdbcType=VARCHAR},
|
|
|
92
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
93
|
+ value = #{value,jdbcType=VARCHAR},
|
|
|
94
|
+ create_time = #{createTime,jdbcType=INTEGER},
|
|
|
95
|
+ desc = #{desc,jdbcType=VARCHAR}
|
|
|
96
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
97
|
+ </update>
|
|
|
98
|
+</mapper> |