|
|
@@ -575,6 +575,140 @@
|
|
|
|
|
|
id desc
|
|
|
</select>
|
|
|
+ <select id="queryAutoCheckPayWxpayTemp" parameterType="java.util.Map" resultType="com.izouma.weixin.model.WxpayTemp">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from wxpay_temp
|
|
|
+ <where>
|
|
|
+ and del_flag = 'N'
|
|
|
+ and <![CDATA[
|
|
|
+ create_time > (NOW()-interval 1 DAY)
|
|
|
+ ]]>
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
+ and del_flag = #{delFlag}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
+ and update_time = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
+ and update_user = #{updateUser}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
+ and create_user = #{createUser}
|
|
|
+ </if>
|
|
|
+ <if test="orderId != null and !"".equals(orderId)">
|
|
|
+ and order_id = #{orderId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null and !"".equals(userId)">
|
|
|
+ and user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="totalAmount != null and !"".equals(totalAmount)">
|
|
|
+ and total_amount = #{totalAmount}
|
|
|
+ </if>
|
|
|
+ <if test="outTradeNo != null and !"".equals(outTradeNo)">
|
|
|
+ and out_trade_no = #{outTradeNo}
|
|
|
+ </if>
|
|
|
+ <if test="transactionId != null and !"".equals(transactionId)">
|
|
|
+ and transaction_id = #{transactionId}
|
|
|
+ </if>
|
|
|
+ <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
+ and type_flag = #{typeFlag}
|
|
|
+ </if>
|
|
|
+ <if test="outRefundNo != null and !"".equals(outRefundNo)">
|
|
|
+ and out_refund_no = #{outRefundNo}
|
|
|
+ </if>
|
|
|
+ <if test="refundAmount != null and !"".equals(refundAmount)">
|
|
|
+ and refund_amount = #{refundAmount}
|
|
|
+ </if>
|
|
|
+ <if test="coin != null and !"".equals(coin)">
|
|
|
+ and coin = #{coin}
|
|
|
+ </if>
|
|
|
+ <if test="point != null and !"".equals(point)">
|
|
|
+ and point = #{point}
|
|
|
+ </if>
|
|
|
+ <if test="cash != null and !"".equals(cash)">
|
|
|
+ and cash = #{cash}
|
|
|
+ </if>
|
|
|
+ <if test="openId != null and !"".equals(openId)">
|
|
|
+ and open_id = #{openId}
|
|
|
+ </if>
|
|
|
+ <if test="resultCode != null and !"".equals(resultCode)">
|
|
|
+ and result_code = #{resultCode}
|
|
|
+ </if>
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
+ OR order_id LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR user_id LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR total_amount LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR out_trade_no LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR transaction_id LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR type_flag LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR out_refund_no LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR refund_amount LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR coin LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR point LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR cash LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR open_id LIKE concat('%',#{searchKey},'%')
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ <if test="advancedQuery != null and !"".equals(advancedQuery)">
|
|
|
+ <foreach item="item" index="index" collection="advancedQuery.split('_;')">
|
|
|
+ <choose>
|
|
|
+ <when test="item.indexOf('like') != -1">
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
+ <if test="detailIndex == 3">
|
|
|
+ concat('%',#{itemDetail},'%')
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="detailIndex < 3">
|
|
|
+ ${itemDetail}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
+ <if test="detailIndex == 3">
|
|
|
+ #{itemDetail}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="detailIndex < 3">
|
|
|
+ ${itemDetail}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+
|
|
|
+
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by
|
|
|
+
|
|
|
+ <if test="orderByStr != null and !"".equals(orderByStr)">
|
|
|
+
|
|
|
+
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
+ ${itemDetail}
|
|
|
+ </foreach>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ ,
|
|
|
+ </if>
|
|
|
+
|
|
|
+ id desc
|
|
|
+ </select>
|
|
|
<select id="queryWxpayTemp" parameterType="java.util.Map" resultType="com.izouma.weixin.model.WxpayTemp">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|