|
|
@@ -359,9 +359,12 @@ public class CorpServiceImpl implements CorpService {
|
|
|
public Boolean isJoinCorpWx(Long userId, Boolean isJoin) {
|
|
|
if (!isJoin) {
|
|
|
User user = userMapper.selectById(userId);
|
|
|
+ if (StrUtil.isEmpty(user.getUnionid())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
CorpUser corpUser = corpUserMapper.selectOne(Wrappers.lambdaQuery(CorpUser.class)
|
|
|
.ne(CorpUser::getUnionid, "")
|
|
|
- .eq(CorpUser::getUserId, user.getUnionid())
|
|
|
+ .eq(CorpUser::getUnionid, user.getUnionid())
|
|
|
.last("limit 1")
|
|
|
.select(CorpUser::getId)
|
|
|
);
|