Browse Source

fix: NPE 방지코드 추가

feature/address-coordinate
lkd9125(이경도) 8 months ago
parent
commit
f52ed400e4
  1. 34
      pav-server/src/main/java/com/palnet/biz/jpa/repository/pty/PtyCstmrQueryRepository.java

34
pav-server/src/main/java/com/palnet/biz/jpa/repository/pty/PtyCstmrQueryRepository.java

@ -238,25 +238,25 @@ public class PtyCstmrQueryRepository {
.where(builder) .where(builder)
.fetchFirst(); .fetchFirst();
PtyCstmrDtl dtlEntity = query.select(dtl)
.from(dtl)
.where(dtl.cstmrSno.eq(entity.getCstmrSno()))
.fetchFirst();
List<PtyCstmrGroup> pcgEntityList = null;
if (entity != null) { if (entity != null) {
BooleanBuilder groupBuilder = new BooleanBuilder();
groupBuilder.and(group.cstmrSno.eq(entity.getCstmrSno())
.and(group.joinYn.eq("Y")));
pcgEntityList = query.select(group)
.from(group)
.where(groupBuilder)
.fetch();
}
PtyCstmrDtl dtlEntity = query.select(dtl)
.from(dtl)
.where(dtl.cstmrSno.eq(entity.getCstmrSno()))
.fetchFirst();
List<PtyCstmrGroup> pcgEntityList = null;
if (entity != null) {
BooleanBuilder groupBuilder = new BooleanBuilder();
groupBuilder.and(group.cstmrSno.eq(entity.getCstmrSno())
.and(group.joinYn.eq("Y")));
pcgEntityList = query.select(group)
.from(group)
.where(groupBuilder)
.fetch();
}
if (entity != null) {
JwtUserModel model = new JwtUserModel(); JwtUserModel model = new JwtUserModel();
model.setAuth(entity.getAuthId()); model.setAuth(entity.getAuthId());
model.setUserId(entity.getUserId()); model.setUserId(entity.getUserId());
@ -281,8 +281,6 @@ public class PtyCstmrQueryRepository {
} else { } else {
return null; return null;
} }
} }
/** /**

Loading…
Cancel
Save