Explorar el Código

Merge branch 'dev-xym-add-special' of Server/growth-manager into master

xueyiming hace 2 meses
padre
commit
7edb32dac1

+ 9 - 0
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComUserDataJob.java

@@ -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;
     }