This commit is contained in:
佟明轩 2025-05-20 11:53:08 +08:00
parent 659d00e4d9
commit 1163720b4b
1 changed files with 7 additions and 5 deletions

View File

@ -102,6 +102,8 @@ public class OrganizationMemberService extends BaseService {
organizationMemberSectionMapper.delete(delWrapper);
List<OrganizationMemberSection> sectionList = new ArrayList<>();
List<String> sectionNameList = new ArrayList<>();
organizationMember.setSectionNames("");
organizationMemberMapper.insertOrUpdate(organizationMember);
for (Integer sectionId : sectionIds) {
OrganizationSection dbSection = organizationSectionMapper.selectById(sectionId);
if (dbSection == null){
@ -116,11 +118,11 @@ public class OrganizationMemberService extends BaseService {
sectionList.add(memberSection);
}
organizationMember.setSectionNames(String.join("/", sectionNameList));
organizationMemberMapper.insertOrUpdate(organizationMember);
for (OrganizationMemberSection section : sectionList){
section.setOrganizationMemberId(organizationMember.getId());
}
OrganizationMember updateMember = new OrganizationMember();
updateMember.setId(organizationMember.getId());
updateMember.setSectionNames(String.join("/", sectionNameList));
organizationMemberMapper.updateById(updateMember);
organizationMemberSectionMapper.insert(sectionList);
ManagerUser user = dto.getUserInfo();