|
|
@@ -2,12 +2,17 @@ package com.uas.platform.b2c.fa.payment.service.impl;
|
|
|
|
|
|
import com.uas.platform.b2c.core.config.SysConf;
|
|
|
import com.uas.platform.b2c.fa.payment.constant.PingAnRequestUrlPostfix;
|
|
|
+import com.uas.platform.b2c.fa.payment.constant.Regex;
|
|
|
+import com.uas.platform.b2c.fa.payment.constant.StringConstant;
|
|
|
import com.uas.platform.b2c.fa.payment.service.PingAnAccountService;
|
|
|
import com.uas.platform.b2c.fa.payment.support.UserInfoSupport;
|
|
|
+import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -66,4 +71,108 @@ public class PingAnAccountServiceImpl implements PingAnAccountService {
|
|
|
String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.PINGANGETSUBACCOUNTINFO, infoMap, String.class);
|
|
|
return resultStr;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询银行在途清算结果【6108】
|
|
|
+ *
|
|
|
+ * @param page
|
|
|
+ * @param funcFlag 1:全部,2:指定时间段
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String querySettleAccounts(String page, String funcFlag, String beginDate, String endDate) {
|
|
|
+ HashMap<String, String> hashMap = new HashMap<>();
|
|
|
+ hashMap.put("FuncFlag", funcFlag);
|
|
|
+ hashMap.put("PageNum", page);
|
|
|
+ if (StringUtils.isEmpty(funcFlag)) {
|
|
|
+ throw new IllegalArgumentException("传入的标识为空");
|
|
|
+ } else {
|
|
|
+ if (!funcFlag.equals(StringConstant.MIN_POSITIVE_INTEGER)) {
|
|
|
+ hashMap.put("BeginDate", "beginDate");
|
|
|
+ hashMap.put("EndDate", "endDate");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.QUERYSETTLEACCOUNTS, hashMap, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询子帐号历史余额及待转可提现状态信息【6114】
|
|
|
+ * @param isPersonal 是否是个人
|
|
|
+ * @param beginDate 开始时间
|
|
|
+ * @param endDate 结束时间
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String querySubAccountHistoryRemainderAndCanWithDrawInfo(Boolean isPersonal, String beginDate, String endDate, String page) {
|
|
|
+ Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
+ infoMap.put("BeginDate", beginDate);
|
|
|
+ infoMap.put("EndDate", endDate);
|
|
|
+ infoMap.put("PageNum", page);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.QUERYSUBACCOUNTHISTORYREMAINDERANDCANWITHDRAWINFO, infoMap, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询银行时间段内清分提现明细【6073】
|
|
|
+ *
|
|
|
+ * @param isPersonal
|
|
|
+ * @param beginDate 1:当日,2:历史, 如果是当日 beginDate, endDate为空
|
|
|
+ * @param endDate
|
|
|
+ * @param page
|
|
|
+ * @param selectFlag 2:提现 3:清分
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String queryDistributionAndWithDrawDetail(Boolean isPersonal, String beginDate, String endDate, String page, String selectFlag) {
|
|
|
+ Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
+ if (StringUtils.isEmpty(beginDate) || StringUtils.isEmpty(endDate)) {
|
|
|
+ infoMap.put("FuncFlag", "1");// 1:当日,2:历史
|
|
|
+ } else {
|
|
|
+ infoMap.put("BeginDate", beginDate);
|
|
|
+ infoMap.put("EndDate", endDate);
|
|
|
+ infoMap.put("FuncFlag", "2");// 1:当日,2:历史
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(page)) {
|
|
|
+ page = StringConstant.MIN_POSITIVE_INTEGER;
|
|
|
+ } else {
|
|
|
+ page = page.matches(Regex.POSITIVE_INTEGER) ? page : StringConstant.MIN_POSITIVE_INTEGER;
|
|
|
+ }
|
|
|
+ infoMap.put("PageNum", page);
|
|
|
+ infoMap.put("SelectFlag", selectFlag);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.QUERYDISTRIBUTIONANDWITHDRAWDETAIL, infoMap, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据会员代码查询会员子账号【6092】
|
|
|
+ *
|
|
|
+ * @param isPersonal
|
|
|
+ * @return String
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String queryAccountInfo(Boolean isPersonal) {
|
|
|
+ Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.QUERYACCOUNTINFO, infoMap, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询对账文件信息【6103】(余额,充值,体现,交易)
|
|
|
+ *
|
|
|
+ * @param fileType
|
|
|
+ * @param tranDate
|
|
|
+ * @return String
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String queryAccountStatement(String fileType, String tranDate) {
|
|
|
+ Map<String, String> infoMap = new HashedMap();
|
|
|
+ infoMap.put("FileType", fileType);
|
|
|
+ infoMap.put("TranDate", tranDate);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.QUERYACCOUNTSTATEMENT, infoMap, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
}
|