<?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.jcdm.main.bs.beatSetting.mapper.ProductNumTableMapper">
|
|
<resultMap type="ProductNumTable" id="ProductNumTableResult">
|
<result property="id" column="id" />
|
<result property="zzOfflineNum" column="zz_offline_num" />
|
<result property="zzOnlineNum" column="zz_online_num" />
|
<result property="hxOnlineNum" column="hx_online_num" />
|
<result property="productTime" column="product_time" />
|
<result property="model" column="model" />
|
<result property="productNumTheory" column="product_num_theory" />
|
</resultMap>
|
|
<sql id="selectProductNumVo">
|
select id, zz_offline_num, zz_online_num, hx_online_num, product_time, model from product_num_table
|
</sql>
|
|
<insert id="insertProductNum">
|
INSERT INTO product_num_table (id, zz_offline_num,zz_online_num,hx_online_num,product_time,model,product_num_theory )
|
VALUES
|
<foreach collection="list" item="item" index="index" separator=",">
|
(#{item.id}, #{item.zzOfflineNum}, #{item.zzOnlineNum}, #{item.hxOnlineNum}, #{item.productTime},#{item.model},#{item.productNumTheory})
|
</foreach>
|
</insert>
|
|
<update id="updateProductNum">
|
update product_num_table
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="zzOfflineNum != null">zz_offline_num = #{zzOfflineNum},</if>
|
<if test="zzOnlineNum != null">zz_online_num = #{zzOnlineNum},</if>
|
<if test="hxOnlineNum != null ">hx_online_num = #{hxOnlineNum},</if>
|
<if test="productTime != null">product_time = #{productTime},</if>
|
<if test="model != null and model != ''">model = #{model},</if>
|
<if test="productNumTheory != null">product_num_theory = #{productNumTheory},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
|
<select id="selectProductNum" parameterType="ProductNumTable" resultMap="ProductNumTableResult">
|
<include refid="selectProductNumVo"/>
|
<where>
|
<if test="id != null and id != ''"> and id = #{id}</if>
|
<if test="zzOfflineNum != null and zzOfflineNum != ''"> and zz_offline_num = #{zzOfflineNum}</if>
|
<if test="zzOnlineNum != null and zzOnlineNum != ''"> and zz_online_num = #{zzOnlineNum}</if>
|
<if test="hxOnlineNum != null and hxOnlineNum != ''"> and hx_online_num = #{hxOnlineNum}</if>
|
<if test="productTime != null "> and product_time = #{productTime}</if>
|
<if test="model != null and model != ''"> and model = #{model}</if>
|
</where>
|
</select>
|
|
</mapper>
|