用户信息,小程序团队信息

main
cheney 11 months ago
parent efe8dc90cc
commit f64b93739b
  1. 31
      nakadai/src/main/java/com/huoran/nakadai/controller/PlatformTeamAccountController.java
  2. 36
      nakadai/src/main/java/com/huoran/nakadai/entity/PlatformTeamClassification.java
  3. 3
      nakadai/src/main/java/com/huoran/nakadai/entity/req/AppletCallbackReq.java
  4. 58
      nakadai/src/main/java/com/huoran/nakadai/entity/req/TeamInfo.java
  5. 3
      nakadai/src/main/java/com/huoran/nakadai/mapper/PlatformTeamAccountMapper.java
  6. 5
      nakadai/src/main/java/com/huoran/nakadai/mapper/xml/PlatformTeamAccountMapper.xml
  7. 27
      nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java
  8. 4
      users/src/main/java/com/huoran/users/controller/HrUserAccountController.java
  9. 2
      users/src/main/java/com/huoran/users/entity/EnterpriseCertification.java
  10. 13
      users/src/main/java/com/huoran/users/entity/HrUserInfo.java
  11. 29
      users/src/main/java/com/huoran/users/entity/res/OrganizationInfo.java
  12. 2
      users/src/main/java/com/huoran/users/entity/res/UserInfoDetailsRes.java
  13. 3
      users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java
  14. 5
      users/src/main/java/com/huoran/users/mapper/HrUserAccountMapper.java
  15. 3
      users/src/main/java/com/huoran/users/mapper/UserAuthenticationInformationMapper.java
  16. 25
      users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml
  17. 2
      users/src/main/java/com/huoran/users/service/IHrUserAccountService.java
  18. 51
      users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java

@ -17,6 +17,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -179,6 +180,17 @@ public class PlatformTeamAccountController {
// public R queryPartnerAccount(@RequestParam String phone) { // public R queryPartnerAccount(@RequestParam String phone) {
// return platformTeamAccountService.queryPartnerAccount(phone); // return platformTeamAccountService.queryPartnerAccount(phone);
// } // }
@ApiOperation(value = "后台更新团队状态,禁用无法切换到该组织")
@PostMapping("/updateTeamStatus")
public R updateTeamStatus(
@RequestParam("teamId") @ApiParam(value = "团队id") Integer teamId,
@RequestParam("isEnable") @ApiParam(value = "是否禁用(1->禁用,0->启用)") Integer isEnable) {
PlatformTeamClassification platformTeamClassification = new PlatformTeamClassification();
platformTeamClassification.setId(teamId);
platformTeamClassification.setIsEnable(isEnable);
boolean update = platformTeamClassificationService.updateById(platformTeamClassification);
return update? R.ok() : R.error();
}
//================================以下接口为小程序调用=================================== //================================以下接口为小程序调用===================================
@ApiOperation(value = "幼教产品微信小程序回调登录") @ApiOperation(value = "幼教产品微信小程序回调登录")
@ -209,5 +221,24 @@ public class PlatformTeamAccountController {
public R platformTeamAccountList(@RequestBody @Valid PlatformTeamAccountListReq req) { public R platformTeamAccountList(@RequestBody @Valid PlatformTeamAccountListReq req) {
return platformTeamAccountService.pagePlatformTeamAccountList(req); return platformTeamAccountService.pagePlatformTeamAccountList(req);
} }
@ApiOperation(value = "小程序团队信息维护")
@PostMapping("/updateTeamInfo")
public R updateTeamInfo(@RequestBody TeamInfo teamInfo) {
PlatformTeamClassification platformTeamClassification = new PlatformTeamClassification();
BeanUtils.copyProperties(teamInfo,platformTeamClassification);
boolean update = platformTeamClassificationService.updateById(platformTeamClassification);
return update? R.ok() : R.error();
}
@ApiOperation(value = "查询团队信息")
@GetMapping("/queryTeamInfo")
public R queryTeamInfo(
@ApiParam(value = "团队id")
@RequestParam("teamId") Integer teamId) {
PlatformTeamClassification teamInfo = platformTeamClassificationService.getById(teamId);
return R.ok().put("teamInfo",teamInfo);
}
} }

