|
|
@@ -1,8 +1,10 @@
|
|
|
package com.cyksj.service.user.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.mapper.UserMapper;
|
|
|
import com.cyksj.mapper.manage.distribute.UserDistributeSharedMapper;
|
|
|
import com.cyksj.model.dto.GzhOAuth2UserInfo;
|
|
|
@@ -36,7 +38,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
@Override
|
|
|
public User saveAuth(GzhOAuth2UserInfo info, Long sharedId) {
|
|
|
final String unionid = info.getUnionid();
|
|
|
-
|
|
|
+ if (StrUtil.isEmpty(unionid)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("授权操作异常,请刷新页面");
|
|
|
+ }
|
|
|
// 查询用户是否存在
|
|
|
User user = Optional.ofNullable(
|
|
|
this.getOne(new LambdaQueryWrapper<User>().eq(User::getUnionid,info.getUnionid())))
|