From 92dd4cac353b10508cf6a8a7260c0ec2828249c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 31 Dec 2022 17:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4=E4=B8=BA=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E4=BA=BA=E5=85=B3=E4=BA=8E=E6=89=98=E7=A6=8F=E8=B5=8F=E9=87=91?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD,=E6=94=AF=E6=8C=81=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E8=B5=8F=E9=87=91=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xm/core/service/client/AcClient.java | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/service/client/AcClient.java b/xm-core/src/main/java/com/xm/core/service/client/AcClient.java index d5ea4d04..080fe1aa 100644 --- a/xm-core/src/main/java/com/xm/core/service/client/AcClient.java +++ b/xm-core/src/main/java/com/xm/core/service/client/AcClient.java @@ -5,6 +5,7 @@ import com.mdp.core.entity.Tips; import com.mdp.core.utils.SequenceFormat; import com.mdp.micro.client.CallBizService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import java.math.BigDecimal; @@ -12,6 +13,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.concurrent.TimeUnit; @Service public class AcClient { @@ -20,7 +22,9 @@ public class AcClient { @Autowired ObjectMapper om; - + + @Autowired + RedisTemplate redisTemplate; Set userCardCodeSet=new HashSet(1000); @@ -36,14 +40,20 @@ public class AcClient { */ public Map companyBalancePayToClient(String payCompanyId,String incomeUserid, String orderId, BigDecimal payAt, String remarks){ String urls = "/accore/accore/tpa/pay/companyBalancePayToClient"; + Map m=new HashMap<>(); m.put("payCompanyId", payCompanyId); m.put("incomeUserid", incomeUserid); m.put("orderId",orderId); m.put("payAt", payAt); m.put("remarks", remarks); - Tips tips = restTemplate.postForTips(urls,m); + String payId=this.getOrderId(); + redisTemplate.opsForValue().set(payId,"1",1, TimeUnit.HOURS); + m.put("payId",payId); + + Tips tips = restTemplate.postForTips(urls,m); + tips.put("payId",payId); return tips; } @@ -63,7 +73,14 @@ public class AcClient { m.put("payAt", payAt); m.put("orderId", orderId); m.put("remarks",remarks); + + + String payId=this.getOrderId(); + redisTemplate.opsForValue().set(payId,"1",1, TimeUnit.HOURS); + m.put("payId",payId); + Tips tips = restTemplate.postForTips(urls,m); + tips.put("payId",payId); return tips; } @@ -84,7 +101,13 @@ public class AcClient { m.put("orderId",orderId); m.put("payAt", payAt); m.put("remarks", remarks); + + String payId=this.getOrderId(); + redisTemplate.opsForValue().set(payId,"1",1, TimeUnit.HOURS); + m.put("payId",payId); + Tips tips = restTemplate.postForTips(urls,m); + tips.put("payId",payId); return tips; }