@ -57,6 +57,42 @@ public class PlatformTeamClassification implements Serializable {
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
@ApiModelProperty(value = "是否禁用,默认为0,1为禁用")
private Integer isEnable;
@ApiModelProperty(value = "slogan")
private String slogan;
@ApiModelProperty(value = "province")
private String province;
@ApiModelProperty(value = "city")
private String city;
@ApiModelProperty(value = "picture_url")
private String pictureUrl;
@ApiModelProperty(value = "qrCode_one_name")
private String qrCodeOneName;
@ApiModelProperty(value = "qrCode_one_url")
private String qrCodeOneUrl;
@ApiModelProperty(value = "qrCode_two_name")
private String qrCodeTwoName;
@ApiModelProperty(value = "qrCode_two_url")
private String qrCodeTwoUrl;
@ApiModelProperty(value = "qrCode_three_name")
private String qrCodeThreeName;
@ApiModelProperty(value = "qrCode_three_name")
private String qrCodeThreeUrl;
@ApiModelProperty(value = "qrCode_three_name")
private String phone;
@ApiModelProperty(value = "简介") @ApiModelProperty(value = "简介")
private String briefIntroduction; private String briefIntroduction;

@ -25,4 +25,7 @@ public class AppletCallbackReq {
@ApiModelProperty("手机号") @ApiModelProperty("手机号")
private String phone; private String phone;
@ApiModelProperty("申请组织名称")
private String organizationName;
} }

@ -0,0 +1,58 @@
package com.huoran.nakadai.entity.req;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class TeamInfo {
@ApiModelProperty(value = "团队id")
private Integer id;
@ApiModelProperty(value = "团队名称")
private String classificationName;
@ApiModelProperty(value = "logo_url")
private String logo_url;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "简介")
private String briefIntroduction;
@ApiModelProperty(value = "slogan")
private String slogan;
@ApiModelProperty(value = "province")
private String province;
@ApiModelProperty(value = "city")
private String city;
@ApiModelProperty(value = "picture_url")
private String pictureUrl;
@ApiModelProperty(value = "qrCode_one_name")
private String qrCodeOneName;
@ApiModelProperty(value = "qrCode_one_url")
private String qrCodeOneUrl;
@ApiModelProperty(value = "qrCode_two_name")
private String qrCodeTwoName;
@ApiModelProperty(value = "qrCode_two_url")
private String qrCodeTwoUrl;
@ApiModelProperty(value = "qrCode_three_name")
private String qrCodeThreeName;
@ApiModelProperty(value = "qrCode_three_name")
private String qrCodeThreeUrl;
@ApiModelProperty(value = "phone")
private String phone;
}

@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -36,4 +37,6 @@ public interface PlatformTeamAccountMapper extends BaseMapper<PlatformTeamAccoun
ArrayList<Integer> selectTeamIdByClassificationId(@Param("classificationId")String classificationId); ArrayList<Integer> selectTeamIdByClassificationId(@Param("classificationId")String classificationId);
IPage<PlatformTeamAccountResp> pagePlatformTeamAccountList(Page<PlatformTeamAccountResp> page, PlatformTeamAccountListReq req); IPage<PlatformTeamAccountResp> pagePlatformTeamAccountList(Page<PlatformTeamAccountResp> page, PlatformTeamAccountListReq req);
void updateUserInfo(@Param("userId")Integer userId);
} }

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.huoran.nakadai.mapper.PlatformTeamAccountMapper"> <mapper namespace="com.huoran.nakadai.mapper.PlatformTeamAccountMapper">
<update id="updateUserInfo">
UPDATE hr_user_info
SET last_login_time = now(), login_number = login_number + 1
WHERE user_id = #{userId}
</update>
<select id="platformTeamAccountMergeList" <select id="platformTeamAccountMergeList"
resultType="com.huoran.nakadai.entity.res.PlatformTeamAccountResp"> resultType="com.huoran.nakadai.entity.res.PlatformTeamAccountResp">

