zhaohongpeng 8 سال پیش
والد
کامیت
616b13b076

+ 44 - 0
src/main/java/com/uas/platform/b2c/fa/payment/controller/PingAnAccountBindCardController.java

@@ -0,0 +1,44 @@
+package com.uas.platform.b2c.fa.payment.controller;
+
+import com.uas.platform.b2c.core.support.log.UsageBufferedLogger;
+import com.uas.platform.b2c.fa.payment.service.PingAnAccountBindCardService;
+import com.uas.platform.b2c.fa.payment.service.PinganTradeService;
+import com.uas.platform.core.logging.BufferedLoggerManager;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+
+/**
+ * 会员交易接口
+ *
+ * @author pengzh 2017-1-10
+ */
+@RestController
+@RequestMapping(value = "/pingAnBindCard")
+public class PingAnAccountBindCardController {
+
+    private static final UsageBufferedLogger logger = BufferedLoggerManager.getLogger(UsageBufferedLogger.class);
+
+    private final PingAnAccountBindCardService pingAnAccountBindCardService;
+
+    @Autowired
+    public PingAnAccountBindCardController(PingAnAccountBindCardService pingAnAccountBindCardService) {
+        this.pingAnAccountBindCardService = pingAnAccountBindCardService;
+    }
+
+
+    /**
+     * 会员绑定提现账户-银联鉴权【6066】
+     *
+     * @param isPersonal
+     * @return
+     */
+    @RequestMapping(value = "unionPaybindBankCard", method = RequestMethod.POST)
+    public String unionPaybindBankCard(Boolean isPersonal) {
+        String result = pingAnAccountBindCardService.unionPaybindBankCard(isPersonal);
+        return result;
+    }
+}

+ 31 - 0
src/main/java/com/uas/platform/b2c/fa/payment/service/PingAnAccountBindCardService.java

@@ -0,0 +1,31 @@
+package com.uas.platform.b2c.fa.payment.service;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * 平安的facade层
+ *
+ * Created by yujia on 2017/12/20.
+ */
+public interface PingAnAccountBindCardService {
+
+
+    /**
+     * 会员绑定提现账户-银联鉴权【6066】
+     *
+     * @param isPersonal
+     * @return
+     */
+    String unionPaybindBankCard(Boolean isPersonal) ;
+
+
+
+
+
+
+
+
+
+
+}

+ 61 - 0
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/PingAnAccountBindCardServiceImpl.java

@@ -0,0 +1,61 @@
+package com.uas.platform.b2c.fa.payment.service.impl;
+
+import com.uas.platform.b2c.fa.payment.service.PingAnAccountBindCardService;
+import com.uas.platform.b2c.fa.payment.support.UserInfoSupport;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 平安service 的impl
+ *
+ * @author yuj 2017-12-20 20:32
+ */
+@Service
+public class PingAnAccountBindCardServiceImpl implements PingAnAccountBindCardService {
+
+    private final RestTemplate restTemplate;
+
+    private final UserInfoSupport userInfoSupport;
+
+    @Autowired
+    public PingAnAccountBindCardServiceImpl(RestTemplate restTemplate, UserInfoSupport userInfoSupport) {
+        this.restTemplate = restTemplate;
+        this.userInfoSupport = userInfoSupport;
+    }
+
+    /**
+     * 会员绑定提现账户-银联鉴权【6066】
+     *
+     * @param isPersonal
+     * @return
+     */
+    public String unionPaybindBankCard(Boolean isPersonal) {
+        HashMap<String, String> map = new HashMap<>();
+        Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
+        map.put("CustAcctId","3239000000006038");
+        map.put("ThirdCustId","1000103422100010342311");
+        map.put("CustName","yuj");
+        map.put("IdType","3239000000006028");
+        map.put("IdCode","10001034100010342311");
+        map.put("AcctId","10");
+        map.put("BankType","1");
+        map.put("BankName","01");
+        map.put("SBankCode","RMB");
+        map.put("BankCode","210241041004");
+        //  map.put("SerialNo","3239000000006038");
+        map.put("MobilePhone","1111111");
+        map.put("useruu","1000103422");
+
+
+
+
+        String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingAn/accountBC/uninonPay", map, String.class);
+        return resultStr;
+    }
+
+
+}