Commit 3d94f0ff authored by 李健华's avatar 李健华

小程序登录判断是否冻结

parent 905a4939
......@@ -18,6 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import static cn.quantgroup.xyqb.constant.UserConstant.USER_ERROR_OR_ENABLE_ERROR;
/**
* @author :dongjianhua
* @date :Created in 2020/5/27 17:27
......@@ -123,9 +125,9 @@ public class AppletServiceImpl implements IAppletService {
throw new AppletException("未找到此用户绑定信息","0401");
}
user = userService.findById(wechatUserInfo.getUserId());
if (null == user) {
log.warn("未找到此用户,appName:{} ,openId:{}", appName, openId);
throw new AppletException("未找到此用户","0401");
if (null == user || !user.getEnable()) {
log.warn("未找到此用户或冻结,appName:{} ,openId:{}", appName, openId);
throw new AppletException(USER_ERROR_OR_ENABLE_ERROR,"0401");
}
iOauthLoginInfoService.addLoginInfo(user, tenantId);
......@@ -141,9 +143,9 @@ public class AppletServiceImpl implements IAppletService {
throw new AppletException("未找到此用户","0401");
}
user = userService.findById(userId);
if (null == user) {
log.warn("未找到此用户,appName:{} ,openId:{}", appName, openId);
throw new AppletException("未找到此用户","0401");
if (null == user || !user.getEnable()) {
log.warn("未找到此用户或冻结,appName:{} ,openId:{}", appName, openId);
throw new AppletException(USER_ERROR_OR_ENABLE_ERROR,"0401");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment