判断用户是否通过飞手认证

上级 de8422ae
......@@ -61,4 +61,7 @@ public class UserAccountSimpleDTO implements Serializable {
private String coverPicture;
@ApiModelProperty(value = "地区")
private String region;
@ApiModelProperty(value = "是否是飞手")
private int isPilot;
}
......@@ -90,9 +90,12 @@ public class UserAccountVO implements Serializable {
private Integer districtChildId;
@ApiModelProperty(value = "飞手所属的飞手团队信息")
@ApiModelProperty(value = "用户自己认证的公司")
private CompanyInfoVO companyInfoVO;
@ApiModelProperty(value = "用户飞手加盟的公司")
private CompanyInfoVO pilotJoinCompanyInfoVO;
@ApiModelProperty(value = "用户对应的后台用户id")
private Integer backUserId;
@ApiModelProperty(value = "密码")
......
......@@ -190,4 +190,6 @@ public interface PilotCertificationDao {
* @return int
*/
int getStateMessage();
int getUserIsPilot(Integer userId);
}
......@@ -94,6 +94,8 @@ public class UserAccountDO implements Serializable {
private String password;
@ApiModelProperty(value = "用户状态")
private Integer userStateId;
@ApiModelProperty(value = "是否是飞手")
private int isPilot;
public UserAccountDO(UserAccountVO userAccountVO) {
this.id = userAccountVO.getId();
this.phoneNum = userAccountVO.getPhoneNum();
......@@ -161,6 +163,7 @@ public class UserAccountDO implements Serializable {
.region(this.region)
.briefIntroduction(this.briefIntroduction)
.coverPicture(this.coverPicture)
.isPilot(this.isPilot)
.build();
}
......
......@@ -93,6 +93,8 @@ public class UserAccountServiceImpl implements UserAccountService {
@Autowired
private PilotCertificationDao certificationDao;
@Autowired
private PilotCertificationDao pilotCertificationDao;
@Override
public UserAccountVO getUserAccountInfoByUnionId(String unionId) {
UserAccountDO userAccountDO = userServiceDao.getUserAccountInfoByUnionId(unionId);
......@@ -182,6 +184,8 @@ public class UserAccountServiceImpl implements UserAccountService {
String districtChild = userServiceDao.getDistrictChild(districtChildId);
userAccountDO.setRegion(districtChild);
}
int isPilot = pilotCertificationDao.getUserIsPilot(userAccountDO.getId());
userAccountDO.setIsPilot(isPilot);
}
List<UserAccountSimpleDTO> accountSimpleDTOS = list.stream().map(UserAccountDO::buildUserAccountSimpleDTO).collect(Collectors.toList());
//设置用户的渠道等级
......@@ -579,6 +583,11 @@ public class UserAccountServiceImpl implements UserAccountService {
String districtChild = userServiceDao.getDistrictChild(userAccountDO.getDistrictChildId());
userAccountDO.setRegion(districtChild);
UserAccountVO userAccountVO = userAccountDO.buildUserAccountVO();
CompanyInfoDO companyInfoDO = companyDao.getAppCompanyInfoUId(userAccountId);
if (companyInfoDO != null) {
CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO();
userAccountVO.setCompanyInfoVO(companyInfoVO);
}
ResultBody<RealNameAuthDTO> nameAuthDTOResultBody = realNameAuthService.userDetail(userAccountId);
RealNameAuthDTO realNameAuthDTO = nameAuthDTOResultBody.getResult();
if (realNameAuthDTO != null && realNameAuthDTO.getCheckStatus().equals(1)) {
......@@ -608,11 +617,10 @@ public class UserAccountServiceImpl implements UserAccountService {
} else {
userAccountVO.setSubStatus(0);
}
CompanyInfoDO companyInfoDO = certificationDao.selectCompanyInfoByPilotId(userAccountId,1);
if(companyInfoDO !=null) {
CompanyInfoVO companyInfoVO = companyInfoDO.buildCompanyInfoVO();
userAccountVO.setCompanyInfoVO(companyInfoVO);
CompanyInfoDO pilotJoinCompanyInfoDO = certificationDao.selectCompanyInfoByPilotId(userAccountId,1);
if(pilotJoinCompanyInfoDO !=null) {
CompanyInfoVO pilotJoinCompanyInfoVO = pilotJoinCompanyInfoDO.buildCompanyInfoVO();
userAccountVO.setPilotJoinCompanyInfoVO(pilotJoinCompanyInfoVO);
}
Integer backUserId = certificationDao.selectBackUserIdByUserId(userAccountId);
// log.info("userAccountId {} 用户对应的backUserId=============》{}",userAccountId,backUserId);
......
......@@ -399,6 +399,8 @@
AND ua.`disable` = 0
</select>
<insert id="insertPilotJoinTeam">
insert into pilot_join_team(pilot_user_id, back_user_id,pilot_status)
values (#{pilotId},#{backId},0)
......@@ -623,6 +625,12 @@
from user_partner
where status = 0
</select>
<select id="getUserIsPilot" resultType="java.lang.Integer">
select count(1)
from pilot_certification
where user_account_id = #{userId}
and audit_status = 1
</select>
<update id="chongqian">
update pay_wallet
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论