|
|
@@ -290,6 +290,9 @@ public class CsSessionServiceImpl implements ICsSessionService {
|
|
|
if (vo == null) {
|
|
|
return null;
|
|
|
}
|
|
|
+ if (StringUtils.isNotBlank(vo.getFromUserAvatar())) {
|
|
|
+ return vo.getFromUserAvatar();
|
|
|
+ }
|
|
|
// 小程序用户(sessionType=1):从学员表获取头像
|
|
|
if (vo.getSessionType() != null && vo.getSessionType() == 1 && vo.getFromUserId() != null) {
|
|
|
MainStudent student = mainStudentMapper.selectById(vo.getFromUserId());
|
|
|
@@ -299,9 +302,13 @@ public class CsSessionServiceImpl implements ICsSessionService {
|
|
|
}
|
|
|
// 商家用户(sessionType=2):从企业申请表获取头像
|
|
|
if (vo.getSessionType() != null && vo.getSessionType() == 2) {
|
|
|
+ SysUser user = vo.getFromUserId() != null ? sysUserMapper.selectById(vo.getFromUserId()) : null;
|
|
|
+ String tenantId = user != null ? user.getTenantId() : null;
|
|
|
MainCompanyApply companyApply = mainCompanyApplyMapper.selectOne(
|
|
|
Wrappers.lambdaQuery(MainCompanyApply.class)
|
|
|
.and(wrapper -> wrapper
|
|
|
+ .eq(StringUtils.isNotBlank(tenantId), MainCompanyApply::getTenantId, tenantId)
|
|
|
+ .or()
|
|
|
.eq(MainCompanyApply::getTenantId, String.valueOf(vo.getFromUserId()))
|
|
|
.or()
|
|
|
.eq(MainCompanyApply::getId, vo.getFromUserId())
|