SettingPrintMapper.xml
7.43 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?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.diligrp.etrade.admin.dao.SettingPrintMapper">
<resultMap id="BaseResultMap" type="com.diligrp.etrade.admin.model.SettingPrint">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="marketId" column="market_id" jdbcType="BIGINT"/>
<result property="sellerId" column="seller_id" jdbcType="BIGINT"/>
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="deviceId" column="device_id" jdbcType="BIGINT"/>
<result property="printSwitch" column="print_switch" jdbcType="TINYINT"/>
<result property="printNumber" column="print_number" jdbcType="TINYINT"/>
<result property="printType" column="print_type" jdbcType="TINYINT"/>
<result property="createdTime" column="created_time" jdbcType="TIMESTAMP"/>
<result property="modifiedTime" column="modified_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,market_id,seller_id,
shop_id,device_id,print_switch,
print_number,print_type,created_time,
modified_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from setting_print
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByProperty" resultType="com.diligrp.etrade.admin.model.SettingPrint">
select * from setting_print
<where>
1=1
<if test="marketId != null">
and market_id = #{marketId,jdbcType=BIGINT}
</if>
<if test="sellerId != null">
and seller_id = #{sellerId,jdbcType=BIGINT}
</if>
<if test="shopId != null">
and shop_id = #{shopId,jdbcType=BIGINT}
</if>
<if test="deviceId != null">
and device_id = #{deviceId,jdbcType=BIGINT}
</if>
<if test="printSwitch != null">
and print_switch = #{printSwitch,jdbcType=TINYINT}
</if>
<if test="printNumber != null">
and print_number = #{printNumber,jdbcType=TINYINT}
</if>
<if test="printType != null">
and print_type = #{printType,jdbcType=TINYINT}
</if>
<if test="createdTime != null">
and created_time = #{createdTime,jdbcType=TIMESTAMP}
</if>
<if test="modifiedTime != null">
and modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from setting_print
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.diligrp.etrade.admin.model.SettingPrint" useGeneratedKeys="true">
insert into setting_print
( id,market_id,seller_id
,shop_id,device_id,print_switch
,print_number,print_type,created_time
,modified_time)
values (#{id,jdbcType=BIGINT},#{marketId,jdbcType=BIGINT},#{sellerId,jdbcType=BIGINT}
,#{shopId,jdbcType=BIGINT},#{deviceId,jdbcType=BIGINT},#{printSwitch,jdbcType=TINYINT}
,#{printNumber,jdbcType=TINYINT},#{printType,jdbcType=TINYINT},#{createdTime,jdbcType=TIMESTAMP}
,#{modifiedTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.diligrp.etrade.admin.model.SettingPrint" useGeneratedKeys="true">
insert into setting_print
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="marketId != null">market_id,</if>
<if test="sellerId != null">seller_id,</if>
<if test="shopId != null">shop_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="printSwitch != null">print_switch,</if>
<if test="printNumber != null">print_number,</if>
<if test="printType != null">print_type,</if>
<if test="createdTime != null">created_time,</if>
<if test="modifiedTime != null">modified_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=BIGINT},</if>
<if test="marketId != null">#{marketId,jdbcType=BIGINT},</if>
<if test="sellerId != null">#{sellerId,jdbcType=BIGINT},</if>
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
<if test="deviceId != null">#{deviceId,jdbcType=BIGINT},</if>
<if test="printSwitch != null">#{printSwitch,jdbcType=TINYINT},</if>
<if test="printNumber != null">#{printNumber,jdbcType=TINYINT},</if>
<if test="printType != null">#{printType,jdbcType=TINYINT},</if>
<if test="createdTime != null">#{createdTime,jdbcType=TIMESTAMP},</if>
<if test="modifiedTime != null">#{modifiedTime,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.diligrp.etrade.admin.model.SettingPrint">
update setting_print
<set>
<if test="marketId != null">
market_id = #{marketId,jdbcType=BIGINT},
</if>
<if test="sellerId != null">
seller_id = #{sellerId,jdbcType=BIGINT},
</if>
<if test="shopId != null">
shop_id = #{shopId,jdbcType=BIGINT},
</if>
<if test="deviceId != null">
device_id = #{deviceId,jdbcType=BIGINT},
</if>
<if test="printSwitch != null">
print_switch = #{printSwitch,jdbcType=TINYINT},
</if>
<if test="printNumber != null">
print_number = #{printNumber,jdbcType=TINYINT},
</if>
<if test="printType != null">
print_type = #{printType,jdbcType=TINYINT},
</if>
<if test="createdTime != null">
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedTime != null">
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.diligrp.etrade.admin.model.SettingPrint">
update setting_print
set
market_id = #{marketId,jdbcType=BIGINT},
seller_id = #{sellerId,jdbcType=BIGINT},
shop_id = #{shopId,jdbcType=BIGINT},
device_id = #{deviceId,jdbcType=BIGINT},
print_switch = #{printSwitch,jdbcType=TINYINT},
print_number = #{printNumber,jdbcType=TINYINT},
print_type = #{printType,jdbcType=TINYINT},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>