|
@@ -304,8 +304,8 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
|
|
|
|
|
|
this.updateById(customerDto);
|
|
|
-
|
|
|
- customerUserService.remove(Wrappers.<CustomerUser>lambdaQuery().eq(CustomerUser::getCustomerId, customerDto.getId()));
|
|
|
+
|
|
|
+
|
|
|
|
|
|
saveCustomerUse(customerDto);
|
|
|
}
|
|
@@ -352,8 +352,9 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
|
|
private void saveCustomerUse(CustomerDto customerDto) {
|
|
|
List<CustomerUser> customerUserDtoList = customerDto.getCustomerUserList();
|
|
|
customerUserDtoList.forEach(customerUserDto -> customerUserDto.setCustomerId(customerDto.getId()));
|
|
|
- customerUserDtoList.forEach(customerUserDto -> customerUserDto.setId(null));
|
|
|
- customerUserService.saveBatch(customerUserDtoList);
|
|
|
+
|
|
|
+
|
|
|
+ customerUserService.editLinked(customerUserDtoList, CustomerUser::getCustomerId, customerDto.getId());
|
|
|
}
|
|
|
|
|
|
|