|
@@ -107,6 +107,8 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
private BocomTransRecordsMapper bocomTransRecordsMapper;
|
|
|
@Autowired
|
|
|
private IBocomVipAccountComprehensiveDetailFileRelService bocomVipAccountComprehensiveDetailFileRelService;
|
|
|
+ @Autowired
|
|
|
+ private IBocomVipAccountNoticeInfoService bocomVipAccountNoticeInfoService;
|
|
|
|
|
|
@Override
|
|
|
public BocomVipAccountBasicInfo doAdd(Long bocomBasicInfoId) {
|
|
@@ -134,6 +136,13 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
bocomVipAccountBasicInfo.setExpiringDate(new Date());
|
|
|
}
|
|
|
save(bocomVipAccountBasicInfo);
|
|
|
+ if (CollectionUtil.isNotEmpty(bocomVipAccountBasicInfo.getNoticeInfoList())){
|
|
|
+ bocomVipAccountBasicInfo.getNoticeInfoList().forEach(n->{
|
|
|
+ n.setBocomVipAccountBasicInfoId(bocomVipAccountBasicInfo.getId());
|
|
|
+ bocomVipAccountNoticeInfoService.save(n);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
//数据入库
|
|
|
if (bocomVipAccountBasicInfo != null) {
|
|
|
|
|
@@ -449,7 +458,7 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
BocomVipAccountBasicInfo newVipAccountInfo = autoQueryVipRequest(vipAccountBasicInfo);
|
|
|
//新旧对比 如果之前状态不是客户授权中 现在是客户授权中 则重置二维码及二维码的生效时间
|
|
|
if (0 == newVipAccountInfo.getAuthorizationStatus() && !newVipAccountInfo.getAuthorizationStatus().equals(vipAccountBasicInfo.getAuthorizationStatus())) {
|
|
|
- newVipAccountInfo.setQrCodeEffectTime(new Date());
|
|
|
+ resetUrl(newVipAccountInfo.getId());
|
|
|
}
|
|
|
if (1 == newVipAccountInfo.getAccountStatus() && !newVipAccountInfo.getAccountStatus().equals(vipAccountBasicInfo.getAccountStatus())) {
|
|
|
newVipAccountInfo.setOpenTime(new Date());
|
|
@@ -644,10 +653,14 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
BocomVipAccountBasicInfo basicInfo = getById(id);
|
|
|
if (basicInfo != null) {
|
|
|
BocomVipAccountBasicInfo vipAccountBasicInfo = resetUrlAuthorized(basicInfo);
|
|
|
- lambdaUpdate().eq(BocomVipAccountBasicInfo::getId, vipAccountBasicInfo.getId())
|
|
|
- .set(BocomVipAccountBasicInfo::getQrCode, vipAccountBasicInfo.getQrCode())
|
|
|
- .set(BocomVipAccountBasicInfo::getQrCodeEffectTime, vipAccountBasicInfo.getQrCodeEffectTime())
|
|
|
- .update();
|
|
|
+ //全删全进
|
|
|
+ bocomVipAccountNoticeInfoService.remove(new QueryWrapper<BocomVipAccountNoticeInfo>()
|
|
|
+ .eq("bocom_vip_account_basic_info_id",vipAccountBasicInfo.getId()));
|
|
|
+ if (CollectionUtil.isNotEmpty(vipAccountBasicInfo.getNoticeInfoList())){
|
|
|
+ vipAccountBasicInfo.getNoticeInfoList().forEach(n->{
|
|
|
+ bocomVipAccountNoticeInfoService.save(n);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
BocomVipAccountBasicInfo newVipBasic = getById(id);
|
|
|
return newVipBasic;
|
|
@@ -739,23 +752,26 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
if ("00".equals(pptmBodyRequest.getOprTp()) && "13".equals(pptmBodyRequest.getRgsnBookPurp())) {
|
|
|
basicInfo.setAccountNumber(pptmBody.getRgsnBookId());
|
|
|
}
|
|
|
+ List<BocomVipAccountNoticeInfo> noticeInfoList = new ArrayList<>();
|
|
|
if (CollectionUtil.isNotEmpty(pptmBody.getNotyQue())) {
|
|
|
- String notyPushObjs = pptmBody.getNotyQue().stream().map(n -> n.getNotyPushObj()).collect(Collectors.joining("/"));
|
|
|
- basicInfo.setNoticeObject(notyPushObjs);
|
|
|
- B2BJEBM1201ResponseV2.PptmBody.NotyQue que = pptmBody.getNotyQue().get(0);
|
|
|
- basicInfo.setQrCode(que.getMerchNotyBase64Stream());
|
|
|
- basicInfo.setQrCodeEffectTime(new Date());
|
|
|
- basicInfo.setPlfmSerNo(pptmBodyRequest.getPlfmSerNo());
|
|
|
-
|
|
|
- //填充认证人
|
|
|
- if (notyPushObjs.contains("1")) {
|
|
|
- //需要法人授权 新建会员登记簿时 法人授权状态置为 0
|
|
|
- basicInfo.setLegalAuthorizationStatus(0);
|
|
|
- }
|
|
|
- if (notyPushObjs.contains("2")) {
|
|
|
- //需要授权代理人授权 新建会员登记簿时 授权代理人授权状态置为 0
|
|
|
- basicInfo.setAuthorizationStatus(0);
|
|
|
- }
|
|
|
+ pptmBody.getNotyQue().forEach(notyQue -> {
|
|
|
+ BocomVipAccountNoticeInfo noticeInfo = new BocomVipAccountNoticeInfo();
|
|
|
+ noticeInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ noticeInfo.setQrCodeEffectTime(new Date());
|
|
|
+ noticeInfo.setNoticeObject(notyQue.getNotyPushObj());
|
|
|
+ noticeInfoList.add(noticeInfo);
|
|
|
+
|
|
|
+ if (notyQue.getNotyPushObj().equals("1")) {
|
|
|
+ //需要法人授权 新建会员登记簿时 法人授权状态置为 0
|
|
|
+ basicInfo.setLegalAuthorizationStatus(0);
|
|
|
+ }
|
|
|
+ if (notyQue.getNotyPushObj().equals("2")) {
|
|
|
+ //需要授权代理人授权 新建会员登记簿时 授权代理人授权状态置为 0
|
|
|
+ basicInfo.setAuthorizationStatus(0);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
basicInfo.setChannel("bocom");
|
|
@@ -1325,12 +1341,14 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
b2BJEBM2001RequestV1.setBizContent(b2BJEBM2001RequestV1Biz);
|
|
|
B2BJEBM2001ResponseV1.PptmBody pptmBodyResponse = bocomVipCommonService.resetUrl(b2BJEBM2001RequestV1);
|
|
|
|
|
|
+ List<BocomVipAccountNoticeInfo> noticeInfoList = new ArrayList<>();
|
|
|
pptmBodyResponse.getNotyQue().forEach(notyQue -> {
|
|
|
- if ("1".equals(notyQue.getNotyPushObj())) {
|
|
|
- vipAccountBasicInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
- vipAccountBasicInfo.setQrCodeEffectTime(new Date());
|
|
|
-// replaceBase64(vipAccountBasicInfo);
|
|
|
- }
|
|
|
+ BocomVipAccountNoticeInfo noticeInfo = new BocomVipAccountNoticeInfo();
|
|
|
+ noticeInfo.setBocomVipAccountBasicInfoId(vipAccountBasicInfo.getId());
|
|
|
+ noticeInfo.setQrCode(notyQue.getMerchNotyBase64Stream());
|
|
|
+ noticeInfo.setQrCodeEffectTime(new Date());
|
|
|
+ noticeInfo.setNoticeObject(notyQue.getNotyPushObj());
|
|
|
+ noticeInfoList.add(noticeInfo);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -2465,8 +2483,7 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
*/
|
|
|
private void autoAuthenticator(BocomVipAccountBasicInfo bocomVipAccountBasicInfo){
|
|
|
BocomBasicInfo basicInfo = bocomBasicInfoService.get(bocomVipAccountBasicInfo.getBocomBasicInfoId());
|
|
|
- if (StringUtil.isNotEmpty(bocomVipAccountBasicInfo.getNoticeObject())) {
|
|
|
- String[] values = bocomVipAccountBasicInfo.getNoticeObject().split("/");
|
|
|
+ if (CollectionUtil.isNotEmpty(bocomVipAccountBasicInfo.getNoticeInfoList())) {
|
|
|
//授权代理人
|
|
|
BocomAuthorizedAgent authorizedAgent = bocomAuthorizedAgentService.lambdaQuery()
|
|
|
.eq(BocomAuthorizedAgent::getBocomBasicInfoId, basicInfo.getId())
|
|
@@ -2475,23 +2492,15 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
BocomLegalPersonInfo legalPersonInfo = bocomLegalPersonInfoService.lambdaQuery()
|
|
|
.eq(BocomLegalPersonInfo::getBocomBasicInfoId, basicInfo.getId())
|
|
|
.one();
|
|
|
- String authenticator = "";
|
|
|
- if (values.length > 0) {
|
|
|
- if (values.length == 1) {
|
|
|
- if (authorizedAgent != null) {
|
|
|
- //取授权代理人
|
|
|
- authenticator = authorizedAgent.getName();
|
|
|
- }
|
|
|
+ bocomVipAccountBasicInfo.getNoticeInfoList().forEach(n->{
|
|
|
+ if (n.getNoticeObject().equals("1")){
|
|
|
+ n.setAuthenticator(legalPersonInfo.getName());
|
|
|
}
|
|
|
-
|
|
|
- if (values.length > 1) {
|
|
|
- if (authorizedAgent != null && legalPersonInfo != null) {
|
|
|
- //取法人和授权代理人
|
|
|
- authenticator = authorizedAgent.getName() + "和" + legalPersonInfo.getName();
|
|
|
- }
|
|
|
+ if (n.getNoticeObject().equals("2")){
|
|
|
+ n.setAuthenticator(authorizedAgent.getName());
|
|
|
}
|
|
|
- bocomVipAccountBasicInfo.setAuthenticator(authenticator);
|
|
|
- }
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|