|
@@ -488,6 +488,15 @@ public class WeComUserDataJob {
|
|
|
weComUser.setGender(gender);
|
|
|
weComUser.setAvatar(avatar);
|
|
|
weComUserMapper.updateByPrimaryKeySelective(weComUser);
|
|
|
+ StaffWithUserExample example = new StaffWithUserExample();
|
|
|
+ example.createCriteria().andStaffIdEqualTo(staffId).andUserIdEqualTo(userId);
|
|
|
+ List<StaffWithUser> staffWithUsers = staffWithUserMapper.selectByExample(example);
|
|
|
+ if (CollectionUtils.isEmpty(staffWithUsers)) {
|
|
|
+ StaffWithUser staffWithUser = new StaffWithUser();
|
|
|
+ staffWithUser.setStaffId(staffId);
|
|
|
+ staffWithUser.setUserId(userId);
|
|
|
+ staffWithUserMapper.insertSelective(staffWithUser);
|
|
|
+ }
|
|
|
}
|
|
|
return userId;
|
|
|
}
|