Merge remote-tracking branch 'origin/main' into main

main
rong.liu 11 months ago
commit 986388cde5
  1. 10
      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

@ -157,6 +157,7 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
//TODO 团队信息待处理
// data.put("teamId",platformTeamClassification.getId());
// data.put("teamName",teamName);
return R.ok().put("data",data);
}
}
String randomNumber5 = cn.hutool.core.util.RandomUtil.randomNumbers(5);
@ -185,14 +186,21 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
userName = "个人" + randomNumber7;
break;
}
//企业认证获取个人平台手机号进行绑定
UserAccount account = baseMapper.selectAccountByOpenId(appletCallbackReq.getOpenId(), 7);
if (account != null) {
appletCallbackReq.setPhone(account.getPhone());
}
accountId = addUserInfo(userName, appletCallbackReq.getPlatformId(), appletCallbackReq.getOpenId(), appletCallbackReq.getPhone());
// 如果平台ID不是7,添加供应商/幼儿园信息和团队信息,默认添加个人端信息
if (appletCallbackReq.getPlatformId() != 7) {
//添加个人端信息
//添加个人端信息,判断是否重复,为空添加
if (account == null){
String personalUserName = "个人" + randomNumber7;
addUserInfo(personalUserName, 7, appletCallbackReq.getOpenId(), appletCallbackReq.getPhone());
}
// 添加供应商/幼儿园信息
PlatformTeamAccount platformTeamAccount = new PlatformTeamAccount();

@ -62,5 +62,5 @@ public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
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,
u.last_login_time,
u.login_number,
CASE
WHEN count(ai.id) > 0 THEN ai.real_name
ELSE GROUP_CONCAT(u.user_name)
END as user_name,
GROUP_CONCAT(u.user_name) as user_name,
a.work_number,
GROUP_CONCAT(s.platform_name) as platformName,
CASE
@ -1095,23 +1092,31 @@
AND c.is_del = 0
</select>
<select id="selectOrganizationInfo" resultType="com.huoran.users.entity.res.OrganizationInfo">
select
SELECT
CASE
WHEN ec.audit_status = 1 THEN ec.company_name
ELSE tc.classification_name
END as organizationName,
ta.platform_id,
WHEN
ec.audit_status = 2 THEN
ec.company_name ELSE tc.classification_name
END AS organizationName,
ec.platform_source AS platform_id,
ec.credit_code,
CASE
WHEN ec.audit_status = 1 THEN '已认证'
ELSE '未认证或审核中'
END as authentication,pt.classification_id as teamId,ta.account_id,tc.is_enable
from
k_platform_team_account ta
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
left join hr_enterprise_certification ec on ec.account_id = ta.account_id
where ta.account_id in(#{accountIds})
WHEN ec.audit_status = 2 THEN
'已认证' ELSE '未认证或审核中'
END AS authentication,
pt.classification_id AS teamId,
ta.account_id,
tc.is_enable,
ec.audit_status
FROM
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>
<update id="unbindMobilePhone" parameterType="java.lang.Integer">

@ -429,11 +429,8 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
hrUserInfo.setAuthentication("已认证");
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.setOrganizationInfoList(organizationInfoList);

Loading…
Cancel
Save