|
@@ -36,12 +36,14 @@ public interface WxApiDao {
|
|
|
"time_stamp,trade_no,create_order_sign,pay_sign,spbill_create_ip," +
|
|
|
"create_datetime,trade_state,serial_no,order_type,his_ord_num," +
|
|
|
"mzy_request_id,yj_req_no,his_status,query_state_times,ap_time," +
|
|
|
- "fundpay_amt,acctpay_amt,coupon_amt,cashpay_amt,coupon_id,sgl_check_id) " +
|
|
|
+ "fundpay_amt,acctpay_amt,coupon_amt,cashpay_amt,coupon_id,sgl_check_id," +
|
|
|
+ "sgl_check_notified) " +
|
|
|
"values (#{body},#{openid},#{totalFee},#{patientId},#{patientName},#{inpatientNo}," +
|
|
|
"#{admissTimes},#{appId},#{mchId},#{prepayId},#{timeStamp},#{tradeNo},#{createOrderSign}," +
|
|
|
"#{paySign},#{spbillCreateIp},#{createDatetime},#{tradeState},#{serialNo},#{orderType}," +
|
|
|
"#{hisOrdNum},#{mzyRequestId},#{yjReqNo},0,0,#{apTime},#{fundpayAmt}," +
|
|
|
- "#{acctpayAmt},#{couponAmt},#{cashpayAmt},#{couponId},#{sglCheckId})")
|
|
|
+ "#{acctpayAmt},#{couponAmt},#{cashpayAmt},#{couponId},#{sglCheckId}," +
|
|
|
+ "#{sglCheckNotified})")
|
|
|
void insertNewOrder(WxPayOrder param);
|
|
|
|
|
|
@Select("select * from t_si_presetlinfo where pat_no=#{patNo} and times=#{times} ")
|
|
@@ -107,11 +109,16 @@ public interface WxApiDao {
|
|
|
@Select("select * from t_wechat_pay_order with(nolock) where trade_no=#{tradeNo}")
|
|
|
WxPayOrder selectOrderByTradeNo(String tradeNo);
|
|
|
|
|
|
- @Select("select trade_no, query_state_times, " +
|
|
|
+ @Select("select trade_no,trade_state,query_state_times, " +
|
|
|
"offset=datediff(minute,create_datetime,last_query_state) " +
|
|
|
- "from t_wechat_pay_order with(nolock) where his_status=0 " +
|
|
|
- "and order_type in (1,2,3,5) and openid!='' and sgl_check_notified=0 " +
|
|
|
- "and trade_state in ('NOTPAY','ACCEPT','USERPAYING','PAYERROR') ")
|
|
|
+ "from t_wechat_pay_order with(nolock) " +
|
|
|
+ "where openid!='' and his_status=0 and order_type in (1,2,3) " +
|
|
|
+ "and trade_state='NOTPAY' " +
|
|
|
+ "union " +
|
|
|
+ "select trade_no,trade_state,query_state_times, " +
|
|
|
+ "offset=datediff(minute,create_datetime,last_query_state) " +
|
|
|
+ "from t_wechat_pay_order with(nolock) where order_type=5 " +
|
|
|
+ "and sgl_check_notified=0 ")
|
|
|
List<TradeNo> selectTradeNosForScheduleTask();
|
|
|
|
|
|
@Select("select openid from t_wechat_patient_bind with(nolock) where patient_id=#{cardNo} and del_flag=0")
|