suochencheng 6 лет назад
Родитель
Сommit
7857580fda

+ 2 - 0
src/main/java/com/izouma/weixin/dao/WxpayTempMapper.java

@@ -31,5 +31,7 @@ public interface WxpayTempMapper{
     WxpayTemp queryWxpayTemp(WxpayTemp record);
 
     List<WxpayTemp> query(WxpayTemp record);
+
+    List<WxpayTemp> queryAutoCheckPayWxpayTemp(WxpayTemp param);
 }
 

+ 134 - 0
src/main/java/com/izouma/weixin/dao/WxpayTempMapper.xml

@@ -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 !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="totalAmount != null and !&quot;&quot;.equals(totalAmount)">
+                and total_amount = #{totalAmount}
+            </if>
+            <if test="outTradeNo != null and !&quot;&quot;.equals(outTradeNo)">
+                and out_trade_no = #{outTradeNo}
+            </if>
+            <if test="transactionId != null and !&quot;&quot;.equals(transactionId)">
+                and transaction_id = #{transactionId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="outRefundNo != null and !&quot;&quot;.equals(outRefundNo)">
+                and out_refund_no = #{outRefundNo}
+            </if>
+            <if test="refundAmount != null and !&quot;&quot;.equals(refundAmount)">
+                and refund_amount = #{refundAmount}
+            </if>
+            <if test="coin != null and !&quot;&quot;.equals(coin)">
+                and coin = #{coin}
+            </if>
+            <if test="point != null and !&quot;&quot;.equals(point)">
+                and point = #{point}
+            </if>
+            <if test="cash != null and !&quot;&quot;.equals(cash)">
+                and cash = #{cash}
+            </if>
+            <if test="openId != null and !&quot;&quot;.equals(openId)">
+                and open_id = #{openId}
+            </if>
+            <if test="resultCode != null and !&quot;&quot;.equals(resultCode)">
+                and result_code = #{resultCode}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.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 !&quot;&quot;.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 &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.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"/>

+ 2 - 2
src/main/java/com/izouma/weixin/web/LeYunFuController.java

@@ -181,7 +181,7 @@ public class LeYunFuController {
             params.put("notify_url", PropertiesFileLoader.getProperties("leyunfu_return_url"));     //接收支付结果异步通知回调地址
             params.put("spbill_create_ip", ip);        //客户端IP
             params.put("return_url", PropertiesFileLoader.getProperties("leyunfu_notify_url"));    //页面回调地址
-            params.put("payment_type", "trade.weixin.native");   //支付类型
+            params.put("payment_type", "trade.weixin.app");   //支付类型
             params.put("attach", attach.toString());   //附加数据
 
 
@@ -269,7 +269,7 @@ public class LeYunFuController {
             WxpayTemp param = new WxpayTemp();
             param.setCreateUser("lyf");
             param.setResultCode("NOT_PAY");
-            List<WxpayTemp> wxpayTempList = wxpayTempMapper.queryAllWxpayTemp(param);
+            List<WxpayTemp> wxpayTempList = wxpayTempMapper.queryAutoCheckPayWxpayTemp(param);
 
             for (WxpayTemp wxpayTemp : wxpayTempList) {