|
|
@@ -0,0 +1,149 @@
|
|
|
+<?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.SignRedPacketRecordMapper">
|
|
|
+
|
|
|
+ <resultMap type="SignRedPacketRecord" id="SignRedPacketRecordResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="signUrl" column="sign_url" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="outBatchNo" column="out_batch_no" />
|
|
|
+ <result property="result" column="result" />
|
|
|
+ <result property="batchId" column="batch_id" />
|
|
|
+ <result property="collectTag" column="collect_tag" />
|
|
|
+ <result property="amount" column="amount" />
|
|
|
+ <result property="sendTime" column="send_time" />
|
|
|
+ <result property="collectTime" column="collect_time" />
|
|
|
+ <result property="collectType" column="collect_type" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
+ <result property="qwUserId" column="qw_user_id" />
|
|
|
+ <result property="qwUserName" column="qw_user_name" />
|
|
|
+ <result property="articleId" column="article_id" />
|
|
|
+ <result property="signType" column="sign_type" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectSignRedPacketRecordVo">
|
|
|
+ select id, sign_url, user_id, out_batch_no, result, batch_id, collect_tag, amount, send_time, collect_time, collect_type, update_time, create_time, user_name, company_user_id, company_id, company_name, qw_user_id, qw_user_name,article_id,sign_type from sign_red_packet_record
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectSignRedPacketRecordList" parameterType="SignRedPacketRecord" resultMap="SignRedPacketRecordResult">
|
|
|
+ <include refid="selectSignRedPacketRecordVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="signUrl != null and signUrl != ''"> and sign_url = #{signUrl}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="outBatchNo != null and outBatchNo != ''"> and out_batch_no = #{outBatchNo}</if>
|
|
|
+ <if test="result != null and result != ''"> and result = #{result}</if>
|
|
|
+ <if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
|
|
+ <if test="collectTag != null "> and collect_tag = #{collectTag}</if>
|
|
|
+ <if test="amount != null "> and amount = #{amount}</if>
|
|
|
+ <if test="sendTime != null "> and send_time = #{sendTime}</if>
|
|
|
+ <if test="collectTime != null "> and collect_time = #{collectTime}</if>
|
|
|
+ <if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
|
|
|
+ <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
+ <if test="qwUserId != null and qwUserId != ''"> and qw_user_id = #{qwUserId}</if>
|
|
|
+ <if test="qwUserName != null and qwUserName != ''"> and qw_user_name like concat('%', #{qwUserName}, '%')</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSignRedPacketRecordById" parameterType="Long" resultMap="SignRedPacketRecordResult">
|
|
|
+ <include refid="selectSignRedPacketRecordVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSignRedPacketRecord" parameterType="SignRedPacketRecord">
|
|
|
+ insert into sign_red_packet_record
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="signUrl != null">sign_url,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="outBatchNo != null">out_batch_no,</if>
|
|
|
+ <if test="result != null">result,</if>
|
|
|
+ <if test="batchId != null">batch_id,</if>
|
|
|
+ <if test="collectTag != null">collect_tag,</if>
|
|
|
+ <if test="amount != null">amount,</if>
|
|
|
+ <if test="sendTime != null">send_time,</if>
|
|
|
+ <if test="collectTime != null">collect_time,</if>
|
|
|
+ <if test="collectType != null">collect_type,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="userName != null">user_name,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
|
+ <if test="qwUserId != null">qw_user_id,</if>
|
|
|
+ <if test="qwUserName != null">qw_user_name,</if>
|
|
|
+ <if test="articleId != null">article_id,</if>
|
|
|
+ <if test="signType != null">sign_type,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="signUrl != null">#{signUrl},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="outBatchNo != null">#{outBatchNo},</if>
|
|
|
+ <if test="result != null">#{result},</if>
|
|
|
+ <if test="batchId != null">#{batchId},</if>
|
|
|
+ <if test="collectTag != null">#{collectTag},</if>
|
|
|
+ <if test="amount != null">#{amount},</if>
|
|
|
+ <if test="sendTime != null">#{sendTime},</if>
|
|
|
+ <if test="collectTime != null">#{collectTime},</if>
|
|
|
+ <if test="collectType != null">#{collectType},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="userName != null">#{userName},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
|
+ <if test="qwUserId != null">#{qwUserId},</if>
|
|
|
+ <if test="qwUserName != null">#{qwUserName},</if>
|
|
|
+ <if test="articleId != null">#{articleId},</if>
|
|
|
+ <if test="signType != null">#{signType},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateSignRedPacketRecord" parameterType="SignRedPacketRecord">
|
|
|
+ update sign_red_packet_record
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="signUrl != null">sign_url = #{signUrl},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="outBatchNo != null">out_batch_no = #{outBatchNo},</if>
|
|
|
+ <if test="result != null">result = #{result},</if>
|
|
|
+ <if test="batchId != null">batch_id = #{batchId},</if>
|
|
|
+ <if test="collectTag != null">collect_tag = #{collectTag},</if>
|
|
|
+ <if test="amount != null">amount = #{amount},</if>
|
|
|
+ <if test="sendTime != null">send_time = #{sendTime},</if>
|
|
|
+ <if test="collectTime != null">collect_time = #{collectTime},</if>
|
|
|
+ <if test="collectType != null">collect_type = #{collectType},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="userName != null">user_name = #{userName},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
|
+ <if test="qwUserId != null">qw_user_id = #{qwUserId},</if>
|
|
|
+ <if test="qwUserName != null">qw_user_name = #{qwUserName},</if>
|
|
|
+ <if test="articleId != null">article_id = #{articleId},</if>
|
|
|
+ <if test="signtype != null">sign_type = #{signtype},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteSignRedPacketRecordById" parameterType="Long">
|
|
|
+ delete from sign_red_packet_record where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteSignRedPacketRecordByIds" parameterType="String">
|
|
|
+ delete from sign_red_packet_record where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|