|
|
|
@ -77,7 +77,6 @@ public class BasicdataStoreContactServiceImpl extends BaseServiceImpl<BasicdataS
|
|
|
|
|
throw new RuntimeException("商场必须存在一个默认联系人"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Long> ids = storeContactEntities.stream().filter(f -> !f.getId().equals(basicdataStoreContact.getId())).map(BasicdataStoreContactEntity::getId).collect(Collectors.toList()); |
|
|
|
|
if (!ids.isEmpty()) { |
|
|
|
|
this.update(Wrappers.<BasicdataStoreContactEntity>update().lambda() |
|
|
|
@ -85,11 +84,13 @@ public class BasicdataStoreContactServiceImpl extends BaseServiceImpl<BasicdataS
|
|
|
|
|
.set(BasicdataStoreContactEntity::getDefaultType,false) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
List<BasicdataStoreContactEntity> collected = storeContactEntities.stream().filter(f -> f.getId().equals(basicdataStoreContact.getId())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
//修改客户的展示联系人为默认联系人
|
|
|
|
|
basicdataClientService.update(Wrappers.<BasicdataClientEntity>update().lambda() |
|
|
|
|
.eq(BasicdataClientEntity::getId,basicdataStoreContact.getShopId()) |
|
|
|
|
.set(BasicdataClientEntity::getLinkman,basicdataStoreContact.getLinkman()) |
|
|
|
|
.set(BasicdataClientEntity::getPhone,basicdataStoreContact.getPhone()) |
|
|
|
|
.eq(BasicdataClientEntity::getId,collected.get(0).getShopId()) |
|
|
|
|
.set(BasicdataClientEntity::getLinkman,collected.get(0).getLinkman()) |
|
|
|
|
.set(BasicdataClientEntity::getPhone,collected.get(0).getPhone()) |
|
|
|
|
); |
|
|
|
|
this.updateById(basicdataStoreContact); |
|
|
|
|
return true; |
|
|
|
|