提交 | 用户 | 时间
|
2c65c3
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
W |
2 |
<!DOCTYPE mapper |
|
3 |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
4 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
5 |
<mapper namespace="com.jcdm.main.bs.beatSetting.mapper.ProductNumTableMapper"> |
|
6 |
|
|
7 |
<resultMap type="ProductNumTable" id="ProductNumTableResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="zzOfflineNum" column="zz_offline_num" /> |
|
10 |
<result property="zzOnlineNum" column="zz_online_num" /> |
|
11 |
<result property="hxOnlineNum" column="hx_online_num" /> |
|
12 |
<result property="productTime" column="product_time" /> |
|
13 |
<result property="model" column="model" /> |
|
14 |
<result property="productNumTheory" column="product_num_theory" /> |
|
15 |
</resultMap> |
|
16 |
|
|
17 |
<sql id="selectProductNumVo"> |
|
18 |
select id, zz_offline_num, zz_online_num, hx_online_num, product_time, model from product_num_table |
|
19 |
</sql> |
|
20 |
|
|
21 |
<insert id="insertProductNum"> |
|
22 |
INSERT INTO product_num_table (id, zz_offline_num,zz_online_num,hx_online_num,product_time,model,product_num_theory ) |
|
23 |
VALUES |
|
24 |
<foreach collection="list" item="item" index="index" separator=","> |
|
25 |
(#{item.id}, #{item.zzOfflineNum}, #{item.zzOnlineNum}, #{item.hxOnlineNum}, #{item.productTime},#{item.model},#{item.productNumTheory}) |
|
26 |
</foreach> |
|
27 |
</insert> |
|
28 |
|
|
29 |
<update id="updateProductNum"> |
|
30 |
update product_num_table |
|
31 |
<trim prefix="SET" suffixOverrides=","> |
|
32 |
<if test="zzOfflineNum != null">zz_offline_num = #{zzOfflineNum},</if> |
|
33 |
<if test="zzOnlineNum != null">zz_online_num = #{zzOnlineNum},</if> |
|
34 |
<if test="hxOnlineNum != null ">hx_online_num = #{hxOnlineNum},</if> |
|
35 |
<if test="productTime != null">product_time = #{productTime},</if> |
|
36 |
<if test="model != null and model != ''">model = #{model},</if> |
|
37 |
<if test="productNumTheory != null">product_num_theory = #{productNumTheory},</if> |
|
38 |
</trim> |
|
39 |
where id = #{id} |
|
40 |
</update> |
|
41 |
|
|
42 |
|
|
43 |
<select id="selectProductNum" parameterType="ProductNumTable" resultMap="ProductNumTableResult"> |
|
44 |
<include refid="selectProductNumVo"/> |
|
45 |
<where> |
|
46 |
<if test="id != null and id != ''"> and id = #{id}</if> |
|
47 |
<if test="zzOfflineNum != null and zzOfflineNum != ''"> and zz_offline_num = #{zzOfflineNum}</if> |
|
48 |
<if test="zzOnlineNum != null and zzOnlineNum != ''"> and zz_online_num = #{zzOnlineNum}</if> |
|
49 |
<if test="hxOnlineNum != null and hxOnlineNum != ''"> and hx_online_num = #{hxOnlineNum}</if> |
|
50 |
<if test="productTime != null "> and product_time = #{productTime}</if> |
|
51 |
<if test="model != null and model != ''"> and model = #{model}</if> |
|
52 |
</where> |
|
53 |
</select> |
|
54 |
|
|
55 |
</mapper> |