1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?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.fs.qw.mapper.QwPushCountMapper">
-
- <resultMap type="QwPushCount" id="QwPushCountResult">
- <result property="id" column="id" />
- <result property="type" column="type" />
- <result property="pushCount" column="push_count" />
- <result property="companyId" column="company_id" />
- <result property="status" column="status" />
- </resultMap>
- <sql id="selectQwPushCountVo">
- select id, type, push_count, company_id, status from qw_push_count
- </sql>
- <select id="selectQwPushCountList" parameterType="QwPushCount" resultMap="QwPushCountResult">
- <include refid="selectQwPushCountVo"/>
- <where>
- <if test="type != null "> and type = #{type}</if>
- <if test="pushCount != null "> and push_count = #{pushCount}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="status != null "> and status = #{status}</if>
- </where>
- </select>
-
- <select id="selectQwPushCountById" parameterType="Long" resultMap="QwPushCountResult">
- <include refid="selectQwPushCountVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertQwPushCount" parameterType="QwPushCount" useGeneratedKeys="true" keyProperty="id">
- insert into qw_push_count
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="type != null">type,</if>
- <if test="pushCount != null">push_count,</if>
- <if test="companyId != null">company_id,</if>
- <if test="status != null">status,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="type != null">#{type},</if>
- <if test="pushCount != null">#{pushCount},</if>
- <if test="companyId != null">#{companyId},</if>
- <if test="status != null">#{status},</if>
- </trim>
- </insert>
- <update id="updateQwPushCount" parameterType="QwPushCount">
- update qw_push_count
- <trim prefix="SET" suffixOverrides=",">
- <if test="type != null">type = #{type},</if>
- <if test="pushCount != null">push_count = #{pushCount},</if>
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="status != null">status = #{status},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteQwPushCountById" parameterType="Long">
- delete from qw_push_count where id = #{id}
- </delete>
- <delete id="deleteQwPushCountByIds" parameterType="String">
- delete from qw_push_count where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|