|
@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@@ -256,6 +257,9 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
.eq(BocomVipSilentAccountInfo::getBocomVipAccountBasicInfoId, id)
|
|
|
.list();
|
|
|
if (CollectionUtil.isNotEmpty(silentAccountInfos)) {
|
|
|
+ silentAccountInfos.forEach(silentAccountInfo -> {
|
|
|
+ silentAccountInfo.setAccountName(basicInfo.getAccountName());
|
|
|
+ });
|
|
|
basicInfo.setSilentAccountInfoList(silentAccountInfos);
|
|
|
}
|
|
|
|
|
@@ -309,8 +313,15 @@ public class BocomVipAccountBasicInfoServiceImpl extends ServiceImpl<BocomVipAcc
|
|
|
|
|
|
}
|
|
|
if (CollectionUtil.isNotEmpty(basicInfo.getDeleteSilentIds())) {
|
|
|
- //删除会员登记簿
|
|
|
+ //删除静默户
|
|
|
for (Long deleteSilentId : basicInfo.getDeleteSilentIds()) {
|
|
|
+ BocomVipSilentAccountInfo silentAccountInfo = bocomVipSilentAccoutInfoService.getById(deleteSilentId);
|
|
|
+ if (silentAccountInfo == null) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "未查询到静默户!");
|
|
|
+ }
|
|
|
+ if (silentAccountInfo.getBalance().compareTo(BigDecimal.ZERO) == 1) {
|
|
|
+ throw new BusinessException(CodeUtil.FAIL, "静默户余额大于0,不能删除!");
|
|
|
+ }
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
ids.add(deleteSilentId);
|
|
|
oldBasicInfo.setDeleteSilentIds(ids);
|