fix: 联合登录

This commit is contained in:
chc 2023-08-14 14:30:21 +08:00
parent 1cc939f457
commit 0267597b20
2 changed files with 6 additions and 6 deletions

View File

@ -276,7 +276,7 @@ public class ConnectServiceImpl extends ServiceImpl<ConnectMapper, Connect> impl
if(member==null){
LambdaQueryWrapper<Connect> queryWrapper = new LambdaQueryWrapper<Connect>();
//使用UnionId登录
if (StrUtil.isNotBlank(authUser.getToken().getUnionId())) {
if (authUser.getToken() != null && StrUtil.isNotBlank(authUser.getToken().getUnionId())) {
queryWrapper.eq(Connect::getUnionId, authUser.getToken().getUnionId())
.eq(Connect::getUnionType, authUser.getSource());
} else {

View File

@ -106,10 +106,10 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
@Override
public List<CategoryVO> categoryTree() {
List<CategoryVO> categoryVOList = (List<CategoryVO>) cache.get(CachePrefix.CATEGORY.getPrefix());
if (categoryVOList != null) {
return categoryVOList;
}
// List<CategoryVO> categoryVOList = (List<CategoryVO>) cache.get(CachePrefix.CATEGORY.getPrefix());
// if (categoryVOList != null) {
// return categoryVOList;
// }
//获取全部分类
LambdaQueryWrapper<Category> queryWrapper = new LambdaQueryWrapper<>();
@ -117,7 +117,7 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
List<Category> list = this.list(queryWrapper);
//构造分类树
categoryVOList = new ArrayList<>();
List<CategoryVO> categoryVOList = new ArrayList<>();
for (Category category : list) {
if ("0".equals(category.getParentId())) {
CategoryVO categoryVO = new CategoryVO(category);