| | |
| | | import com.nova.sankuai.domain.dto.rongbei.ProfileDictDto; |
| | | import com.nova.sankuai.domain.dto.rongbei.RongBeBasicDto; // 融贝基础DTO |
| | | import com.nova.sankuai.domain.entity.*; |
| | | import com.nova.sankuai.infra.config.CommonException; |
| | | import com.nova.sankuai.infra.utils.ConstantsUtil; |
| | | import com.nova.sankuai.infra.utils.eshidai.EsdUtil; |
| | | import com.nova.sankuai.infra.utils.hht.HhtUtil; |
| | |
| | | |
| | | @Value("${rongbei.h5HalfUrl}") |
| | | private String h5HalfUrl; // 融呗非半流程h5Url |
| | | |
| | | @Value("${front.refreshToUrl}") |
| | | private String refreshToUrl; // 前端跳转地址 |
| | | |
| | | @Value("${rongbei.wolaidai.url}") |
| | | private String wldUrl; // 我来贷URL |
| | |
| | | wrapper.eq(CapitalInfo::getCollionMode, ENABLE_FLAG); // 联登模式:半流程 |
| | | wrapper.isNull(CapitalInfo::getAlwayShow); // 是否一直显示:是 |
| | | wrapper.orderByAsc(CapitalInfo::getSeq); // 按序号升序排列 |
| | | log.info("获取要推送的半流程资方的条件---getCapitalInfoList:{}", wrapper); |
| | | return capitalInfoService.list(wrapper); // 返回匹配的资金信息列表 |
| | | } |
| | | |
| | |
| | | wrapper.eq(CapitalInfo::getAutoPush, DISABLE_FLAG); // 自动推送:启用 |
| | | wrapper.eq(CapitalInfo::getCollionMode, DISABLE_FLAG); // 联登模式:非半流程 |
| | | wrapper.orderByAsc(CapitalInfo::getSeq); // 按序号升序排列 |
| | | log.info("获取要推送的非半流程资方---getNotHalfCapitalInfoList:{}", wrapper); |
| | | return capitalInfoService.list(wrapper); // 返回匹配的资金信息列表 |
| | | } |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | return basicInfo; // 返回配置映射 |
| | | } |
| | | |
| | |
| | | JSON.toJSONString(applyDto); |
| | | decryptStr = JSON.toJSONString(applyDto); |
| | | //发送短信通知(等待供应商审批短信模板 申请完后在恢复注释) |
| | | //smsNotify(profileDictDto.getPhone()); |
| | | smsNotify(profileDictDto.getPhone()); |
| | | } |
| | | String bizDataStr = ""; |
| | | String fBizDataStr = ""; |
| | |
| | | Long capitalId = customerApplyOrder.getCapitalId(); |
| | | String h5Url = ""; |
| | | // 如果是慧钱,随易花,e时贷,好汇推,则转为乐享融的指定id:28 |
| | | if (capitalId == 12L || capitalId == 41L || capitalId == 36L || capitalId == 25L || capitalId == 4L) { |
| | | if (capitalId == 12L || capitalId == 41L || capitalId == 36L || capitalId == 25L) { |
| | | h5Url = h5HalfUrl + "&capitalId="+ capitalId + "&mobile=" + customerApplyOrder.getPhone(); |
| | | //h5Url = rbH5Url + "&capitalId=28"; |
| | | }else if(capitalId == 4L){ |
| | | // com.nova.sankuai.domain.api.zhongzan.RbResponse rbResponse = qingHuaYouPinUtil.queryApprovalToWolaidai(customerApplyOrder.getChnOrderId()); |
| | | // if (rbResponse != null) { |
| | | // if (Objects.equals("200",resp.getCode())){ |
| | | // if (rbResponse.getData() != null){ |
| | | // JSONObject smsObject = rbResponse.getData(); |
| | | // String amount = smsObject.get("amount") == null ? "" : String.valueOf(smsObject.get("amount")); |
| | | // String expireTime = smsObject.get("expireTime") == null ? "" : String.valueOf(smsObject.get("expireTime")); |
| | | // smsApprovalNotify(amount,expireTime,customerApplyOrder.getPhone()); |
| | | // } |
| | | // } |
| | | // } |
| | | h5Url = refreshToUrl + "/pages/ys/qh-sign?partnerOrderNo="+ customerApplyOrder.getChnOrderId() + "&capitalId = 28" ; |
| | | }else{ |
| | | //h5Url = rbH5Url + "&capitalId="+ capitalId + "&mobile=" + customerApplyOrder.getPhone(); |
| | | h5Url = rbH5Url + "&capitalId="+ capitalId; |
| | |
| | | List<CapitalInfo> capitalInfoList = getCapitalInfoList(); |
| | | for (CapitalInfo capitalInfo : capitalInfoList) { |
| | | Map<String, String> config = getConfigByCapitalName(capitalInfo.getName());// 获取对应的配置 |
| | | log.info("日志编号:{},{}方法:{}, 资方名:【{}】,result: {}", logNumber, basicInfo.get("targetName"), action, capitalInfo.getName(), config); // 记录资金信息 |
| | | log.info("日志编号:{},{}方法:{}, 资方名:【{}】,config配置信息: {}", logNumber, basicInfo.get("targetName"), action, capitalInfo.getName(), config); // 记录资金信息 |
| | | JSONObject fullData = new JSONObject();// 创建完整数据的JSON对象 |
| | | fullData.putOpt("partner_id", config.get("partnerId")); // 设置合作伙伴ID |
| | | fullData.putOpt("timestamp", System.currentTimeMillis());// 设置当前时间戳 |
| | |
| | | * @param phone |
| | | */ |
| | | public void smsNotify(String phone) { |
| | | String content = "您申请的信用额已通过审核,请1小时内查看【" + smsNotifyUrl + "】 过期作废!拒收请回复R"; |
| | | ShanDongMessageSendUtil.sendSMSContent(phone, content); |
| | | String content = "【乐享融】您申请的信用额已通过审核,请1小时内查看【" + smsNotifyUrl + "】 过期作废!拒收请回复R"; |
| | | boolean success = FirstMessage.sendSmsApprovalNotify(phone, content); |
| | | log.info("进件时手机号短信通知日志: 用户手机:" + phone + "原短信商" + "验证码发送返回成功"); |
| | | if (!success) { |
| | | log.info("进件时手机号短信通知日志: 用户手机:" + phone + "原短信商" + "验证码发送返回失败"); |
| | | throw new CommonException("验证码发送失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 提供我来贷进件发送短信 |
| | | * @param phone |
| | | */ |
| | | public void smsApprovalNotify(String one,String two,String phone) { |
| | | // String content = "您申请的信用额已通过审核,请1小时内查看【" + smsNotifyUrl + "】 过期作废!拒收请回复R"; |
| | | String content = "【乐享融】你申请的信用额度【"+ one +"】于【"+ two +"】已通过审核:前往 【" + smsNotifyUrl + "】 提取贷款,拒收请回复R"; |
| | | boolean success = FirstMessage.sendSmsApprovalNotify(phone, content); |
| | | log.info("青花优品进件通过手机号短信通知日志: 用户手机:" + phone + "原短信商" + "验证码发送返回成功"); |
| | | if (!success) { |
| | | log.info("青花优品进件通过手机号短信通知日志: 用户手机:" + phone + "原短信商" + "验证码发送返回失败"); |
| | | throw new CommonException("验证码发送失败"); |
| | | } |
| | | |
| | | } |
| | | } |