From efe8dc90cc775432a85aa9e123165908033651f6 Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Mon, 18 Dec 2023 18:24:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.properties | 3 + .../impl/PlatformTeamAccountServiceImpl.java | 5 ++ .../controller/HrUserAccountController.java | 7 +++ .../users/entity/res/UserInfoDetailsRes.java | 8 +-- .../users/entity/res/UserInfoListRes.java | 30 +-------- .../mapper/EnterpriseCertificationMapper.java | 2 + .../users/mapper/xml/HrUserAccountMapper.xml | 61 +++++-------------- .../users/service/IHrUserAccountService.java | 2 + .../impl/HrUserAccountServiceImpl.java | 35 +++++++++-- 9 files changed, 71 insertions(+), 82 deletions(-) diff --git a/gateway/src/main/resources/bootstrap.properties b/gateway/src/main/resources/bootstrap.properties index 16d60f2..a6b3264 100644 --- a/gateway/src/main/resources/bootstrap.properties +++ b/gateway/src/main/resources/bootstrap.properties @@ -3,6 +3,9 @@ spring.application.name=gateway #addr spring.cloud.nacos.config.server-addr=127.0.0.1:8848 +spring.cloud.nacos.discovery.username=nacos +spring.cloud.nacos.discovery.password=huorantech + #namespace spring.cloud.nacos.config.namespace=kindergarten-microservice-configuration-namespace 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 33868c2..b60687e 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 @@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.huoran.common.exception.CustomException; +import com.huoran.common.exception.ExceptionEnum; import com.huoran.common.response.R; import com.huoran.common.utils.HttpClientUtils; import com.huoran.common.utils.JwtUtils; @@ -94,6 +96,9 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl bindingPlatformAndUserList; + @ApiModelProperty("组织认证信息") + private List enterpriseCertificationList; + } diff --git a/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java b/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java index 1c6b97f..1cc7e4a 100644 --- a/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java +++ b/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java @@ -22,9 +22,6 @@ public class UserInfoListRes implements Serializable { private static final long serialVersionUID = 1L; - /** - * 用户id - */ @ApiModelProperty("用户id") @TableId(value = "userId", type = IdType.AUTO) private Integer userId; @@ -32,48 +29,24 @@ public class UserInfoListRes implements Serializable { @ApiModelProperty("账号id") private Integer accountId; - /** - * 用户账号 - */ @ApiModelProperty("用户账号") private String account; - /** - * 用户姓名 - */ @ApiModelProperty("用户姓名") private String userName; - /** - * 学校名称 - */ - @ApiModelProperty("学校名称") - private String schoolName; - - /** - * 平台来源 - */ @ApiModelProperty("平台来源") private String platformName; - /** - * 手机号 - */ @ApiModelProperty("手机号") private String phone; - /** - * 创建时间 - */ @ApiModelProperty("创建时间") private String createTime; @ApiModelProperty("最近登录时间") private String lastLoginTime; - /** - * 登录次数 - */ @ApiModelProperty("登录次数") private Integer logInNumber; @@ -86,4 +59,7 @@ public class UserInfoListRes implements Serializable { @ApiModelProperty("城市") private String cityName; + @ApiModelProperty("实名认证") + private String authentication; + } diff --git a/users/src/main/java/com/huoran/users/mapper/EnterpriseCertificationMapper.java b/users/src/main/java/com/huoran/users/mapper/EnterpriseCertificationMapper.java index ff1b418..1b99c74 100644 --- a/users/src/main/java/com/huoran/users/mapper/EnterpriseCertificationMapper.java +++ b/users/src/main/java/com/huoran/users/mapper/EnterpriseCertificationMapper.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.huoran.users.entity.EnterpriseCertification; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.huoran.users.entity.req.EnterpriseCertificationLIstReq; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** @@ -14,6 +15,7 @@ import org.apache.ibatis.annotations.Param; * @author chen * @since 2023-12-18 */ +@Mapper public interface EnterpriseCertificationMapper extends BaseMapper { IPage selectEnterpriseCertificationList(IPage page, @Param("req")EnterpriseCertificationLIstReq req); 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 5079e0f..c25f435 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 @@ -836,46 +836,28 @@ u.user_id, a.id AS accountId, a.phone, - s.school_name, - IFNULL( - ( - SELECT - GROUP_CONCAT( s.platform_name ) - FROM - sys_platform s - WHERE - FIND_IN_SET( - s.platform_id, - ( - SELECT - GROUP_CONCAT( DISTINCT phone.platform_id ) AS platform_id - FROM - hr_user_account phone - WHERE - phone.phone = a.phone - AND phone.is_del = 0 - ) - ) - ), - ( SELECT platform_name FROM sys_platform sp WHERE sp.platform_id = a.platform_id ) - ) AS platformName, a.create_time, u.last_login_time, u.login_number, - u.user_name, - a.work_number + CASE + WHEN count(ai.id) > 0 THEN ai.real_name + ELSE u.user_name + END as user_name, + a.work_number, + s.platform_name, + CASE + WHEN count(ai.id) > 0 THEN '已认证' + ELSE '未认证' + END as authentication FROM nakadai.hr_user_info u - INNER JOIN nakadai.hr_user_account a ON u.user_id = a.user_id - AND a.is_del = 0 - INNER JOIN nakadai.school s ON s.school_id = a.school_id - AND s.is_del = 0 + INNER JOIN nakadai.hr_user_account a ON u.user_id = a.user_id AND a.is_del = 0 + inner join sys_platform s on a.platform_id = s.platform_id + left join hr_user_authentication_information ai on a.id = ai.account_id WHERE u.is_del = 0 AND a.customer_id IS NULL - AND a.platform_id != 3 - AND a.platform_id != 4 - + AND a.platform_id not in (1,2,3,4) AND u.create_time between #{userInfoReq.creationTime} and #{userInfoReq.endTime} @@ -893,26 +875,13 @@ and u.city_id =#{userInfoReq.cityId} - - - AND FIND_IN_SET( #{userInfoReq.schoolId}, a.school_id ) - - - - - AND ( a.phone LIKE CONCAT('%',#{userInfoReq.searchContent},'%') OR u.user_name LIKE CONCAT('%',#{userInfoReq.searchContent},'%')) - - - ORDER BY create_time DESC LIMIT - #{userInfoReq.pageNum} - , - #{userInfoReq.pageSize} + #{userInfoReq.pageNum},#{userInfoReq.pageSize}