组织信息更新

main
cheney 11 months ago
parent 334671f232
commit 997d2bbf43
  1. 13
      nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java
  2. 2
      users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java
  3. 41
      users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml
  4. 5
      users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java

@ -185,14 +185,21 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
userName = "个人" + randomNumber7; userName = "个人" + randomNumber7;
break; break;
} }
//企业认证获取个人平台手机号进行绑定
UserAccount account = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), 7);
if (account != null) {
appletCallbackReq.setPhone(account.getPhone());
}
accountId = addUserInfo(userName, appletCallbackReq.getPlatformId(), appletCallbackReq.getOpenId(), appletCallbackReq.getPhone()); accountId = addUserInfo(userName, appletCallbackReq.getPlatformId(), appletCallbackReq.getOpenId(), appletCallbackReq.getPhone());
// 如果平台ID不是7,添加供应商/幼儿园信息和团队信息,默认添加个人端信息 // 如果平台ID不是7,添加供应商/幼儿园信息和团队信息,默认添加个人端信息
if (appletCallbackReq.getPlatformId() != 7) { if (appletCallbackReq.getPlatformId() != 7) {
//添加个人端信息 //添加个人端信息,判断是否重复,为空添加
String personalUserName = "个人" + randomNumber7; if (account == null){
addUserInfo(personalUserName, 7, appletCallbackReq.getOpenId(), appletCallbackReq.getPhone()); String personalUserName = "个人" + randomNumber7;
addUserInfo(personalUserName, 7, appletCallbackReq.getOpenId(), appletCallbackReq.getPhone());
}
// 添加供应商/幼儿园信息 // 添加供应商/幼儿园信息
PlatformTeamAccount platformTeamAccount = new PlatformTeamAccount(); PlatformTeamAccount platformTeamAccount = new PlatformTeamAccount();

@ -62,5 +62,5 @@ public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
boolean save(Student student); boolean save(Student student);
List<OrganizationInfo> selectOrganizationInfo(@Param("accountIds")String accounts); List<OrganizationInfo> selectOrganizationInfo(@Param("openId")String openId);
} }

@ -841,10 +841,7 @@
a.create_time, a.create_time,
u.last_login_time, u.last_login_time,
u.login_number, u.login_number,
CASE GROUP_CONCAT(u.user_name) as user_name,
WHEN count(ai.id) > 0 THEN ai.real_name
ELSE GROUP_CONCAT(u.user_name)
END as user_name,
a.work_number, a.work_number,
GROUP_CONCAT(s.platform_name) as platformName, GROUP_CONCAT(s.platform_name) as platformName,
CASE CASE
@ -1095,23 +1092,31 @@
AND c.is_del = 0 AND c.is_del = 0
</select> </select>
<select id="selectOrganizationInfo" resultType="com.huoran.users.entity.res.OrganizationInfo"> <select id="selectOrganizationInfo" resultType="com.huoran.users.entity.res.OrganizationInfo">
select SELECT
CASE CASE
WHEN ec.audit_status = 1 THEN ec.company_name WHEN
ELSE tc.classification_name ec.audit_status = 2 THEN
END as organizationName, ec.company_name ELSE tc.classification_name
ta.platform_id, END AS organizationName,
ec.platform_source AS platform_id,
ec.credit_code, ec.credit_code,
CASE CASE
WHEN ec.audit_status = 1 THEN '已认证' WHEN ec.audit_status = 2 THEN
ELSE '未认证或审核中' '已认证' ELSE '未认证或审核中'
END as authentication,pt.classification_id as teamId,ta.account_id,tc.is_enable END AS authentication,
from pt.classification_id AS teamId,
k_platform_team_account ta ta.account_id,
inner join k_platform_team pt on ta.manage_id = pt.manage_id tc.is_enable,
inner join k_platform_team_classification tc on tc.id = pt.classification_id ec.audit_status
left join hr_enterprise_certification ec on ec.account_id = ta.account_id FROM
where ta.account_id in(#{accountIds}) hr_enterprise_certification ec
INNER JOIN hr_user_account hu ON hu.app_open_id = ec.open_id
AND ec.platform_source = hu.platform_id
INNER JOIN k_platform_team_account ta ON ta.account_id = hu.id
INNER JOIN k_platform_team pt ON ta.manage_id = pt.manage_id
INNER JOIN k_platform_team_classification tc ON tc.id = pt.classification_id
WHERE
ec.open_id = #{openId}
</select> </select>
<update id="unbindMobilePhone" parameterType="java.lang.Integer"> <update id="unbindMobilePhone" parameterType="java.lang.Integer">

@ -429,11 +429,8 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
hrUserInfo.setAuthentication("已认证"); hrUserInfo.setAuthentication("已认证");
hrUserInfo.setIdNumber(authenticationInformation.getIdCardNo()); hrUserInfo.setIdNumber(authenticationInformation.getIdCardNo());
} }
String accounts = userAccountList.stream()
.map(hrUserAccount -> hrUserAccount.getId().toString())
.collect(Collectors.joining(","));
List<OrganizationInfo> organizationInfoList = baseMapper.selectOrganizationInfo(accounts); List<OrganizationInfo> organizationInfoList = baseMapper.selectOrganizationInfo(openId);
res.setHrUserInfo(hrUserInfo); res.setHrUserInfo(hrUserInfo);
res.setOrganizationInfoList(organizationInfoList); res.setOrganizationInfoList(organizationInfoList);

Loading…
Cancel
Save