From 9515791a36f519166e29d3359dc327500436aa62 Mon Sep 17 00:00:00 2001
From: cheney <1251790704@qq.com>
Date: Tue, 23 Jan 2024 18:36:31 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8E=BB=E9=87=8D=E3=80=81=E6=B4=BB=E5=8A=A8?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E5=8E=BB?=
=?UTF-8?q?=E9=87=8D=E3=80=81=E6=9F=A5=E8=AF=A2=E7=BB=84=E7=BB=87=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/xml/CompetitionMapper.xml | 2 +-
.../PlatformTeamAccountController.java | 2 +-
.../xml/EnterpriseCertificationMapper.xml | 4 ++
.../impl/PlatformTeamAccountServiceImpl.java | 5 +-
.../controller/HrUserAccountController.java | 14 ++++
.../users/entity/res/OrganizationInfo.java | 6 ++
.../users/mapper/HrUserAccountMapper.java | 2 +
.../users/mapper/xml/HrUserAccountMapper.xml | 68 +++++++++++++++----
.../users/service/IHrUserAccountService.java | 2 +
.../impl/HrUserAccountServiceImpl.java | 12 ++--
10 files changed, 95 insertions(+), 22 deletions(-)
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) {