This commit is contained in:
PQZ 2025-03-29 15:36:14 +08:00
commit d9cbc1ff47

View File

@ -27,7 +27,9 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.busi.query.BusiNoticeQuery;
import com.ruoyi.constant.DictConstants;
import com.ruoyi.member.domain.MemberApply;
import com.ruoyi.member.domain.MemberUser;
import com.ruoyi.member.service.IMemberApplyService;
import com.ruoyi.member.service.IMemberUserService;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.system.service.ISysUserService;
@ -60,7 +62,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
@Autowired
private ISysUserService userService;
@Autowired
private IMemberApplyService memberApplyService;
private IMemberUserService memberUserService;
@Autowired
private ISysDictDataService dictDataService;
@ -244,11 +246,12 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
userDetailJson.put("nickName",userDetail.getNickName());
userDetailJson.put("avatar",Optional.ofNullable(userDetail.getAvatar()).orElse(""));
//关联认证表
LambdaQueryWrapper<MemberApply> queryWrapperMember =new LambdaQueryWrapper<>();
queryWrapperMember.eq(MemberApply::getUserId,userDetail.getUserId()).eq(MemberApply::getApprovalStatus,1).last("limit 1");
MemberApply memberApply = memberApplyService.getOne(queryWrapperMember);
if (null != memberApply){
userDetailJson.put("identityType",dictDataService.selectDictLabel("dl_identity_type",memberApply.getIdentityType()));
LambdaQueryWrapper<MemberUser> queryWrapperMember =new LambdaQueryWrapper<>();
queryWrapperMember.eq(MemberUser::getUserId,userDetail.getUserId()).eq(MemberUser::getUserType,"01").last("limit 1");
MemberUser memberUser = memberUserService.getOne(queryWrapperMember);
userDetailJson.put("identityType","未认证");
if (null != memberUser&&StringUtils.isNotEmpty(memberUser.getIdentityType())){
userDetailJson.put("identityType",dictDataService.selectDictLabel("dl_identity_type",memberUser.getIdentityType()));
}
res.put("userDetail",userDetailJson);
//已报名用户头像