|
@@ -297,42 +297,41 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
bocomVipSilentAccoutInfoService.save(newSilentAccountInfo);
|
|
bocomVipSilentAccoutInfoService.save(newSilentAccountInfo);
|
|
}
|
|
}
|
|
|
|
|
|
- if (CollectionUtil.isNotEmpty(basicInfo.getDeleteSilentIds())) {
|
|
|
|
- //删除会员登记簿
|
|
|
|
- for (Long deleteSilentId : basicInfo.getDeleteSilentIds()) {
|
|
|
|
- List<Long> ids = new ArrayList<>();
|
|
|
|
- ids.add(deleteSilentId);
|
|
|
|
- oldBasicInfo.setDeleteSilentIds(ids);
|
|
|
|
- try {
|
|
|
|
- responseJson = restTemplate.postForObject(bocomVipUpdateUrl, basicInfo, ResponseJson.class);
|
|
|
|
- if (!responseJson.getCode().equals(200)) {
|
|
|
|
- throw new BusinessException(CodeUtil.FAIL, responseJson.getMsg().toString());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- throw new BusinessException(CodeUtil.FAIL, e.getMessage());
|
|
|
|
|
|
+ }
|
|
|
|
+ if (CollectionUtil.isNotEmpty(basicInfo.getDeleteSilentIds())) {
|
|
|
|
+ //删除会员登记簿
|
|
|
|
+ for (Long deleteSilentId : basicInfo.getDeleteSilentIds()) {
|
|
|
|
+ List<Long> ids = new ArrayList<>();
|
|
|
|
+ ids.add(deleteSilentId);
|
|
|
|
+ oldBasicInfo.setDeleteSilentIds(ids);
|
|
|
|
+ try {
|
|
|
|
+ responseJson = restTemplate.postForObject(bocomVipUpdateUrl, basicInfo, ResponseJson.class);
|
|
|
|
+ if (!responseJson.getCode().equals(200)) {
|
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, responseJson.getMsg().toString());
|
|
}
|
|
}
|
|
- bocomVipSilentAccoutInfoService.removeById(deleteSilentId);
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ bocomVipSilentAccoutInfoService.removeById(deleteSilentId);
|
|
}
|
|
}
|
|
|
|
|
|
- if (responseJson != null){
|
|
|
|
- BocomVipAccountBasicInfo newBasicInfo = JSONObject.parseObject(JSONObject.toJSONString(responseJson.getData()), BocomVipAccountBasicInfo.class);
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- updateById(newBasicInfo);
|
|
|
|
- if (newBasicInfo.getBocomVipLimitInfo() != null) {
|
|
|
|
- BocomVipLimitInfo bocomVipLimitInfo = newBasicInfo.getBocomVipLimitInfo();
|
|
|
|
- BocomVipLimitInfo oldLimitInfo = bocomVipLimitInfoService.lambdaQuery()
|
|
|
|
- .eq(BocomVipLimitInfo::getBocomVipAccountBasicInfoId, newBasicInfo.getId())
|
|
|
|
- .one();
|
|
|
|
- bocomVipLimitInfo.setBocomVipAccountBasicInfoId(newBasicInfo.getId());
|
|
|
|
- bocomVipLimitInfo.setId(oldLimitInfo.getId());
|
|
|
|
- bocomVipLimitInfoService.updateById(bocomVipLimitInfo);
|
|
|
|
|
|
+ if (responseJson != null){
|
|
|
|
+ BocomVipAccountBasicInfo newBasicInfo = JSONObject.parseObject(JSONObject.toJSONString(responseJson.getData()), BocomVipAccountBasicInfo.class);
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ updateById(newBasicInfo);
|
|
|
|
+ if (newBasicInfo.getBocomVipLimitInfo() != null) {
|
|
|
|
+ BocomVipLimitInfo bocomVipLimitInfo = newBasicInfo.getBocomVipLimitInfo();
|
|
|
|
+ BocomVipLimitInfo oldLimitInfo = bocomVipLimitInfoService.lambdaQuery()
|
|
|
|
+ .eq(BocomVipLimitInfo::getBocomVipAccountBasicInfoId, newBasicInfo.getId())
|
|
|
|
+ .one();
|
|
|
|
+ bocomVipLimitInfo.setBocomVipAccountBasicInfoId(newBasicInfo.getId());
|
|
|
|
+ bocomVipLimitInfo.setId(oldLimitInfo.getId());
|
|
|
|
+ bocomVipLimitInfoService.updateById(bocomVipLimitInfo);
|
|
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|