|
|
|
@ -5,7 +5,9 @@ import com.alibaba.fastjson.JSONObject; |
|
|
|
|
import com.hfkj.channel.lakala.LaKaLaLedgerService; |
|
|
|
|
import com.hfkj.channel.lakala.LaKaLaWalletService; |
|
|
|
|
import com.hfkj.channel.tianque.service.TianQueMerElecSignService; |
|
|
|
|
import com.hfkj.channel.tianque.service.TianQueMerService; |
|
|
|
|
import com.hfkj.common.utils.DateUtil; |
|
|
|
|
import com.hfkj.common.utils.ResponseMsgUtil; |
|
|
|
|
import com.hfkj.config.CommonSysConst; |
|
|
|
|
import com.hfkj.entity.*; |
|
|
|
|
import com.hfkj.service.*; |
|
|
|
@ -58,6 +60,8 @@ public class TianQueController { |
|
|
|
|
private BsMerContractRecordMsgService merContractRecordMsgService; |
|
|
|
|
@Resource |
|
|
|
|
private TianQueMerElecSignService tianQueMerElecSignService; |
|
|
|
|
@Resource |
|
|
|
|
private TianQueMerService tianQueMerService; |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/microPay",method = RequestMethod.POST) |
|
|
|
|
@ResponseBody |
|
|
|
@ -171,22 +175,38 @@ public class TianQueController { |
|
|
|
|
merPlatformNo.setStatus(MerPlatformNoStatusEnum.status1.getNumber()); |
|
|
|
|
merPlatformNoService.editMerPlatformNo(merPlatformNo); |
|
|
|
|
} |
|
|
|
|
JSONArray repoInfoArray = respData.getJSONArray("repoInfo"); |
|
|
|
|
for (Object obj : repoInfoArray) { |
|
|
|
|
JSONObject repoInfo = (JSONObject) obj; |
|
|
|
|
BsMerPlatformTerm merPlatformTerm = new BsMerPlatformTerm(); |
|
|
|
|
merPlatformTerm.setMerPlatformNoId(merPlatformNo.getId()); |
|
|
|
|
merPlatformTerm.setMerId(merPlatformNo.getMerId()); |
|
|
|
|
merPlatformTerm.setBusiTypeCode(repoInfo.getString("childNoType")); |
|
|
|
|
merPlatformTerm.setBusiTypeName(repoInfo.getString("childNoType")); |
|
|
|
|
merPlatformTerm.setShopId(repoInfo.getString("channelId")); |
|
|
|
|
merPlatformTerm.setTermNo(repoInfo.getString("childNo")); |
|
|
|
|
merPlatformTermService.editMerPlatformTerm(merPlatformTerm); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 签署协议
|
|
|
|
|
tianQueMerElecSignService.openElecSignature(respData.getString("mno")); |
|
|
|
|
|
|
|
|
|
new Thread(() -> { |
|
|
|
|
try { |
|
|
|
|
Thread.sleep(1000 * 120); // 暂停120秒
|
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
JSONObject merchantInfo = tianQueMerService.queryMerchantInfo(respData.getString("applicationId")); |
|
|
|
|
if (merchantInfo != null) { |
|
|
|
|
JSONArray repoInfoArray = merchantInfo.getJSONArray("repoInfo"); |
|
|
|
|
for (Object obj : repoInfoArray) { |
|
|
|
|
JSONObject repoInfo = (JSONObject) obj; |
|
|
|
|
BsMerPlatformTerm merPlatformTerm = new BsMerPlatformTerm(); |
|
|
|
|
merPlatformTerm.setMerPlatformNoId(merPlatformNo.getId()); |
|
|
|
|
merPlatformTerm.setMerId(merPlatformNo.getMerId()); |
|
|
|
|
merPlatformTerm.setBusiTypeCode(repoInfo.getString("childNoType")); |
|
|
|
|
merPlatformTerm.setBusiTypeName(repoInfo.getString("childNoType")); |
|
|
|
|
merPlatformTerm.setShopId(repoInfo.getString("channelId")); |
|
|
|
|
merPlatformTerm.setTermNo(repoInfo.getString("childNo")); |
|
|
|
|
merPlatformTermService.editMerPlatformTerm(merPlatformTerm); |
|
|
|
|
|
|
|
|
|
if (repoInfo.getString("childNoType").equals("WX")) { |
|
|
|
|
// 微信配置平台支付参数
|
|
|
|
|
tianQueMerService.weChatPayConf(merPlatformNo.getPlatformNo(), repoInfo.getString("childNo"), "01", "wxa075e8509802f826", "00", ""); |
|
|
|
|
tianQueMerService.weChatPayConf(merPlatformNo.getPlatformNo(), repoInfo.getString("childNo"), "03", "", "", "https://pay.dctpay.com/scanPay/"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
if (mer.getMerStatus().intValue() != MerStatusEnum.status1.getNumber().intValue()) { |
|
|
|
|
mer.setMerStatus(MerStatusEnum.status4.getNumber()); |
|
|
|
|