@ -99,6 +99,8 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
if (!userAccount.getIsEnable()){ if (!userAccount.getIsEnable()){
throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED); throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED);
} }
//更新登录时间
baseMapper.updateUserInfo(userAccount.getUserId());
data.put("state", "login"); data.put("state", "login");
data.put("platformId", platformId); data.put("platformId", platformId);
data.put("token", JwtUtils.getJwtToken(userAccount.getId().toString())); data.put("token", JwtUtils.getJwtToken(userAccount.getId().toString()));
@ -128,12 +130,22 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
// 根据不同的平台ID设置用户名和账户名 // 根据不同的平台ID设置用户名和账户名
switch (appletCallbackReq.getPlatformId()) { switch (appletCallbackReq.getPlatformId()) {
case 5: case 5:
userName = "幼儿园" + randomNumbers; if (StringUtils.isNotBlank(appletCallbackReq.getOrganizationName())){
accountName = "幼儿园" + randomNumbers; userName = appletCallbackReq.getOrganizationName();
accountName = appletCallbackReq.getOrganizationName();
}else {
userName = "幼儿园" + randomNumbers;
accountName = "幼儿园" + randomNumbers;
}
break; break;
case 6: case 6:
userName = "供应商" + randomNumbers; if (StringUtils.isNotBlank(appletCallbackReq.getOrganizationName())){
accountName = "供应商" + randomNumbers; userName = appletCallbackReq.getOrganizationName();
accountName = appletCallbackReq.getOrganizationName();
}else {
userName = "供应商" + randomNumbers;
accountName = "供应商" + randomNumbers;
}
break; break;
case 7: case 7:
userName = "个人" + randomNumbers; userName = "个人" + randomNumbers;
@ -174,7 +186,12 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
platformTeamClassification.setIsTeam(1); platformTeamClassification.setIsTeam(1);
platformTeamClassification.setParentId(1); platformTeamClassification.setParentId(1);
platformTeamClassification.setLevel(1); platformTeamClassification.setLevel(1);
String teamName = userAccount.getAccount() + "的团队"; String teamName = "";
if (StringUtils.isNotBlank(appletCallbackReq.getOrganizationName())){
teamName = appletCallbackReq.getOrganizationName();
}else {
teamName = userAccount.getAccount() + "的团队";
}
platformTeamClassification.setClassificationName(teamName); platformTeamClassification.setClassificationName(teamName);
int insert = platformTeamClassificationMapper.insert(platformTeamClassification); int insert = platformTeamClassificationMapper.insert(platformTeamClassification);

@ -284,8 +284,8 @@ public class HrUserAccountController {
@ApiOperation(value = "查看用户详情", response = UserInfoDetailsRes.class) @ApiOperation(value = "查看用户详情", response = UserInfoDetailsRes.class)
@GetMapping("/viewUserDetails") @GetMapping("/viewUserDetails")
public R viewUserDetails(@RequestParam @NotNull(message = "用户id为空查询错误") @Param("userId") Integer userId) { public R viewUserDetails(@RequestParam @NotNull(message = "openId为空查询错误") @Param("userId") String openId) {
UserInfoDetailsRes result = iHrUserAccountService.viewUserDetails(userId); UserInfoDetailsRes result = iHrUserAccountService.viewUserDetails(openId);
return R.ok().put("result", result); return R.ok().put("result", result);
} }

@ -78,7 +78,7 @@ public class EnterpriseCertification implements Serializable {
private Integer auditStatus; private Integer auditStatus;
@ApiModelProperty(value = "来源区分(5:幼儿园,6:供应商)") @ApiModelProperty(value = "来源区分(5:幼儿园,6:供应商)")
private String platformsOurce; private String platformSource;
@ApiModelProperty(value = "账号") @ApiModelProperty(value = "账号")

@ -35,6 +35,14 @@ public class HrUserInfo implements Serializable {
@ApiModelProperty("用户姓名") @ApiModelProperty("用户姓名")
private String userName; private String userName;
@ApiModelProperty("实名认证")
@TableField(exist = false)
private String authentication;
@ApiModelProperty("手机号")
@TableField(exist = false)
private String phone;
/** /**
* 唯一标识账号 * 唯一标识账号
*/ */
@ -102,11 +110,6 @@ public class HrUserInfo implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String schoolName; private String schoolName;
/**
* 电话此字段弃用
*/
/*@ApiModelProperty("电话")
private String phone;*/
@ApiModelProperty("邮箱") @ApiModelProperty("邮箱")
private String email; private String email;

@ -0,0 +1,29 @@
package com.huoran.users.entity.res;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class OrganizationInfo {
@ApiModelProperty("账号id")
private Integer accountId;
@ApiModelProperty("组织名称")
private String organizationName;
@ApiModelProperty("统一社会信用代码")
private String creditCode;
@ApiModelProperty("平台来源")
private String platformId;
@ApiModelProperty("组织认证状态")
private String authentication;
@ApiModelProperty("团队id")
private Integer teamId;
@ApiModelProperty("团队启用禁用")
private Integer isEnable;
}

@ -61,6 +61,6 @@ public class UserInfoDetailsRes implements Serializable {
private List<PhoneBindingrResp> bindingPlatformAndUserList; private List<PhoneBindingrResp> bindingPlatformAndUserList;
@ApiModelProperty("组织认证信息") @ApiModelProperty("组织认证信息")
private List<EnterpriseCertification> enterpriseCertificationList; private List<OrganizationInfo> organizationInfoList;
} }

@ -62,4 +62,7 @@ public class UserInfoListRes implements Serializable {
@ApiModelProperty("实名认证") @ApiModelProperty("实名认证")
private String authentication; private String authentication;
@ApiModelProperty("openId")
private String appOpenId;
} }

@ -9,6 +9,7 @@ import com.huoran.common.entity.UserInfo;
import com.huoran.users.entity.HrUserAccount; import com.huoran.users.entity.HrUserAccount;
import com.huoran.users.entity.req.UserInfoReq; import com.huoran.users.entity.req.UserInfoReq;
import com.huoran.users.entity.res.DataUserInfoResp; import com.huoran.users.entity.res.DataUserInfoResp;
import com.huoran.users.entity.res.OrganizationInfo;
import com.huoran.users.entity.res.UserAccountListRes; import com.huoran.users.entity.res.UserAccountListRes;
import com.huoran.users.entity.res.UserInfoListRes; import com.huoran.users.entity.res.UserInfoListRes;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -27,7 +28,7 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> { public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
List<UserInfoListRes> pageByCondition(@Param("userInfoReq") UserInfoReq userInfoReq); IPage<UserInfoListRes> pageByCondition(Page<UserInfoListRes> page,@Param("userInfoReq") UserInfoReq userInfoReq);
List<UserInfoListRes> pageByConditionNum(@Param("userInfoReq") UserInfoReq userInfoReq); List<UserInfoListRes> pageByConditionNum(@Param("userInfoReq") UserInfoReq userInfoReq);
List<UserAccountListRes> selectUserSysBindById(@Param("userId") Integer userId, @Param("platformId") Integer platformId); List<UserAccountListRes> selectUserSysBindById(@Param("userId") Integer userId, @Param("platformId") Integer platformId);
@ -60,4 +61,6 @@ public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
boolean addUserAccount(UserAccount account); boolean addUserAccount(UserAccount account);
boolean save(Student student); boolean save(Student student);
List<OrganizationInfo> selectOrganizationInfo(@Param("accountIds")String accounts);
} }

@ -3,6 +3,8 @@ package com.huoran.users.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.huoran.users.entity.UserAuthenticationInformation; import com.huoran.users.entity.UserAuthenticationInformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
/** /**
* <p> * <p>
@ -12,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author chen * @author chen
* @since 2023-12-14 * @since 2023-12-14
*/ */
@Mapper
public interface UserAuthenticationInformationMapper extends BaseMapper<UserAuthenticationInformation> { public interface UserAuthenticationInformationMapper extends BaseMapper<UserAuthenticationInformation> {
} }

@ -835,6 +835,8 @@
SELECT SELECT
u.user_id, u.user_id,
a.id AS accountId, a.id AS accountId,
a.app_open_id,
a.is_enable,
a.phone, a.phone,
a.create_time, a.create_time,
u.last_login_time, u.last_login_time,
@ -879,9 +881,9 @@
AND ( a.phone LIKE CONCAT('%',#{userInfoReq.searchContent},'%') AND ( a.phone LIKE CONCAT('%',#{userInfoReq.searchContent},'%')
OR u.user_name LIKE CONCAT('%',#{userInfoReq.searchContent},'%')) OR u.user_name LIKE CONCAT('%',#{userInfoReq.searchContent},'%'))
</if> </if>
GROUP BY a.id
ORDER BY ORDER BY
create_time DESC LIMIT create_time DESC
#{userInfoReq.pageNum},#{userInfoReq.pageSize}
</select> </select>
<select id="selectUserSysBindById" resultType="com.huoran.users.entity.res.UserAccountListRes"> <select id="selectUserSysBindById" resultType="com.huoran.users.entity.res.UserAccountListRes">
@ -1092,6 +1094,25 @@
AND a.account_id = #{id} AND a.account_id = #{id}
AND c.is_del = 0 AND c.is_del = 0
</select> </select>
<select id="selectOrganizationInfo" resultType="com.huoran.users.entity.res.OrganizationInfo">
select
CASE
WHEN ec.audit_status = 1 THEN ec.company_name
ELSE tc.classification_name
END as organizationName,
ta.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})
</select>
<update id="unbindMobilePhone" parameterType="java.lang.Integer"> <update id="unbindMobilePhone" parameterType="java.lang.Integer">
UPDATE hr_user_account UPDATE hr_user_account

@ -85,5 +85,5 @@ public interface IHrUserAccountService extends IService<HrUserAccount> {
R studentAccountApplication(RegisterReq registerReq); R studentAccountApplication(RegisterReq registerReq);
UserInfoDetailsRes viewUserDetails(Integer userId); UserInfoDetailsRes viewUserDetails(String openId);
} }

@ -23,10 +23,7 @@ import com.huoran.users.entity.*;
import com.huoran.users.entity.req.*; import com.huoran.users.entity.req.*;
import com.huoran.users.entity.res.*; import com.huoran.users.entity.res.*;
import com.huoran.users.entity.vo.CheckVo; import com.huoran.users.entity.vo.CheckVo;
import com.huoran.users.mapper.EnterpriseCertificationMapper; import com.huoran.users.mapper.*;
import com.huoran.users.mapper.HrPersonalFileMapper;
import com.huoran.users.mapper.HrUserAccountMapper;
import com.huoran.users.mapper.HrUserInfoMapper;
import com.huoran.users.service.IHrUserAccountService; import com.huoran.users.service.IHrUserAccountService;
import com.huoran.users.service.PlatformLoginService; import com.huoran.users.service.PlatformLoginService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -60,6 +57,9 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
@Autowired @Autowired
private HrUserInfoMapper hrUserInfoMapper; private HrUserInfoMapper hrUserInfoMapper;
@Autowired
private UserAuthenticationInformationMapper userAuthenticationInformationMapper;
@Autowired @Autowired
private EnterpriseCertificationMapper enterpriseCertificationMapper; private EnterpriseCertificationMapper enterpriseCertificationMapper;
@Autowired @Autowired
@ -100,11 +100,9 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
@Override @Override
public R queryPage(UserInfoReq userInfoReq) { public R queryPage(UserInfoReq userInfoReq) {
userInfoReq.setPageNum((userInfoReq.getPageNum() - 1) * userInfoReq.getPageSize()); Page<UserInfoListRes> page = new Page<>(userInfoReq.getPageNum(), userInfoReq.getPageSize());
List<UserInfoListRes> list = hrUserAccountMapper.pageByCondition(userInfoReq); IPage<UserInfoListRes> pageList = hrUserAccountMapper.pageByCondition(page, userInfoReq);
Integer totalCount = hrUserAccountMapper.pageByConditionNum(userInfoReq).size(); return R.ok().put("page", pageList);
return R.ok().put("page", list).put("total", totalCount);
} }
@Override @Override
@ -404,29 +402,34 @@ public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, H
} }
@Override @Override
public UserInfoDetailsRes viewUserDetails(Integer userId) { public UserInfoDetailsRes viewUserDetails(String openId) {
UserInfoDetailsRes res = new UserInfoDetailsRes(); UserInfoDetailsRes res = new UserInfoDetailsRes();
//查询用户信息
HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userId);
//查询账号详情List //查询账号详情List
HrUserAccount userAccount = hrUserAccountMapper.selectOne(new QueryWrapper<HrUserAccount>() List<HrUserAccount> userAccountList = hrUserAccountMapper.selectList(new QueryWrapper<HrUserAccount>()
.eq("user_id", userId)); .eq("app_open_id", openId));
HrUserAccount parameter = new HrUserAccount(); //查询用户信息
if (userAccount.getPhone() == null || userAccount.getPhone().equals("")) { HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userAccountList.get(0).getUserId());
parameter.setUserId(hrUserInfo.getUserId()); hrUserInfo.setPhone(userAccountList.get(0).getPhone());
} else { hrUserInfo.setAuthentication("未认证");
parameter.setPhone(userAccount.getPhone());
UserAuthenticationInformation authenticationInformation = userAuthenticationInformationMapper.selectOne(
new QueryWrapper<UserAuthenticationInformation>().eq("open_id", openId));
if (authenticationInformation!= null){
hrUserInfo.setUserName(authenticationInformation.getRealName());
hrUserInfo.setAuthentication("已认证");
hrUserInfo.setIdNumber(authenticationInformation.getIdCardNo());
} }
String accounts = userAccountList.stream()
.map(hrUserAccount -> hrUserAccount.getId().toString())
.collect(Collectors.joining(","));
List<EnterpriseCertification> enterpriseCertificationList = enterpriseCertificationMapper.selectList( List<OrganizationInfo> organizationInfoList = baseMapper.selectOrganizationInfo(accounts);
new QueryWrapper<EnterpriseCertification>().eq("account_id", userAccount.getId()));
res.setHrUserInfo(hrUserInfo); res.setHrUserInfo(hrUserInfo);
res.setEnterpriseCertificationList(enterpriseCertificationList); res.setOrganizationInfoList(organizationInfoList);
res.setUserAccount(userAccount); res.setUserAccountList(userAccountList);
return res; return res;
} }

Loading…
Cancel
Save