|
@@ -111,10 +111,12 @@ public class WeChatHelper extends BaseClass {
|
|
|
sqllist.add("update sys_payorder set ispaid=1,paytime='" + paytime + "' where orderno='" + out_trade_no + "' and siteid='" + siteid + "'");
|
|
|
sqllist.add("UPDATE sys_paycoupon_log SET isvalid=1 WHERE sys_payorderid=" + sys_payorderid);
|
|
|
Rows orderitemsRows = dbConnect.runSqlQuery("SELECT userid from sys_payorderitems WHERE siteid='" + siteid + "' and sys_payorderid=" + sys_payorderid);
|
|
|
-
|
|
|
+ ArrayList<Long> userids = orderitemsRows.toArrayList("userid", new ArrayList<>());
|
|
|
+ if (!userids.contains(userid)) {
|
|
|
+ userids.add(userid);
|
|
|
+ }
|
|
|
Remind remind = new Remind(siteid);
|
|
|
- remind.setTouserid(orderitemsRows.toArrayList("userid", new ArrayList<>()));
|
|
|
- remind.setTouserid(userid);
|
|
|
+ remind.setTouserid(userids);
|
|
|
remind.setType("pay");
|
|
|
remind.setTitle(paymode + "成功");
|
|
|
remind.setContent("success");
|
|
@@ -151,12 +153,12 @@ public class WeChatHelper extends BaseClass {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static JSONObject refund(String out_refund_no){
|
|
|
+ public static JSONObject refund(String out_refund_no) {
|
|
|
|
|
|
//System.err.println("退款:"+out_refund_no);
|
|
|
CloseableHttpClient httpClient = httpClient();
|
|
|
try {
|
|
|
- HttpGet httpPost = new HttpGet("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/" + out_refund_no );
|
|
|
+ HttpGet httpPost = new HttpGet("https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/" + out_refund_no);
|
|
|
httpPost.setHeader("Accept", "application/json");
|
|
|
//完成签名并执行请求
|
|
|
CloseableHttpResponse response = httpClient.execute(httpPost);
|