diff --git a/src/main/java/club/joylink/rtss/services/CompanyService.java b/src/main/java/club/joylink/rtss/services/CompanyService.java index 07db0fc02..030e105d5 100644 --- a/src/main/java/club/joylink/rtss/services/CompanyService.java +++ b/src/main/java/club/joylink/rtss/services/CompanyService.java @@ -107,8 +107,9 @@ public class CompanyService implements ICompanyService { @Override public void deleteUserCompanyRel(Long userId) { - UserCompanyRel ucr = getUserCompanyRelEntity(userId); - userCompanyRelDAO.deleteByPrimaryKey(ucr.getId()); + UserCompanyRelExample example = new UserCompanyRelExample(); + example.createCriteria().andUserIdEqualTo(userId); + userCompanyRelDAO.deleteByExample(example); } @Override