mirror of
https://github.com/zongzibinbin/MallChat.git
synced 2026-03-13 21:53:41 +08:00
[fix] String类型判断使用StringUtils.isNotEmpty() 而不是Objects.isNull()
This commit is contained in:
@@ -34,6 +34,6 @@ public class CursorPageBaseReq {
|
||||
|
||||
@JsonIgnore
|
||||
public Boolean isFirstPage() {
|
||||
return StringUtils.isNotEmpty(cursor);
|
||||
return StringUtils.isEmpty(cursor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class WxMsgService {
|
||||
public void authorize(WxOAuth2UserInfo userInfo) {
|
||||
User user = userDao.getByOpenId(userInfo.getOpenid());
|
||||
//更新用户信息
|
||||
if (StringUtils.isNotEmpty(user.getName())) {
|
||||
if (StringUtils.isEmpty(user.getName())) {
|
||||
fillUserInfo(user.getId(), userInfo);
|
||||
}
|
||||
//触发用户登录成功操作
|
||||
|
||||
@@ -17,7 +17,7 @@ public class HttpHeadersHandler extends ChannelInboundHandlerAdapter {
|
||||
if (msg instanceof FullHttpRequest) {
|
||||
HttpHeaders headers = ((FullHttpRequest) msg).headers();
|
||||
String ip = headers.get("X-Real-IP");
|
||||
if (StringUtils.isNotEmpty(ip)) {//如果没经过nginx,就直接获取远端地址
|
||||
if (StringUtils.isEmpty(ip)) {//如果没经过nginx,就直接获取远端地址
|
||||
InetSocketAddress address = (InetSocketAddress) ctx.channel().remoteAddress();
|
||||
ip = address.getAddress().getHostAddress();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user