gongdecai преди 3 години
родител
ревизия
c208b4b80f

+ 7 - 7
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -175,7 +175,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //  查询pc 是否有账号
         CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
                 .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
-        if (commonStaff != null) {
+        if (commonStaff != null&&"2710b21efc1e4393930c5dc800010dc4".equals(commonStaff.getCompId())) {
             user.setRoleIds(commonStaff.getMajorRoleId());
             user.setId(commonStaff.getStaffId());
             CommonCompany commonCompany = commonCompanyService.selectById(commonStaff.getCompId());
@@ -209,16 +209,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //  查询app 账号
         CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone", commonUser.getPhone()));
         if (user != null) {
-            if ("1".equals(commonUser.getFlag())) {
+//            if ("1".equals(commonUser.getFlag())) {
                 this.deleteById(user.getId());
                 user.setId(commonStaff.getStaffId());
                 this.insert(user);
                 return "OK";
-            } else if ("2".equals(commonUser.getFlag())) {
-                return "OK";
-            } else {
-                return "是否覆盖APP账号";
-            }
+//            } else if ("2".equals(commonUser.getFlag())) {
+//                return "OK";
+//            } else {
+//                return "是否覆盖APP账号";
+//            }
 
         }
         return "NG";