diff --git a/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml index f464722..07e8fb5 100644 --- a/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml +++ b/competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml @@ -825,7 +825,7 @@ diff --git a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java index 06b2d8b..c2827de 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java +++ b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java @@ -110,6 +110,7 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl ids) { + String tips = null; + for (String id : ids) { + int team = iHrUserAccountService.selectTeam(id); + if (team > 0){ + tips = "该用户为组织负责人,删除后会同步删除该组织,确定删除?"; + } + } + return R.ok().put("tips",tips); + } + /** * 查看用户系统绑定详情 */ diff --git a/users/src/main/java/com/huoran/users/entity/res/OrganizationInfo.java b/users/src/main/java/com/huoran/users/entity/res/OrganizationInfo.java index 3e50719..f1a0b81 100644 --- a/users/src/main/java/com/huoran/users/entity/res/OrganizationInfo.java +++ b/users/src/main/java/com/huoran/users/entity/res/OrganizationInfo.java @@ -24,6 +24,12 @@ public class OrganizationInfo { @ApiModelProperty("团队id") private Integer teamId; + @ApiModelProperty("是否团队负责人") + private Integer isTeam; + + @ApiModelProperty("团队父id") + private Integer parentId; + @ApiModelProperty("团队启用禁用") private Integer isEnable; diff --git a/users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java b/users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java index 7f6e2de..c16c4ab 100644 --- a/users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java +++ b/users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java @@ -63,4 +63,6 @@ public interface HrUserAccountMapper extends BaseMapper { boolean save(Student student); List selectOrganizationInfo(@Param("openId")String openId); + + int selectTeamByOpenId(String id); } diff --git a/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml b/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml index 9edae4e..f01baf2 100644 --- a/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml +++ b/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml @@ -1100,30 +1100,74 @@ + diff --git a/users/src/main/java/com/huoran/users/service/IHrUserAccountService.java b/users/src/main/java/com/huoran/users/service/IHrUserAccountService.java index b98be0e..c2fc42c 100644 --- a/users/src/main/java/com/huoran/users/service/IHrUserAccountService.java +++ b/users/src/main/java/com/huoran/users/service/IHrUserAccountService.java @@ -88,4 +88,6 @@ public interface IHrUserAccountService extends IService { UserInfoDetailsRes viewUserDetails(String openId); R updateAvatars(String openId, String url, String userName,String platformId); + + int selectTeam(String id); } diff --git a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java index 26e015c..c296579 100644 --- a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java +++ b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java @@ -416,7 +416,7 @@ public class HrUserAccountServiceImpl extends ServiceImpl userAccountList = hrUserAccountMapper.selectList(new QueryWrapper() - .eq("app_open_id", openId)); + .eq("app_open_id", openId).orderByDesc("platform_id")); if (userAccountList.size() == 0){ res.setStatus(true); res.setMessage("用户不存在,请先重新登录注册!"); @@ -426,15 +426,10 @@ public class HrUserAccountServiceImpl extends ServiceImpl0 ? R.ok():R.error(); } + @Override + public int selectTeam(String id) { + return baseMapper.selectTeamByOpenId(id); + } + @Override public R oneClickEnableVerification(Integer accountId) {